From 0cb7898c8936ae2649f708c55cf0dfe75888b6b3 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 20 Dec 2025 01:14:08 +0000 Subject: [PATCH 1/2] feat: add Fingerprint to Artifact Registry Version resource docs: update the description of ExportArtifact PiperOrigin-RevId: 846851972 Source-Link: https://github.com/googleapis/googleapis/commit/347b0e45a6ec42e183e44ce11e0cb0eaf7f24caa Source-Link: https://github.com/googleapis/googleapis-gen/commit/a4b09b2b952b9bbedd8cb1c98ab68299910e110c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWRldnRvb2xzLWFydGlmYWN0cmVnaXN0cnkvLk93bEJvdC55YW1sIiwiaCI6ImE0YjA5YjJiOTUyYjliYmVkZDhjYjFjOThhYjY4Mjk5OTEwZTExMGMifQ== --- .../.eslintignore | 7 + .../.eslintrc.json | 3 + .../.gitattributes | 4 + .../.gitignore | 14 + .../.jsdoc.js | 55 + .../.mocharc.js | 33 + .../google-devtools-artifactregistry/.nycrc | 24 + .../.prettierignore | 6 + .../.prettierrc.js | 22 + .../CODE_OF_CONDUCT.md | 94 + .../CONTRIBUTING.md | 76 + .../google-devtools-artifactregistry/LICENSE | 202 + .../README.md | 190 + .../artifactregistry/v1/apt_artifact.proto | 114 + .../artifactregistry/v1/artifact.proto | 399 + .../artifactregistry/v1/attachment.proto | 160 + .../devtools/artifactregistry/v1/export.proto | 99 + .../devtools/artifactregistry/v1/file.proto | 206 + .../artifactregistry/v1/generic.proto | 55 + .../devtools/artifactregistry/v1/go.proto | 52 + .../artifactregistry/v1/kfp_artifact.proto | 46 + .../artifactregistry/v1/package.proto | 166 + .../artifactregistry/v1/repository.proto | 765 + .../devtools/artifactregistry/v1/rule.proto | 157 + .../artifactregistry/v1/service.proto | 561 + .../artifactregistry/v1/settings.proto | 94 + .../devtools/artifactregistry/v1/tag.proto | 138 + .../artifactregistry/v1/version.proto | 224 + .../artifactregistry/v1/vpcsc_config.proto | 86 + .../artifactregistry/v1/yum_artifact.proto | 106 + .../v1beta2/apt_artifact.proto | 115 + .../artifactregistry/v1beta2/file.proto | 120 + .../artifactregistry/v1beta2/package.proto | 79 + .../artifactregistry/v1beta2/repository.proto | 201 + .../artifactregistry/v1beta2/service.proto | 304 + .../artifactregistry/v1beta2/settings.proto | 84 + .../artifactregistry/v1beta2/tag.proto | 118 + .../artifactregistry/v1beta2/version.proto | 127 + .../v1beta2/yum_artifact.proto | 107 + .../protos/protos.d.ts | 29137 +++++++ .../protos/protos.js | 71994 ++++++++++++++++ .../protos/protos.json | 7531 ++ ...artifact_registry.batch_delete_versions.js | 72 + .../v1/artifact_registry.create_attachment.js | 73 + .../v1/artifact_registry.create_repository.js | 73 + .../v1/artifact_registry.create_rule.js | 69 + .../v1/artifact_registry.create_tag.js | 68 + .../v1/artifact_registry.delete_attachment.js | 62 + .../v1/artifact_registry.delete_file.js | 62 + .../v1/artifact_registry.delete_package.js | 62 + .../v1/artifact_registry.delete_repository.js | 62 + .../v1/artifact_registry.delete_rule.js | 61 + .../v1/artifact_registry.delete_tag.js | 60 + .../v1/artifact_registry.delete_version.js | 66 + .../v1/artifact_registry.export_artifact.js | 81 + .../v1/artifact_registry.get_attachment.js | 61 + .../v1/artifact_registry.get_docker_image.js | 61 + .../v1/artifact_registry.get_file.js | 61 + .../v1/artifact_registry.get_iam_policy.js | 67 + .../artifact_registry.get_maven_artifact.js | 61 + .../v1/artifact_registry.get_npm_package.js | 61 + .../v1/artifact_registry.get_package.js | 61 + .../artifact_registry.get_project_settings.js | 61 + .../artifact_registry.get_python_package.js | 61 + .../v1/artifact_registry.get_repository.js | 61 + .../v1/artifact_registry.get_rule.js | 61 + .../generated/v1/artifact_registry.get_tag.js | 60 + .../artifact_registry.get_v_p_c_s_c_config.js | 61 + .../v1/artifact_registry.get_version.js | 64 + .../artifact_registry.import_apt_artifacts.js | 65 + .../artifact_registry.import_yum_artifacts.js | 65 + .../v1/artifact_registry.list_attachments.js | 79 + .../artifact_registry.list_docker_images.js | 76 + .../v1/artifact_registry.list_files.js | 113 + .../artifact_registry.list_maven_artifacts.js | 72 + .../v1/artifact_registry.list_npm_packages.js | 72 + .../v1/artifact_registry.list_packages.js | 109 + .../artifact_registry.list_python_packages.js | 72 + .../v1/artifact_registry.list_repositories.js | 92 + .../v1/artifact_registry.list_rules.js | 73 + .../v1/artifact_registry.list_tags.js | 94 + .../v1/artifact_registry.list_versions.js | 112 + .../v1/artifact_registry.set_iam_policy.js | 77 + .../artifact_registry.test_iam_permissions.js | 70 + .../v1/artifact_registry.update_file.js | 68 + .../v1/artifact_registry.update_package.js | 66 + ...tifact_registry.update_project_settings.js | 64 + .../v1/artifact_registry.update_repository.js | 66 + .../v1/artifact_registry.update_rule.js | 66 + .../v1/artifact_registry.update_tag.js | 66 + ...tifact_registry.update_v_p_c_s_c_config.js | 64 + .../v1/artifact_registry.update_version.js | 67 + ...a_google.devtools.artifactregistry.v1.json | 2267 + .../artifact_registry.create_repository.js | 70 + .../v1beta2/artifact_registry.create_tag.js | 68 + .../artifact_registry.delete_package.js | 61 + .../artifact_registry.delete_repository.js | 62 + .../v1beta2/artifact_registry.delete_tag.js | 60 + .../artifact_registry.delete_version.js | 66 + .../v1beta2/artifact_registry.get_file.js | 60 + .../artifact_registry.get_iam_policy.js | 67 + .../v1beta2/artifact_registry.get_package.js | 60 + .../artifact_registry.get_project_settings.js | 61 + .../artifact_registry.get_repository.js | 61 + .../v1beta2/artifact_registry.get_tag.js | 60 + .../v1beta2/artifact_registry.get_version.js | 64 + .../artifact_registry.import_apt_artifacts.js | 65 + .../artifact_registry.import_yum_artifacts.js | 65 + .../v1beta2/artifact_registry.list_files.js | 83 + .../artifact_registry.list_packages.js | 71 + .../artifact_registry.list_repositories.js | 71 + .../v1beta2/artifact_registry.list_tags.js | 79 + .../artifact_registry.list_versions.js | 78 + .../artifact_registry.set_iam_policy.js | 77 + .../artifact_registry.test_iam_permissions.js | 70 + ...tifact_registry.update_project_settings.js | 64 + .../artifact_registry.update_repository.js | 66 + .../v1beta2/artifact_registry.update_tag.js | 66 + ...gle.devtools.artifactregistry.v1beta2.json | 1131 + .../src/index.ts | 28 + .../src/v1/artifact_registry_client.ts | 8608 ++ .../v1/artifact_registry_client_config.json | 276 + .../src/v1/artifact_registry_proto_list.json | 19 + .../src/v1/gapic_metadata.json | 567 + .../src/v1/index.ts | 19 + .../src/v1beta2/artifact_registry_client.ts | 4020 + .../artifact_registry_client_config.json | 149 + .../v1beta2/artifact_registry_proto_list.json | 11 + .../src/v1beta2/gapic_metadata.json | 293 + .../src/v1beta2/index.ts | 19 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 32 + .../system-test/install.ts | 49 + .../test/gapic_artifact_registry_v1.ts | 9086 ++ .../test/gapic_artifact_registry_v1beta2.ts | 4481 + .../tsconfig.json | 22 + .../webpack.config.js | 64 + 137 files changed, 150419 insertions(+) create mode 100644 owl-bot-staging/google-devtools-artifactregistry/.eslintignore create mode 100644 owl-bot-staging/google-devtools-artifactregistry/.eslintrc.json create mode 100644 owl-bot-staging/google-devtools-artifactregistry/.gitattributes create mode 100644 owl-bot-staging/google-devtools-artifactregistry/.gitignore create mode 100644 owl-bot-staging/google-devtools-artifactregistry/.jsdoc.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/.mocharc.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/.nycrc create mode 100644 owl-bot-staging/google-devtools-artifactregistry/.prettierignore create mode 100644 owl-bot-staging/google-devtools-artifactregistry/.prettierrc.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/CODE_OF_CONDUCT.md create mode 100644 owl-bot-staging/google-devtools-artifactregistry/CONTRIBUTING.md create mode 100644 owl-bot-staging/google-devtools-artifactregistry/LICENSE create mode 100644 owl-bot-staging/google-devtools-artifactregistry/README.md create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/apt_artifact.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/artifact.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/attachment.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/export.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/file.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/generic.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/go.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/kfp_artifact.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/package.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/repository.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/rule.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/settings.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/tag.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/vpcsc_config.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/yum_artifact.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/apt_artifact.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/file.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/package.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/repository.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/service.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/settings.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/tag.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/version.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/yum_artifact.proto create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/protos.d.ts create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/protos.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/protos.json create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.batch_delete_versions.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_attachment.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_repository.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_rule.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_tag.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_attachment.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_file.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_package.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_repository.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_rule.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_tag.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_version.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.export_artifact.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_attachment.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_docker_image.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_file.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_iam_policy.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_maven_artifact.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_npm_package.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_package.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_project_settings.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_python_package.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_repository.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_rule.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_tag.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_v_p_c_s_c_config.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_version.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_apt_artifacts.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_yum_artifacts.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_attachments.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_docker_images.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_files.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_maven_artifacts.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_npm_packages.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_packages.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_python_packages.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_rules.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_tags.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_versions.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.set_iam_policy.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.test_iam_permissions.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_file.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_package.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_project_settings.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_repository.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_rule.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_tag.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_v_p_c_s_c_config.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_version.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_repository.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_tag.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_package.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_repository.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_tag.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_version.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_file.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_iam_policy.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_package.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_project_settings.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_repository.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_tag.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_version.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_apt_artifacts.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_yum_artifacts.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_files.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_packages.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_repositories.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_tags.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_versions.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.set_iam_policy.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_project_settings.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_repository.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_tag.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json create mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/index.ts create mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts create mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client_config.json create mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_proto_list.json create mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1/index.ts create mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts create mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client_config.json create mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_proto_list.json create mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/gapic_metadata.json create mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/index.ts create mode 100644 owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-devtools-artifactregistry/system-test/install.ts create mode 100644 owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts create mode 100644 owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts create mode 100644 owl-bot-staging/google-devtools-artifactregistry/tsconfig.json create mode 100644 owl-bot-staging/google-devtools-artifactregistry/webpack.config.js diff --git a/owl-bot-staging/google-devtools-artifactregistry/.eslintignore b/owl-bot-staging/google-devtools-artifactregistry/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-devtools-artifactregistry/.eslintrc.json b/owl-bot-staging/google-devtools-artifactregistry/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/.gitattributes b/owl-bot-staging/google-devtools-artifactregistry/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/owl-bot-staging/google-devtools-artifactregistry/.gitignore b/owl-bot-staging/google-devtools-artifactregistry/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/owl-bot-staging/google-devtools-artifactregistry/.jsdoc.js b/owl-bot-staging/google-devtools-artifactregistry/.jsdoc.js new file mode 100644 index 00000000000..322c1ff7a8c --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2025 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'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2025 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/artifact-registry', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-devtools-artifactregistry/.mocharc.js b/owl-bot-staging/google-devtools-artifactregistry/.mocharc.js new file mode 100644 index 00000000000..24e9d15257f --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2025 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. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/owl-bot-staging/google-devtools-artifactregistry/.nycrc b/owl-bot-staging/google-devtools-artifactregistry/.nycrc new file mode 100644 index 00000000000..81a95fc94b0 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} \ No newline at end of file diff --git a/owl-bot-staging/google-devtools-artifactregistry/.prettierignore b/owl-bot-staging/google-devtools-artifactregistry/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/owl-bot-staging/google-devtools-artifactregistry/.prettierrc.js b/owl-bot-staging/google-devtools-artifactregistry/.prettierrc.js new file mode 100644 index 00000000000..d89a632f90b --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2025 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. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/CODE_OF_CONDUCT.md b/owl-bot-staging/google-devtools-artifactregistry/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/owl-bot-staging/google-devtools-artifactregistry/CONTRIBUTING.md b/owl-bot-staging/google-devtools-artifactregistry/CONTRIBUTING.md new file mode 100644 index 00000000000..c272f8d9345 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Artifactregistry API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=artifactregistry.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/owl-bot-staging/google-devtools-artifactregistry/LICENSE b/owl-bot-staging/google-devtools-artifactregistry/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/owl-bot-staging/google-devtools-artifactregistry/README.md b/owl-bot-staging/google-devtools-artifactregistry/README.md new file mode 100644 index 00000000000..d3240ef1dc0 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/README.md @@ -0,0 +1,190 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "The comments you see below are used to generate those parts of the template in later states." +Google Cloud Platform logo + +# [Artifact Registry API: Nodejs Client][homepage] + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **stable** libraries +are addressed with the highest priority + +[![npm version](https://img.shields.io/npm/v/@google-cloud/artifact-registry.svg)](https://www.npmjs.org/package/@google-cloud/artifact-registry) + +Artifact Registry API client for Node.js + +[//]: # "partials.introduction" + +A comprehensive list of changes in each version may be found in +[the CHANGELOG][homepage_changelog]. + +* [Artifact Registry API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/artifactregistry/latest) + + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Artifact Registry API API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. +### Installing the client library + +```bash +npm install @google-cloud/artifact-registry +``` + +[//]: # "partials.body" + +## Samples + +Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | +| --------------------------- | --------------------------------- | +| batch delete versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.batch_delete_versions.js) | +| create attachment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_attachment.js) | +| create repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_repository.js) | +| create rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_rule.js) | +| create tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_tag.js) | +| delete attachment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_attachment.js) | +| delete file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_file.js) | +| delete package | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_package.js) | +| delete repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_repository.js) | +| delete rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_rule.js) | +| delete tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_tag.js) | +| delete version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_version.js) | +| export artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.export_artifact.js) | +| get attachment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_attachment.js) | +| get docker image | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_docker_image.js) | +| get file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_file.js) | +| get iam policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_iam_policy.js) | +| get maven artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_maven_artifact.js) | +| get npm package | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_npm_package.js) | +| get package | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_package.js) | +| get project settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_project_settings.js) | +| get python package | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_python_package.js) | +| get repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_repository.js) | +| get rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_rule.js) | +| get tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_tag.js) | +| get v p c s c config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_v_p_c_s_c_config.js) | +| get version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_version.js) | +| import apt artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_apt_artifacts.js) | +| import yum artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_yum_artifacts.js) | +| list attachments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_attachments.js) | +| list docker images | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_docker_images.js) | +| list files | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_files.js) | +| list maven artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_maven_artifacts.js) | +| list npm packages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_npm_packages.js) | +| list packages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_packages.js) | +| list python packages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_python_packages.js) | +| list repositories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js) | +| list rules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_rules.js) | +| list tags | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_tags.js) | +| list versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_versions.js) | +| set iam policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.set_iam_policy.js) | +| test iam permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.test_iam_permissions.js) | +| update file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_file.js) | +| update package | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_package.js) | +| update project settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_project_settings.js) | +| update repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_repository.js) | +| update rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_rule.js) | +| update tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_tag.js) | +| update v p c s c config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_v_p_c_s_c_config.js) | +| update version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_version.js) | +| devtools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json) | +| create repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_repository.js) | +| create tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_tag.js) | +| delete package | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_package.js) | +| delete repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_repository.js) | +| delete tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_tag.js) | +| delete version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_version.js) | +| get file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_file.js) | +| get iam policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_iam_policy.js) | +| get package | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_package.js) | +| get project settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_project_settings.js) | +| get repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_repository.js) | +| get tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_tag.js) | +| get version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_version.js) | +| import apt artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_apt_artifacts.js) | +| import yum artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_yum_artifacts.js) | +| list files | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_files.js) | +| list packages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_packages.js) | +| list repositories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_repositories.js) | +| list tags | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_tags.js) | +| list versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_versions.js) | +| set iam policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.set_iam_policy.js) | +| test iam permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js) | +| update project settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_project_settings.js) | +| update repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_repository.js) | +| update tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_tag.js) | +| devtools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json) | + + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/artifact-registry@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/CONTRIBUTING.md). + +Please note that this `README.md` +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/LICENSE) + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=artifactregistry.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples +[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/CHANGELOG.md +[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/apt_artifact.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/apt_artifact.proto new file mode 100644 index 00000000000..c9da2a5d7be --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/apt_artifact.proto @@ -0,0 +1,114 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "AptArtifactProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// A detailed representation of an Apt artifact. Information in the record +// is derived from the archive's control file. +// See https://www.debian.org/doc/debian-policy/ch-controlfields.html +message AptArtifact { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/AptArtifact" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}" + }; + + // Package type is either binary or source. + enum PackageType { + // Package type is not specified. + PACKAGE_TYPE_UNSPECIFIED = 0; + + // Binary package. + BINARY = 1; + + // Source package. + SOURCE = 2; + } + + // Output only. The Artifact Registry resource name of the artifact. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Apt package name of the artifact. + string package_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. An artifact is a binary or source package. + PackageType package_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Operating system architecture of the artifact. + string architecture = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Repository component of the artifact. + string component = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Contents of the artifact's control metadata file. + bytes control_file = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Google Cloud Storage location where the artifacts currently reside. +message ImportAptArtifactsGcsSource { + // Cloud Storage paths URI (e.g., gs://my_bucket//my_object). + repeated string uris = 1; + + // Supports URI wildcards for matching multiple objects from a single URI. + bool use_wildcards = 2; +} + +// The request to import new apt artifacts. +message ImportAptArtifactsRequest { + // The source location of the package binaries. + oneof source { + // Google Cloud Storage location where input content is located. + ImportAptArtifactsGcsSource gcs_source = 2; + } + + // The name of the parent resource where the artifacts will be imported. + string parent = 1; +} + +// Error information explaining why a package was not imported. +message ImportAptArtifactsErrorInfo { + // The source that was not imported. + oneof source { + // Google Cloud Storage location requested. + ImportAptArtifactsGcsSource gcs_source = 1; + } + + // The detailed error status. + google.rpc.Status error = 2; +} + +// The response message from importing APT artifacts. +message ImportAptArtifactsResponse { + // The Apt artifacts imported. + repeated AptArtifact apt_artifacts = 1; + + // Detailed error info for packages that were not imported. + repeated ImportAptArtifactsErrorInfo errors = 2; +} + +// The operation metadata for importing artifacts. +message ImportAptArtifactsMetadata {} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/artifact.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/artifact.proto new file mode 100644 index 00000000000..691638efd8d --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/artifact.proto @@ -0,0 +1,399 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "ArtifactProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// DockerImage represents a docker artifact. +// The following fields are returned as untyped metadata in the Version +// resource, using camelcase keys (i.e. metadata.imageSizeBytes): +// * imageSizeBytes +// * mediaType +// * buildTime +message DockerImage { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/DockerImage" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}" + }; + + // Required. registry_location, project_id, repository_name and image id forms + // a unique image + // name:`projects//locations//repositories//dockerImages/`. + // For example, + // "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ + // nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", + // where "us-west4" is the registry_location, "test-project" is the + // project_id, "test-repo" is the repository_name and + // "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" + // is the image's digest. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. URL to access the image. + // Example: + // us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf + string uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Tags attached to this image. + repeated string tags = 3; + + // Calculated size of the image. + // This field is returned as the 'metadata.imageSizeBytes' field in the + // Version resource. + int64 image_size_bytes = 4; + + // Time the image was uploaded. + google.protobuf.Timestamp upload_time = 5; + + // Media type of this image, e.g. + // "application/vnd.docker.distribution.manifest.v2+json". + // This field is returned as the 'metadata.mediaType' field in the + // Version resource. + string media_type = 6; + + // The time this image was built. + // This field is returned as the 'metadata.buildTime' field in the + // Version resource. + // The build time is returned to the client as an RFC 3339 string, which can + // be easily used with the JavaScript Date constructor. + google.protobuf.Timestamp build_time = 7; + + // Output only. The time when the docker image was last updated. + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // ArtifactType of this image, e.g. "application/vnd.example+type". + // If the `subject_digest` is set and no `artifact_type` is given, the + // `media_type` will be considered as the `artifact_type`. This field is + // returned as the `metadata.artifactType` field in the Version resource. + string artifact_type = 9; + + // Optional. For multi-arch images (manifest lists), this field contains the + // list of image manifests. + repeated ImageManifest image_manifests = 11 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Details of a single image manifest within a multi-arch image. +message ImageManifest { + // Optional. The CPU architecture of the image. + // Values are provided by the Docker client and are not validated by Artifact + // Registry. Example values include "amd64", "arm64", "ppc64le", "s390x", + // "riscv64", "mips64le", etc. + string architecture = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The operating system of the image. + // Values are provided by the Docker client and are not validated by Artifact + // Registry. Example values include "linux", "windows", "darwin", "aix", etc. + string os = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The manifest digest, in the format "sha256:". + string digest = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The media type of the manifest, e.g., + // "application/vnd.docker.distribution.manifest.v2+json" + string media_type = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The OS version of the image, for example on Windows + // `10.0.14393.1066`. + string os_version = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The required OS features for the image, for example on Windows + // `win32k`. + repeated string os_features = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The variant of the CPU in the image, for example `v7` to specify + // ARMv7 when architecture is `arm`. + string variant = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request to list docker images. +message ListDockerImagesRequest { + // Required. The name of the parent resource whose docker images will be + // listed. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of artifacts to return. Maximum page size is 1,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; + + // The field to order the results by. + string order_by = 4; +} + +// The response from listing docker images. +message ListDockerImagesResponse { + // The docker images returned. + repeated DockerImage docker_images = 1; + + // The token to retrieve the next page of artifacts, or empty if there are no + // more artifacts to return. + string next_page_token = 2; +} + +// The request to get docker images. +message GetDockerImageRequest { + // Required. The name of the docker images. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/DockerImage" + } + ]; +} + +// MavenArtifact represents a maven artifact. +message MavenArtifact { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/MavenArtifact" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}" + }; + + // Required. registry_location, project_id, repository_name and maven_artifact + // forms a unique artifact For example, + // "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/ + // com.google.guava:guava:31.0-jre", + // where "us-west4" is the registry_location, "test-project" is the + // project_id, "test-repo" is the repository_name and + // "com.google.guava:guava:31.0-jre" + // is the maven artifact. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. URL to access the pom file of the artifact. + // Example: + // us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom + string pom_uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Group ID for the artifact. + // Example: + // com.google.guava + string group_id = 3; + + // Artifact ID for the artifact. + string artifact_id = 4; + + // Version of this artifact. + string version = 5; + + // Output only. Time the artifact was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the artifact was updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request to list maven artifacts. +message ListMavenArtifactsRequest { + // Required. The name of the parent resource whose maven artifacts will be + // listed. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/MavenArtifact" + } + ]; + + // The maximum number of artifacts to return. Maximum page size is 1,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; +} + +// The response from listing maven artifacts. +message ListMavenArtifactsResponse { + // The maven artifacts returned. + repeated MavenArtifact maven_artifacts = 1; + + // The token to retrieve the next page of artifacts, or empty if there are no + // more artifacts to return. + string next_page_token = 2; +} + +// The request to get maven artifacts. +message GetMavenArtifactRequest { + // Required. The name of the maven artifact. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/MavenArtifact" + } + ]; +} + +// NpmPackage represents an npm artifact. +message NpmPackage { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/NpmPackage" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}" + }; + + // Required. registry_location, project_id, repository_name and npm_package + // forms a unique package For example, + // "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ + // npm_test:1.0.0", + // where "us-west4" is the registry_location, "test-project" is the + // project_id, "test-repo" is the repository_name and + // npm_test:1.0.0" is the npm package. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Package for the artifact. + string package_name = 3; + + // Version of this package. + string version = 4; + + // Tags attached to this package. + repeated string tags = 5; + + // Output only. Time the package was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the package was updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request to list npm packages. +message ListNpmPackagesRequest { + // Required. The name of the parent resource whose npm packages will be + // listed. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/NpmPackage" + } + ]; + + // The maximum number of artifacts to return. Maximum page size is 1,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; +} + +// The response from listing npm packages. +message ListNpmPackagesResponse { + // The npm packages returned. + repeated NpmPackage npm_packages = 1; + + // The token to retrieve the next page of artifacts, or empty if there are no + // more artifacts to return. + string next_page_token = 2; +} + +// The request to get npm packages. +message GetNpmPackageRequest { + // Required. The name of the npm package. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/NpmPackage" + } + ]; +} + +// PythonPackage represents a python artifact. +message PythonPackage { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/PythonPackage" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}" + }; + + // Required. registry_location, project_id, repository_name and python_package + // forms a unique package + // name:`projects//locations//repository//pythonPackages/`. + // For example, + // "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/ + // python_package:1.0.0", + // where "us-west4" is the registry_location, "test-project" is the + // project_id, "test-repo" is the repository_name and + // python_package:1.0.0" is the python package. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. URL to access the package. + // Example: + // us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz + string uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Package for the artifact. + string package_name = 3; + + // Version of this package. + string version = 4; + + // Output only. Time the package was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the package was updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request to list python packages. +message ListPythonPackagesRequest { + // Required. The name of the parent resource whose python packages will be + // listed. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/PythonPackage" + } + ]; + + // The maximum number of artifacts to return. Maximum page size is 1,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; +} + +// The response from listing python packages. +message ListPythonPackagesResponse { + // The python packages returned. + repeated PythonPackage python_packages = 1; + + // The token to retrieve the next page of artifacts, or empty if there are no + // more artifacts to return. + string next_page_token = 2; +} + +// The request to get python packages. +message GetPythonPackageRequest { + // Required. The name of the python package. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/PythonPackage" + } + ]; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/attachment.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/attachment.proto new file mode 100644 index 00000000000..7f283f684a8 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/attachment.proto @@ -0,0 +1,160 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "AttachmentProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// An Attachment refers to additional metadata that can be attached to +// artifacts in Artifact Registry. An attachment consists of one or more files. +message Attachment { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/Attachment" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/attachments/{attachment}" + }; + + // The name of the attachment. E.g. + // `projects/p1/locations/us/repositories/repo/attachments/sbom`. + string name = 1; + + // Required. The target the attachment is for, can be a Version, Package or + // Repository. E.g. + // `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. + string target = 2 [(google.api.field_behavior) = REQUIRED]; + + // Type of attachment. + // E.g. `application/vnd.spdx+json` + string type = 3; + + // The namespace this attachment belongs to. + // E.g. If an attachment is created by artifact analysis, namespace is set + // to `artifactanalysis.googleapis.com`. + string attachment_namespace = 4; + + // Optional. User annotations. These attributes can only be set and used by + // the user, and not by Artifact Registry. See + // https://google.aip.dev/128#annotations for more details such as format and + // size limitations. + map annotations = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the attachment was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the attachment was last updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The files that belong to this attachment. + // If the file ID part contains slashes, they are escaped. E.g. + // `projects/p1/locations/us-central1/repositories/repo1/files/sha:`. + repeated string files = 8 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/File" + } + ]; + + // Output only. The name of the OCI version that this attachment created. Only + // populated for Docker attachments. E.g. + // `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. + string oci_version_name = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request to list attachments. +message ListAttachmentsRequest { + // Required. The name of the parent resource whose attachments will be listed. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/Attachment" + } + ]; + + // Optional. An expression for filtering the results of the request. Filter + // rules are case insensitive. The fields eligible for filtering are: + // + // * `target` + // * `type` + // * `attachment_namespace` + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // The maximum number of attachments to return. Maximum page size is 1,000. + int32 page_size = 3; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 4; +} + +// The response from listing attachments. +message ListAttachmentsResponse { + // The attachments returned. + repeated Attachment attachments = 1; + + // The token to retrieve the next page of attachments, or empty if there are + // no more attachments to return. + string next_page_token = 2; +} + +// The request to retrieve an attachment. +message GetAttachmentRequest { + // Required. The name of the attachment to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Attachment" + } + ]; +} + +// The request to create a new attachment. +message CreateAttachmentRequest { + // Required. The name of the parent resource where the attachment will be + // created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/Attachment" + } + ]; + + // Required. The attachment id to use for this attachment. + string attachment_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The attachment to be created. + Attachment attachment = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request to delete an attachment. +message DeleteAttachmentRequest { + // Required. The name of the attachment to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Attachment" + } + ]; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/export.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/export.proto new file mode 100644 index 00000000000..2e89c126a96 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/export.proto @@ -0,0 +1,99 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/devtools/artifactregistry/v1/file.proto"; +import "google/devtools/artifactregistry/v1/version.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "ExportProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// The request for exporting an artifact to a destination. +message ExportArtifactRequest { + // The artifact to be exported. + oneof source_artifact { + // The artifact version to export. + // Format: + // projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version} + string source_version = 2 [(google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Version" + }]; + + // The artifact tag to export. + // Format:projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag} + string source_tag = 4 [(google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Tag" + }]; + } + + // The destination to export the artifact to. + oneof destination { + // The Cloud Storage path to export the artifact to. Should start with the + // bucket name, and optionally have a directory path. Examples: + // `dst_bucket`, `dst_bucket/sub_dir`. + // Existing objects with the same path will be overwritten. + string gcs_path = 3; + } + + // Required. The repository of the artifact to export. + // Format: projects/{project}/locations/{location}/repositories/{repository} + string repository = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Repository" + } + ]; +} + +// The response for exporting an artifact to a destination. +message ExportArtifactResponse { + // The exported version. Should be the same as the request version with + // fingerprint resource name. + Version exported_version = 1; +} + +// The LRO metadata for exporting an artifact. +message ExportArtifactMetadata { + // The exported artifact file. + message ExportedFile { + // The destination the file was exported to. + oneof destination { + // Cloud Storage Object path of the exported file. Examples: + // `dst_bucket/file1`, `dst_bucket/sub_dir/file1` + string gcs_object_path = 2; + } + + // Name of the exported artifact file. + // Format: `projects/p1/locations/us/repositories/repo1/files/file1` + string name = 1 [(google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/File" + }]; + + // The hashes of the file content. + repeated Hash hashes = 3; + } + + // The exported artifact files. + repeated ExportedFile exported_files = 1; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/file.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/file.proto new file mode 100644 index 00000000000..35b3ebde6f8 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/file.proto @@ -0,0 +1,206 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "FileProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// A hash of file content. +message Hash { + // The algorithm used to compute the hash. + enum HashType { + // Unspecified. + HASH_TYPE_UNSPECIFIED = 0; + + // SHA256 hash. + SHA256 = 1; + + // MD5 hash. + MD5 = 2; + } + + // The algorithm used to compute the hash value. + HashType type = 1; + + // The hash value. + bytes value = 2; +} + +// Files store content that is potentially associated with Packages or Versions. +message File { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/File" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/files/{file}" + }; + + // The name of the file, for example: + // `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`. + // If the file ID part contains slashes, they are escaped. + string name = 1; + + // The size of the File in bytes. + int64 size_bytes = 3; + + // The hashes of the file content. + repeated Hash hashes = 4; + + // Output only. The time when the File was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the File was last updated. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The name of the Package or Version that owns this file, if any. + string owner = 7; + + // Output only. The time when the last attempt to refresh the file's data was + // made. Only set when the repository is remote. + google.protobuf.Timestamp fetch_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Client specified annotations. + map annotations = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request to list files. +message ListFilesRequest { + // Required. The name of the repository whose files will be listed. For + // example: "projects/p1/locations/us-central1/repositories/repo1 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/File" + } + ]; + + // An expression for filtering the results of the request. Filter rules are + // case insensitive. The fields eligible for filtering are: + // + // * `name` + // * `owner` + // * `annotations` + // + // Examples of using a filter: + // + // To filter the results of your request to files with the name `my_file.txt` + // in project `my-project` in the `us-central` region, in repository + // `my-repo`, append the following filter expression to your request: + // + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` + // + // You can also use wildcards to match any number of characters before or + // after the value: + // + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` + // + // To filter the results of your request to files owned by the version `1.0` + // in package `pkg1`, append the following filter expression to your request: + // + // * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + // + // To filter the results of your request to files with the annotation + // key-value pair [`external_link`: `external_link_value`], append the + // following filter expression to your request: + // + // * `"annotations.external_link:external_link_value"` + // + // To filter just for a specific annotation key `external_link`, append the + // following filter expression to your request: + // + // * `"annotations.external_link"` + // + // If the annotation key or value contains special characters, you can escape + // them by surrounding the value with backticks. For example, to filter the + // results of your request to files with the annotation key-value pair + // [`external.link`:`https://example.com/my-file`], append the following + // filter expression to your request: + // + // * `` "annotations.`external.link`:`https://example.com/my-file`" `` + // + // You can also filter with annotations with a wildcard to + // match any number of characters before or after the value: + // + // * `` "annotations.*_link:`*example.com*`" `` + string filter = 4; + + // The maximum number of files to return. Maximum page size is 1,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; + + // The field to order the results by. + string order_by = 5; +} + +// The response from listing files. +message ListFilesResponse { + // The files returned. + repeated File files = 1; + + // The token to retrieve the next page of files, or empty if there are no + // more files to return. + string next_page_token = 2; +} + +// The request to retrieve a file. +message GetFileRequest { + // Required. The name of the file to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/File" + } + ]; +} + +// The request to delete a file. +message DeleteFileRequest { + // Required. The name of the file to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/File" + } + ]; +} + +// The request to update a file. +message UpdateFileRequest { + // Required. The File that replaces the resource on the server. + File file = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. For the `FieldMask` + // definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/generic.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/generic.proto new file mode 100644 index 00000000000..b26f31a9e78 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/generic.proto @@ -0,0 +1,55 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "GenericProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// GenericArtifact represents a generic artifact +message GenericArtifact { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/GenericArtifact" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/genericArtifacts/{generic_artifact}" + }; + + // Resource name of the generic artifact. + // project, location, repository, package_id and version_id + // create a unique generic artifact. + // i.e. "projects/test-project/locations/us-west4/repositories/test-repo/ + // genericArtifacts/package_id:version_id" + string name = 1; + + // The version of the generic artifact. + string version = 2; + + // Output only. The time when the Generic module is created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the Generic module is updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/go.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/go.proto new file mode 100644 index 00000000000..0f459b4f1cf --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/go.proto @@ -0,0 +1,52 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "GoProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// GoModule represents a Go module. +message GoModule { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/GoModule" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/goModules/{go_module}" + }; + + // The resource name of a Go module. + string name = 1; + + // The version of the Go module. Must be a valid canonical version as defined + // in https://go.dev/ref/mod#glos-canonical-version. + string version = 2; + + // Output only. The time when the Go module is created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the Go module is updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/kfp_artifact.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/kfp_artifact.proto new file mode 100644 index 00000000000..94641accdbb --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/kfp_artifact.proto @@ -0,0 +1,46 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "KfpArtifactProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// A detailed representation of a KFP artifact. +message KfpArtifact { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/KfpArtifact" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/kfpArtifacts/{kfp_artifact}" + }; + + // Output only. Resource name of the KFP artifact. Since users don't directly + // interact with this resource, the name will be derived from the associated + // version. For example, when version = ".../versions/sha256:abcdef...", the + // name will be ".../kfpArtifacts/sha256:abcdef...". + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The version associated with the KFP artifact. Must follow the Semantic + // Versioning standard. + string version = 2; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/package.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/package.proto new file mode 100644 index 00000000000..35ae37ef1e5 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/package.proto @@ -0,0 +1,166 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "PackageProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// Packages are named collections of versions. +message Package { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/Package" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}" + }; + + // The name of the package, for example: + // `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. + // If the package ID part contains slashes, the slashes are escaped. + string name = 1; + + // The display name of the package. + string display_name = 2; + + // The time when the package was created. + google.protobuf.Timestamp create_time = 5; + + // The time when the package was last updated. This includes publishing a new + // version of the package. + google.protobuf.Timestamp update_time = 6; + + // Optional. Client specified annotations. + map annotations = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request to list packages. +message ListPackagesRequest { + // Required. The name of the parent resource whose packages will be listed. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/Package" + } + ]; + + // The maximum number of packages to return. Maximum page size is 1,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; + + // Optional. An expression for filtering the results of the request. Filter + // rules are case insensitive. The fields eligible for filtering are: + // + // * `name` + // * `annotations` + // + // Examples of using a filter: + // + // To filter the results of your request to packages with the name + // `my-package` in project `my-project` in the `us-central` region, in + // repository `my-repo`, append the following filter expression to your + // request: + // + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` + // + // You can also use wildcards to match any number of characters before or + // after the value: + // + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` + // + // To filter the results of your request to packages with the annotation + // key-value pair [`external_link`: `external_link_value`], append the + // following filter expression to your request": + // + // * `"annotations.external_link:external_link_value"` + // + // To filter the results just for a specific annotation key `external_link`, + // append the following filter expression to your request: + // + // * `"annotations.external_link"` + // + // If the annotation key or value contains special characters, you can escape + // them by surrounding the value with backticks. For example, to filter the + // results of your request to packages with the annotation key-value pair + // [`external.link`:`https://example.com/my-package`], append the following + // filter expression to your request: + // + // * `` "annotations.`external.link`:`https://example.com/my-package`" `` + // + // You can also filter with annotations with a wildcard to + // match any number of characters before or after the value: + // + // * `` "annotations.*_link:`*example.com*`" `` + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The field to order the results by. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from listing packages. +message ListPackagesResponse { + // The packages returned. + repeated Package packages = 1; + + // The token to retrieve the next page of packages, or empty if there are no + // more packages to return. + string next_page_token = 2; +} + +// The request to retrieve a package. +message GetPackageRequest { + // Required. The name of the package to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Package" + } + ]; +} + +// The request to delete a package. +message DeletePackageRequest { + // Required. The name of the package to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Package" + } + ]; +} + +// The request to update a package. +message UpdatePackageRequest { + // The package that replaces the resource on the server. + Package package = 1; + + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 2; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/repository.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/repository.proto new file mode 100644 index 00000000000..40fc30a008a --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/repository.proto @@ -0,0 +1,765 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "RepositoryProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; +option (google.api.resource_definition) = { + type: "secretmanager.googleapis.com/SecretVersion" + pattern: "projects/{project}/secrets/{secret}/versions/{secret_version}" +}; +option (google.api.resource_definition) = { + type: "servicedirectory.googleapis.com/Service" + pattern: "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}" +}; + +// Artifact policy configuration for the repository contents. +message UpstreamPolicy { + // The user-provided ID of the upstream policy. + string id = 1; + + // A reference to the repository resource, for example: + // `projects/p1/locations/us-central1/repositories/repo1`. + string repository = 2 [(google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Repository" + }]; + + // Entries with a greater priority value take precedence in the pull order. + int32 priority = 3; +} + +// CleanupPolicyCondition is a set of conditions attached to a CleanupPolicy. +// If multiple entries are set, all must be satisfied for the condition to be +// satisfied. +message CleanupPolicyCondition { + // Statuses applying to versions. + enum TagState { + // Tag status not specified. + TAG_STATE_UNSPECIFIED = 0; + + // Applies to tagged versions only. + TAGGED = 1; + + // Applies to untagged versions only. + UNTAGGED = 2; + + // Applies to all versions. + ANY = 3; + } + + // Match versions by tag status. + optional TagState tag_state = 2; + + // Match versions by tag prefix. Applied on any prefix match. + repeated string tag_prefixes = 3; + + // Match versions by version name prefix. Applied on any prefix match. + repeated string version_name_prefixes = 4; + + // Match versions by package prefix. Applied on any prefix match. + repeated string package_name_prefixes = 5; + + // Match versions older than a duration. + optional google.protobuf.Duration older_than = 6; + + // Match versions newer than a duration. + optional google.protobuf.Duration newer_than = 7; +} + +// CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy +// for retaining a minimum number of versions. +message CleanupPolicyMostRecentVersions { + // List of package name prefixes that will apply this rule. + repeated string package_name_prefixes = 1; + + // Minimum number of versions to keep. + optional int32 keep_count = 2; +} + +// Artifact policy configuration for repository cleanup policies. +message CleanupPolicy { + // Action type for a cleanup policy. + enum Action { + // Action not specified. + ACTION_UNSPECIFIED = 0; + + // Delete action. + DELETE = 1; + + // Keep action. + KEEP = 2; + } + + oneof condition_type { + // Policy condition for matching versions. + CleanupPolicyCondition condition = 2; + + // Policy condition for retaining a minimum number of versions. May only be + // specified with a Keep action. + CleanupPolicyMostRecentVersions most_recent_versions = 4; + } + + // The user-provided ID of the cleanup policy. + string id = 1; + + // Policy action. + Action action = 3; +} + +// Virtual repository configuration. +message VirtualRepositoryConfig { + // Policies that configure the upstream artifacts distributed by the Virtual + // Repository. Upstream policies cannot be set on a standard repository. + repeated UpstreamPolicy upstream_policies = 1; +} + +// Remote repository configuration. +message RemoteRepositoryConfig { + // The credentials to access the remote repository. + message UpstreamCredentials { + // Username and password credentials. + message UsernamePasswordCredentials { + // The username to access the remote repository. + string username = 1; + + // The Secret Manager key version that holds the password to access the + // remote repository. Must be in the format of + // `projects/{project}/secrets/{secret}/versions/{version}`. + string password_secret_version = 2 [(google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + }]; + } + + oneof credentials { + // Use username and password to access the remote repository. + UsernamePasswordCredentials username_password_credentials = 1; + } + } + + // Configuration for a Docker remote repository. + message DockerRepository { + // Customer-specified publicly available remote repository. + message CustomRepository { + // An http/https uri reference to the custom remote repository, for ex: + // "https://registry-1.docker.io". + string uri = 1; + } + + // Predefined list of publicly available Docker repositories like Docker + // Hub. + enum PublicRepository { + // Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0; + + // Docker Hub. + DOCKER_HUB = 1; + } + + // Address of the remote repository. + oneof upstream { + // One of the publicly available Docker repositories supported by Artifact + // Registry. + PublicRepository public_repository = 1; + + // Customer-specified remote repository. + CustomRepository custom_repository = 3; + } + } + + // Configuration for a Maven remote repository. + message MavenRepository { + // Customer-specified publicly available remote repository. + message CustomRepository { + // An http/https uri reference to the upstream remote repository, for ex: + // "https://my.maven.registry/". + string uri = 1; + } + + // Predefined list of publicly available Maven repositories like Maven + // Central. + enum PublicRepository { + // Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0; + + // Maven Central. + MAVEN_CENTRAL = 1; + } + + // Address of the remote repository. + oneof upstream { + // One of the publicly available Maven repositories supported by Artifact + // Registry. + PublicRepository public_repository = 1; + + // Customer-specified remote repository. + CustomRepository custom_repository = 3; + } + } + + // Configuration for a Npm remote repository. + message NpmRepository { + // Customer-specified publicly available remote repository. + message CustomRepository { + // An http/https uri reference to the upstream remote repository, for ex: + // "https://my.npm.registry/". + string uri = 1; + } + + // Predefined list of publicly available NPM repositories like npmjs. + enum PublicRepository { + // Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0; + + // npmjs. + NPMJS = 1; + } + + // Address of the remote repository + oneof upstream { + // One of the publicly available Npm repositories supported by Artifact + // Registry. + PublicRepository public_repository = 1; + + // Customer-specified remote repository. + CustomRepository custom_repository = 3; + } + } + + // Configuration for a Python remote repository. + message PythonRepository { + // Customer-specified publicly available remote repository. + message CustomRepository { + // An http/https uri reference to the upstream remote repository, for ex: + // "https://my.python.registry/". + string uri = 1; + } + + // Predefined list of publicly available Python repositories like PyPI.org. + enum PublicRepository { + // Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0; + + // PyPI. + PYPI = 1; + } + + // Address of the remote repository. + oneof upstream { + // One of the publicly available Python repositories supported by Artifact + // Registry. + PublicRepository public_repository = 1; + + // Customer-specified remote repository. + CustomRepository custom_repository = 3; + } + } + + // Configuration for an Apt remote repository. + message AptRepository { + // Publicly available Apt repositories constructed from a common repository + // base and a custom repository path. + message PublicRepository { + // Predefined list of publicly available repository bases for Apt. + enum RepositoryBase { + // Unspecified repository base. + REPOSITORY_BASE_UNSPECIFIED = 0; + + // Debian. + DEBIAN = 1; + + // Ubuntu LTS/Pro. + UBUNTU = 2; + + // Archived Debian. + DEBIAN_SNAPSHOT = 3; + } + + // A common public repository base for Apt. + RepositoryBase repository_base = 1; + + // A custom field to define a path to a specific repository from the base. + string repository_path = 2; + } + + // Customer-specified publicly available remote repository. + message CustomRepository { + // An http/https uri reference to the upstream remote repository, for ex: + // "https://my.apt.registry/". + string uri = 1; + } + + // Address of the remote repository. + oneof upstream { + // One of the publicly available Apt repositories supported by Artifact + // Registry. + PublicRepository public_repository = 1; + + // Customer-specified remote repository. + CustomRepository custom_repository = 3; + } + } + + // Configuration for a Yum remote repository. + message YumRepository { + // Publicly available Yum repositories constructed from a common repository + // base and a custom repository path. + message PublicRepository { + // Predefined list of publicly available repository bases for Yum. + enum RepositoryBase { + // Unspecified repository base. + REPOSITORY_BASE_UNSPECIFIED = 0; + + // CentOS. + CENTOS = 1; + + // CentOS Debug. + CENTOS_DEBUG = 2; + + // CentOS Vault. + CENTOS_VAULT = 3; + + // CentOS Stream. + CENTOS_STREAM = 4; + + // Rocky. + ROCKY = 5; + + // Fedora Extra Packages for Enterprise Linux (EPEL). + EPEL = 6; + } + + // A common public repository base for Yum. + RepositoryBase repository_base = 1; + + // A custom field to define a path to a specific repository from the base. + string repository_path = 2; + } + + // Customer-specified publicly available remote repository. + message CustomRepository { + // An http/https uri reference to the upstream remote repository, for ex: + // "https://my.yum.registry/". + string uri = 1; + } + + // Address of the remote repository. + oneof upstream { + // One of the publicly available Yum repositories supported by Artifact + // Registry. + PublicRepository public_repository = 1; + + // Customer-specified remote repository. + CustomRepository custom_repository = 3; + } + } + + // Common remote repository settings type. + message CommonRemoteRepository { + // Required. A common public repository base for remote repository. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Settings specific to the remote repository. + oneof remote_source { + // Specific settings for a Docker remote repository. + DockerRepository docker_repository = 2; + + // Specific settings for a Maven remote repository. + MavenRepository maven_repository = 3; + + // Specific settings for an Npm remote repository. + NpmRepository npm_repository = 4; + + // Specific settings for a Python remote repository. + PythonRepository python_repository = 5; + + // Specific settings for an Apt remote repository. + AptRepository apt_repository = 6; + + // Specific settings for a Yum remote repository. + YumRepository yum_repository = 7; + + // Common remote repository settings. + // Used as the remote repository upstream URL. + CommonRemoteRepository common_repository = 14; + } + + // The description of the remote source. + string description = 1; + + // Optional. The credentials used to access the remote repository. + UpstreamCredentials upstream_credentials = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Input only. A create/update remote repo option to avoid making a HEAD/GET + // request to validate a remote repo and any supplied upstream credentials. + bool disable_upstream_validation = 12 + [(google.api.field_behavior) = INPUT_ONLY]; +} + +// A Repository for storing artifacts with a specific format. +message Repository { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/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; + } + + // DockerRepositoryConfig is docker related repository details. + // Provides additional configuration details for repositories of the docker + // format type. + message DockerRepositoryConfig { + // The repository which enabled this flag prevents all tags from being + // modified, moved or deleted. This does not prevent tags from being + // created. + bool immutable_tags = 1; + } + + // Config on whether to perform vulnerability scanning for resources in this + // repository, as well as output fields describing current state. + message VulnerabilityScanningConfig { + // Config for vulnerability scanning of resources in this repository. + enum EnablementConfig { + // Not set. This will be treated as INHERITED for Docker repositories and + // DISABLED for non-Docker repositories. + ENABLEMENT_CONFIG_UNSPECIFIED = 0; + + // Scanning is Enabled, but dependent on API enablement. + INHERITED = 1; + + // No automatic vulnerability scanning will be performed for this + // repository. + DISABLED = 2; + } + + // Describes the state of vulnerability scanning in this repository, + // including both repository enablement and API enablement. + enum EnablementState { + // Enablement state is unclear. + ENABLEMENT_STATE_UNSPECIFIED = 0; + + // Repository does not support vulnerability scanning. + SCANNING_UNSUPPORTED = 1; + + // Vulnerability scanning is disabled for this repository. + SCANNING_DISABLED = 2; + + // Vulnerability scanning is active for this repository. + SCANNING_ACTIVE = 3; + } + + // Optional. Config for whether this repository has vulnerability scanning + // disabled. + EnablementConfig enablement_config = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The last time this repository config was enabled. + google.protobuf.Timestamp last_enable_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of feature enablement, combining repository enablement + // config and API enablement state. + EnablementState enablement_state = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reason for the repository state. + string enablement_state_reason = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // A package format. + enum Format { + // Unspecified package format. + FORMAT_UNSPECIFIED = 0; + + // 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; + + // Kubeflow Pipelines package format. + KFP = 9; + + // Go package format. + GO = 10; + + // Generic package format. + GENERIC = 11; + + // Ruby package format. + RUBY = 12; + } + + // The mode configures the repository to serve artifacts from different + // sources. + enum Mode { + // Unspecified mode. + MODE_UNSPECIFIED = 0; + + // A standard repository storing artifacts. + STANDARD_REPOSITORY = 1; + + // A virtual repository to serve artifacts from one or more sources. + VIRTUAL_REPOSITORY = 2; + + // A remote repository to serve artifacts from a remote source. + REMOTE_REPOSITORY = 3; + } + + // Repository-specific configurations. + oneof format_config { + // Maven repository config contains repository level configuration + // for the repositories of maven type. + MavenRepositoryConfig maven_config = 9; + + // Docker repository config contains repository level configuration + // for the repositories of docker type. + DockerRepositoryConfig docker_config = 17; + } + + // Repository configuration specific to the Mode value being selected (Remote + // or Virtual) + oneof mode_config { + // Configuration specific for a Virtual Repository. + VirtualRepositoryConfig virtual_repository_config = 14; + + // Configuration specific for a Remote Repository. + RemoteRepositoryConfig remote_repository_config = 15; + } + + // The name of the repository, for example: + // `projects/p1/locations/us-central1/repositories/repo1`. For each location + // in a project, repository names must be unique. + string name = 1; + + // Optional. The format of packages that are stored in the repository. + Format format = 2 [(google.api.field_behavior) = OPTIONAL]; + + // The user-provided description of the repository. + string description = 3; + + // Labels with user-defined metadata. + // This field may contain up to 64 entries. Label keys and values may be no + // longer than 63 characters. Label keys must begin with a lowercase letter + // and may only contain lowercase letters, numeric characters, underscores, + // and dashes. + map labels = 4; + + // Output only. The time when the repository was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the repository was last updated. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The Cloud KMS resource name of the customer managed encryption key that's + // used to encrypt the contents of the Repository. Has the form: + // `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. + // This value may not be changed after the Repository has been created. + string kms_key_name = 8; + + // Optional. The mode of the repository. + Mode mode = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cleanup policies for this repository. Cleanup policies indicate + // when certain package versions can be automatically deleted. Map keys are + // policy IDs supplied by users during policy creation. They must unique + // within a repository and be under 128 characters in length. + map cleanup_policies = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The size, in bytes, of all artifact storage in this + // repository. Repositories that are generally available or in public preview + // use this to calculate storage costs. + int64 size_bytes = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether or not this repository satisfies PZS. + bool satisfies_pzs = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. If true, the cleanup pipeline is prevented from deleting versions + // in this repository. + bool cleanup_policy_dry_run = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Config and state for vulnerability scanning of resources within + // this Repository. + VulnerabilityScanningConfig vulnerability_scanning_config = 19 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If this is true, an unspecified repo type will be treated as + // error rather than defaulting to standard. + bool disallow_unspecified_mode = 21 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Whether or not this repository satisfies PZI. + bool satisfies_pzi = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The repository endpoint, for example: + // `us-docker.pkg.dev/my-proj/my-repo`. + string registry_uri = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request to list repositories. +message ListRepositoriesRequest { + // 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. + string page_token = 3; + + // Optional. An expression for filtering the results of the request. Filter + // rules are case insensitive. The fields eligible for filtering are: + // + // * `name` + // + // Examples of using a filter: + // + // To filter the results of your request to repositories with the name + // `my-repo` in project `my-project` in the `us-central` region, append the + // following filter expression to your request: + // + // * `name="projects/my-project/locations/us-central1/repositories/my-repo"` + // + // You can also use wildcards to match any number of characters before or + // after the value: + // + // * `name="projects/my-project/locations/us-central1/repositories/my-*"` + // * `name="projects/my-project/locations/us-central1/repositories/*repo"` + // * `name="projects/my-project/locations/us-central1/repositories/*repo*"` + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The field to order the results by. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from listing repositories. +message ListRepositoriesResponse { + // The repositories returned. + repeated Repository repositories = 1; + + // The token to retrieve the next page of repositories, or empty if there are + // no more repositories to return. + string next_page_token = 2; +} + +// The request to retrieve a repository. +message GetRepositoryRequest { + // 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 { + // 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" + } + ]; + + // Required. The repository id to use for this repository. + string repository_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The repository to be created. + Repository repository = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request to update a repository. +message UpdateRepositoryRequest { + // The repository that replaces the resource on the server. + Repository repository = 1; + + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 2; +} + +// The request to delete a repository. +message DeleteRepositoryRequest { + // Required. The name of the repository to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Repository" + } + ]; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/rule.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/rule.proto new file mode 100644 index 00000000000..cfe5be0ab58 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/rule.proto @@ -0,0 +1,157 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/type/expr.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "RuleProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// A rule defines the deny or allow action of the operation it applies to and +// the conditions required for the rule to apply. You can set one rule for an +// entire repository and one rule for each package within. +message Rule { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/Rule" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/rules/{rule}" + }; + + // Defines the action of the rule. + enum Action { + // Action not specified. + ACTION_UNSPECIFIED = 0; + + // Allow the operation. + ALLOW = 1; + + // Deny the operation. + DENY = 2; + } + + // The operation the rule applies to. + enum Operation { + // Operation not specified. + OPERATION_UNSPECIFIED = 0; + + // Download operation. + DOWNLOAD = 1; + } + + // The name of the rule, for example: + // `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`. + string name = 1; + + // The action this rule takes. + Action action = 2; + + Operation operation = 3; + + // Optional. A CEL expression for conditions that must be met in order for the + // rule to apply. If not provided, the rule matches all objects. + google.type.Expr condition = 4 [(google.api.field_behavior) = OPTIONAL]; + + // The package ID the rule applies to. + // If empty, this rule applies to all packages inside the repository. + string package_id = 5; +} + +// The request to list rules. +message ListRulesRequest { + // Required. The name of the parent repository whose rules will be listed. + // For example: + // `projects/p1/locations/us-central1/repositories/repo1`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/Rule" + } + ]; + + // The maximum number of rules to return. Maximum page size is 1,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; +} + +// The response from listing rules. +message ListRulesResponse { + // The rules returned. + repeated Rule rules = 1; + + // The token to retrieve the next page of rules, or empty if there are no + // more rules to return. + string next_page_token = 2; +} + +// The request to retrieve a rule. +message GetRuleRequest { + // Required. The name of the rule to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Rule" + } + ]; +} + +// The request to create a new rule. +message CreateRuleRequest { + // Required. The name of the parent resource where the rule will be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/Rule" + } + ]; + + // The rule id to use for this repository. + string rule_id = 2; + + // The rule to be created. + Rule rule = 3; +} + +// The request to update a rule. +message UpdateRuleRequest { + // The rule that replaces the resource on the server. + Rule rule = 1; + + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 2; +} + +// The request to delete a rule. +message DeleteRuleRequest { + // Required. The name of the rule to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Rule" + } + ]; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto new file mode 100644 index 00000000000..b7e7c368092 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto @@ -0,0 +1,561 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/devtools/artifactregistry/v1/apt_artifact.proto"; +import "google/devtools/artifactregistry/v1/artifact.proto"; +import "google/devtools/artifactregistry/v1/attachment.proto"; +import "google/devtools/artifactregistry/v1/export.proto"; +import "google/devtools/artifactregistry/v1/file.proto"; +import "google/devtools/artifactregistry/v1/package.proto"; +import "google/devtools/artifactregistry/v1/repository.proto"; +import "google/devtools/artifactregistry/v1/rule.proto"; +import "google/devtools/artifactregistry/v1/settings.proto"; +import "google/devtools/artifactregistry/v1/tag.proto"; +import "google/devtools/artifactregistry/v1/version.proto"; +import "google/devtools/artifactregistry/v1/vpcsc_config.proto"; +import "google/devtools/artifactregistry/v1/yum_artifact.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// The Artifact Registry API service. +// +// Artifact Registry is an artifact management system for storing artifacts +// from different package management systems. +// +// The resources managed by this API are: +// +// * Repositories, which group packages and their data. +// * Packages, which group versions and their tags. +// * Versions, which are specific forms of a package. +// * Tags, which represent alternative names for versions. +// * Files, which contain content and are optionally associated with a Package +// or Version. +service ArtifactRegistry { + option (google.api.default_host) = "artifactregistry.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Lists docker images. + rpc ListDockerImages(ListDockerImagesRequest) + returns (ListDockerImagesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a docker image. + rpc GetDockerImage(GetDockerImageRequest) returns (DockerImage) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists maven artifacts. + rpc ListMavenArtifacts(ListMavenArtifactsRequest) + returns (ListMavenArtifactsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*}/mavenArtifacts" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a maven artifact. + rpc GetMavenArtifact(GetMavenArtifactRequest) returns (MavenArtifact) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/mavenArtifacts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists npm packages. + rpc ListNpmPackages(ListNpmPackagesRequest) + returns (ListNpmPackagesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*}/npmPackages" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a npm package. + rpc GetNpmPackage(GetNpmPackageRequest) returns (NpmPackage) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/npmPackages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists python packages. + rpc ListPythonPackages(ListPythonPackagesRequest) + returns (ListPythonPackagesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*}/pythonPackages" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a python package. + rpc GetPythonPackage(GetPythonPackageRequest) returns (PythonPackage) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/pythonPackages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Imports Apt artifacts. The returned Operation will complete once the + // resources are imported. Package, Version, and File resources are created + // based on the imported artifacts. Imported artifacts that conflict with + // existing resources are ignored. + rpc ImportAptArtifacts(ImportAptArtifactsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.devtools.artifactregistry.v1.ImportAptArtifactsResponse" + metadata_type: "google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata" + }; + } + + // Imports Yum (RPM) artifacts. The returned Operation will complete once the + // resources are imported. Package, Version, and File resources are created + // based on the imported artifacts. Imported artifacts that conflict with + // existing resources are ignored. + rpc ImportYumArtifacts(ImportYumArtifactsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.devtools.artifactregistry.v1.ImportYumArtifactsResponse" + metadata_type: "google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata" + }; + } + + // Lists repositories. + rpc ListRepositories(ListRepositoriesRequest) + returns (ListRepositoriesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/repositories" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a repository. + rpc GetRepository(GetRepositoryRequest) returns (Repository) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a repository. The returned Operation will finish once the + // repository has been created. Its response will be the created Repository. + rpc CreateRepository(CreateRepositoryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/repositories" + body: "repository" + }; + option (google.api.method_signature) = "parent,repository,repository_id"; + option (google.longrunning.operation_info) = { + response_type: "google.devtools.artifactregistry.v1.Repository" + metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" + }; + } + + // Updates a repository. + rpc UpdateRepository(UpdateRepositoryRequest) returns (Repository) { + option (google.api.http) = { + patch: "/v1/{repository.name=projects/*/locations/*/repositories/*}" + body: "repository" + }; + option (google.api.method_signature) = "repository,update_mask"; + } + + // Deletes a repository and all of its contents. The returned Operation will + // finish once the repository has been deleted. It will not have any Operation + // metadata and will return a google.protobuf.Empty response. + rpc DeleteRepository(DeleteRepositoryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" + }; + } + + // Lists packages. + rpc ListPackages(ListPackagesRequest) returns (ListPackagesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*}/packages" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a package. + rpc GetPackage(GetPackageRequest) returns (Package) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a package and all of its versions and tags. The returned operation + // will complete once the package has been deleted. + rpc DeletePackage(DeletePackageRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" + }; + } + + // Lists versions. + rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a version + rpc GetVersion(GetVersionRequest) returns (Version) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a version and all of its content. The returned operation will + // complete once the version has been deleted. + rpc DeleteVersion(DeleteVersionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" + }; + } + + // Deletes multiple versions across a repository. The returned operation will + // complete once the versions have been deleted. + rpc BatchDeleteVersions(BatchDeleteVersionsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions:batchDelete" + body: "*" + }; + option (google.api.method_signature) = "parent,names"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata" + }; + } + + // Updates a version. + rpc UpdateVersion(UpdateVersionRequest) returns (Version) { + option (google.api.http) = { + patch: "/v1/{version.name=projects/*/locations/*/repositories/*/packages/*/versions/*}" + body: "version" + }; + option (google.api.method_signature) = "version,update_mask"; + } + + // Lists files. + rpc ListFiles(ListFilesRequest) returns (ListFilesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*}/files" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a file. + rpc GetFile(GetFileRequest) returns (File) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/files/**}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a file and all of its content. It is only allowed on generic + // repositories. The returned operation will complete once the file has been + // deleted. + rpc DeleteFile(DeleteFileRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/repositories/*/files/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" + }; + } + + // Updates a file. + rpc UpdateFile(UpdateFileRequest) returns (File) { + option (google.api.http) = { + patch: "/v1/{file.name=projects/*/locations/*/repositories/*/files/*}" + body: "file" + }; + option (google.api.method_signature) = "file,update_mask"; + } + + // Lists tags. + rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a tag. + rpc GetTag(GetTagRequest) returns (Tag) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a tag. + rpc CreateTag(CreateTagRequest) returns (Tag) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" + body: "tag" + }; + option (google.api.method_signature) = "parent,tag,tag_id"; + } + + // Updates a tag. + rpc UpdateTag(UpdateTagRequest) returns (Tag) { + option (google.api.http) = { + patch: "/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + body: "tag" + }; + option (google.api.method_signature) = "tag,update_mask"; + } + + // Deletes a tag. + rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a rule. + rpc CreateRule(CreateRuleRequest) returns (Rule) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/repositories/*}/rules" + body: "rule" + }; + option (google.api.method_signature) = "parent,rule,rule_id"; + } + + // Lists rules. + rpc ListRules(ListRulesRequest) returns (ListRulesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*}/rules" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a rule. + rpc GetRule(GetRuleRequest) returns (Rule) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/rules/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a rule. + rpc UpdateRule(UpdateRuleRequest) returns (Rule) { + option (google.api.http) = { + patch: "/v1/{rule.name=projects/*/locations/*/repositories/*/rules/*}" + body: "rule" + }; + option (google.api.method_signature) = "rule,update_mask"; + } + + // Deletes a rule. + rpc DeleteRule(DeleteRuleRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/repositories/*/rules/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the IAM policy for a given resource. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy" + body: "*" + }; + } + + // Gets the IAM policy for a given resource. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + get: "/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" + }; + } + + // Tests if the caller has a list of permissions on a resource. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions" + body: "*" + }; + } + + // Retrieves the Settings for the Project. + rpc GetProjectSettings(GetProjectSettingsRequest) returns (ProjectSettings) { + option (google.api.http) = { + get: "/v1/{name=projects/*/projectSettings}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the Settings for the Project. + rpc UpdateProjectSettings(UpdateProjectSettingsRequest) + returns (ProjectSettings) { + option (google.api.http) = { + patch: "/v1/{project_settings.name=projects/*/projectSettings}" + body: "project_settings" + }; + option (google.api.method_signature) = "project_settings,update_mask"; + } + + // Retrieves the VPCSC Config for the Project. + rpc GetVPCSCConfig(GetVPCSCConfigRequest) returns (VPCSCConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/vpcscConfig}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the VPCSC Config for the Project. + rpc UpdateVPCSCConfig(UpdateVPCSCConfigRequest) returns (VPCSCConfig) { + option (google.api.http) = { + patch: "/v1/{vpcsc_config.name=projects/*/locations/*/vpcscConfig}" + body: "vpcsc_config" + }; + option (google.api.method_signature) = "vpcsc_config,update_mask"; + } + + // Updates a package. + rpc UpdatePackage(UpdatePackageRequest) returns (Package) { + option (google.api.http) = { + patch: "/v1/{package.name=projects/*/locations/*/repositories/*/packages/*}" + body: "package" + }; + option (google.api.method_signature) = "package,update_mask"; + } + + // Lists attachments. + rpc ListAttachments(ListAttachmentsRequest) + returns (ListAttachmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*}/attachments" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets an attachment. + rpc GetAttachment(GetAttachmentRequest) returns (Attachment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/attachments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an attachment. The returned Operation will finish once the + // attachment has been created. Its response will be the created attachment. + rpc CreateAttachment(CreateAttachmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/repositories/*}/attachments" + body: "attachment" + }; + option (google.api.method_signature) = "parent,attachment,attachment_id"; + option (google.longrunning.operation_info) = { + response_type: "google.devtools.artifactregistry.v1.Attachment" + metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" + }; + } + + // Deletes an attachment. The returned Operation will + // finish once the attachments has been deleted. It will not have any + // Operation metadata and will return a `google.protobuf.Empty` response. + rpc DeleteAttachment(DeleteAttachmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/repositories/*/attachments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" + }; + } + + // Exports an artifact to a Cloud Storage bucket. + rpc ExportArtifact(ExportArtifactRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{repository=projects/*/locations/*/repositories/*}:exportArtifact" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.devtools.artifactregistry.v1.ExportArtifactResponse" + metadata_type: "google.devtools.artifactregistry.v1.ExportArtifactMetadata" + }; + } +} + +// Metadata type for longrunning-operations, currently empty. +message OperationMetadata {} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/settings.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/settings.proto new file mode 100644 index 00000000000..54f94b30a78 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/settings.proto @@ -0,0 +1,94 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "SettingsProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// The Artifact Registry settings that apply to a Project. +message ProjectSettings { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/ProjectSettings" + pattern: "projects/{project}/projectSettings" + }; + + // The possible redirection states for legacy repositories. + enum RedirectionState { + // No redirection status has been set. + REDIRECTION_STATE_UNSPECIFIED = 0; + + // Redirection is disabled. + REDIRECTION_FROM_GCR_IO_DISABLED = 1; + + // Redirection is enabled. + REDIRECTION_FROM_GCR_IO_ENABLED = 2; + + // Redirection is enabled, and has been finalized so cannot be reverted. + REDIRECTION_FROM_GCR_IO_FINALIZED = 3 [deprecated = true]; + + // Redirection is enabled and missing images are copied from GCR + REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING = 5; + + // Redirection is partially enabled and missing images are copied from GCR + REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING = 6; + } + + // 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; + + // The percentage of pull traffic to redirect from GCR to AR when using + // partial redirection. + int32 pull_percent = 3; +} + +// 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/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/tag.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/tag.proto new file mode 100644 index 00000000000..3268a2f8ad0 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/tag.proto @@ -0,0 +1,138 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "TagProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// Tags point to a version and represent an alternative name that can be used +// to access the version. +message Tag { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/Tag" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}" + }; + + // The name of the tag, for example: + // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". + // If the package part contains slashes, the slashes are escaped. + // The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else + // must be URL encoded. + string name = 1; + + // The name of the version the tag refers to, for example: + // `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811` + // If the package or version ID parts contain slashes, the slashes are + // escaped. + string version = 2; +} + +// The request to list tags. +message ListTagsRequest { + // The name of the parent package whose tags will be listed. + // For example: + // `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. + string parent = 1; + + // An expression for filtering the results of the request. Filter rules are + // case insensitive. The fields eligible for filtering are: + // + // * `name` + // * `version` + // + // Examples of using a filter: + // + // To filter the results of your request to tags with the name `my-tag` in + // package `my-package` in repository `my-repo` in project "`y-project` in + // the us-central region, append the following filter expression to your + // request: + // + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` + // + // You can also use wildcards to match any number of characters before or + // after the value: + // + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` + // + // To filter the results of your request to tags applied to the version + // `1.0` in package `my-package`, append the following filter expression to + // your request: + // + // * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + string filter = 4; + + // The maximum number of tags to return. Maximum page size is 1,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; +} + +// The response from listing tags. +message ListTagsResponse { + // The tags returned. + repeated Tag tags = 1; + + // The token to retrieve the next page of tags, or empty if there are no + // more tags to return. + string next_page_token = 2; +} + +// The request to retrieve a tag. +message GetTagRequest { + // The name of the tag to retrieve. + string name = 1; +} + +// The request to create a new tag. +message CreateTagRequest { + // The name of the parent resource where the tag will be created. + string parent = 1; + + // The tag id to use for this repository. + string tag_id = 2; + + // The tag to be created. + Tag tag = 3; +} + +// The request to create or update a tag. +message UpdateTagRequest { + // The tag that replaces the resource on the server. + Tag tag = 1; + + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 2; +} + +// The request to delete a tag. +message DeleteTagRequest { + // The name of the tag to delete. + string name = 1; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto new file mode 100644 index 00000000000..4efa5c15fec --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto @@ -0,0 +1,224 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/devtools/artifactregistry/v1/file.proto"; +import "google/devtools/artifactregistry/v1/tag.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "VersionProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// The view, which determines what version information is returned in a +// response. +enum VersionView { + // The default / unset value. + // The API will default to the BASIC view. + VERSION_VIEW_UNSPECIFIED = 0; + + // Includes basic information about the version, but not any related tags. + BASIC = 1; + + // Include everything. + FULL = 2; +} + +// The body of a version resource. A version resource represents a +// collection of components, such as files and other data. This may correspond +// to a version in many package management schemes. +message Version { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/Version" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}" + }; + + // The name of the version, for example: + // `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1`. + // If the package or version ID parts contain slashes, the slashes are + // escaped. + string name = 1; + + // Optional. Description of the version, as specified in its metadata. + string description = 3; + + // The time when the version was created. + google.protobuf.Timestamp create_time = 5; + + // The time when the version was last updated. + google.protobuf.Timestamp update_time = 6; + + // Output only. A list of related tags. Will contain up to 100 tags that + // reference this version. + repeated Tag related_tags = 7; + + // Output only. Repository-specific Metadata stored against this version. + // The fields returned are defined by the underlying repository-specific + // resource. Currently, the resources could be: + // [DockerImage][google.devtools.artifactregistry.v1.DockerImage] + // [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact] + google.protobuf.Struct metadata = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Client specified annotations. + map annotations = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Immutable reference for the version, calculated based on the + // version's content. Currently we only support dirsum_sha256 hash algorithm. + // Additional hash algorithms may be added in the future. + repeated Hash fingerprints = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request to list versions. +message ListVersionsRequest { + // The name of the parent resource whose versions will be listed. + string parent = 1; + + // The maximum number of versions to return. Maximum page size is 1,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; + + // The view that should be returned in the response. + VersionView view = 4; + + // Optional. The field to order the results by. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression for filtering the results of the request. Filter + // rules are case insensitive. The fields eligible for filtering are: + // + // * `name` + // * `annotations` + // + // Examples of using a filter: + // + // To filter the results of your request to versions with the name + // `my-version` in project `my-project` in the `us-central` region, in + // repository `my-repo`, append the following filter expression to your + // request: + // + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` + // + // You can also use wildcards to match any number of characters before or + // after the value: + // + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` + // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` + // + // To filter the results of your request to versions with the annotation + // key-value pair [`external_link`: `external_link_value`], append the + // following filter expression to your request: + // + // * `"annotations.external_link:external_link_value"` + // + // To filter just for a specific annotation key `external_link`, append the + // following filter expression to your request: + // + // * `"annotations.external_link"` + // + // If the annotation key or value contains special characters, you can escape + // them by surrounding the value with backticks. For example, to filter the + // results of your request to versions with the annotation key-value pair + // [`external.link`:`https://example.com/my-version`], append the following + // filter expression to your request: + // + // * `` "annotations.`external.link`:`https://example.com/my-version`" `` + // + // You can also filter with annotations with a wildcard to + // match any number of characters before or after the value: + // + // * `` "annotations.*_link:`*example.com*`" `` + string filter = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from listing versions. +message ListVersionsResponse { + // The versions returned. + repeated Version versions = 1; + + // The token to retrieve the next page of versions, or empty if there are no + // more versions to return. + string next_page_token = 2; +} + +// The request to retrieve a version. +message GetVersionRequest { + // The name of the version to retrieve. + string name = 1; + + // The view that should be returned in the response. + VersionView view = 2; +} + +// The request to delete a version. +message DeleteVersionRequest { + // The name of the version to delete. + string name = 1; + + // By default, a version that is tagged may not be deleted. If force=true, the + // version and any tags pointing to the version are deleted. + bool force = 2; +} + +// The request to delete multiple versions across a repository. +message BatchDeleteVersionsRequest { + // The name of the repository holding all requested versions. + string parent = 1 [(google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/Version" + }]; + + // Required. The names of the versions to delete. + // The maximum number of versions deleted per batch is determined by the + // service and is dependent on the available resources in the region. + repeated string names = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Version" + } + ]; + + // If true, the request is performed without deleting data, following AIP-163. + bool validate_only = 3; +} + +// The metadata of an LRO from deleting multiple versions. +message BatchDeleteVersionsMetadata { + // The versions the operation failed to delete. + repeated string failed_versions = 2; +} + +// The request to update a version. +message UpdateVersionRequest { + // Required. The Version that replaces the resource on the server. + Version version = 1 [(google.api.field_behavior) = REQUIRED]; + + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 2; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/vpcsc_config.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/vpcsc_config.proto new file mode 100644 index 00000000000..477bbda9a89 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/vpcsc_config.proto @@ -0,0 +1,86 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "VPCSCConfigProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// The Artifact Registry VPC SC config that apply to a Project. +message VPCSCConfig { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/VpcscConfig" + pattern: "projects/{project}/locations/{location}/vpcscConfig" + }; + + // VPCSCPolicy is the VPC SC policy for project and location. + enum VPCSCPolicy { + // VPCSC_POLICY_UNSPECIFIED - the VPS SC policy is not defined. + // When VPS SC policy is not defined - the Service will use the default + // behavior (VPCSC_DENY). + VPCSC_POLICY_UNSPECIFIED = 0; + + // VPCSC_DENY - repository will block the requests to the Upstreams for the + // Remote Repositories if the resource is in the perimeter. + DENY = 1; + + // VPCSC_ALLOW - repository will allow the requests to the Upstreams for the + // Remote Repositories if the resource is in the perimeter. + ALLOW = 2; + } + + // The name of the project's VPC SC Config. + // + // Always of the form: + // projects/{projectID}/locations/{location}/vpcscConfig + // + // In update request: never set + // In response: always set + string name = 1; + + // The project per location VPC SC policy that defines the VPC SC behavior for + // the Remote Repository (Allow/Deny). + VPCSCPolicy vpcsc_policy = 2; +} + +// Gets the VPC SC config for a project. +message GetVPCSCConfigRequest { + // Required. The name of the VPCSCConfig resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/VpcscConfig" + } + ]; +} + +// Sets the VPCSC config of the project. +message UpdateVPCSCConfigRequest { + // The project config. + VPCSCConfig vpcsc_config = 1; + + // Field mask to support partial updates. + google.protobuf.FieldMask update_mask = 2; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/yum_artifact.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/yum_artifact.proto new file mode 100644 index 00000000000..3592c8f4896 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/yum_artifact.proto @@ -0,0 +1,106 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "YumArtifactProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// A detailed representation of a Yum artifact. +message YumArtifact { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/YumArtifact" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}" + }; + + // Package type is either binary or source. + enum PackageType { + // Package type is not specified. + PACKAGE_TYPE_UNSPECIFIED = 0; + + // Binary package (.rpm). + BINARY = 1; + + // Source package (.srpm). + SOURCE = 2; + } + + // Output only. The Artifact Registry resource name of the artifact. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The yum package name of the artifact. + string package_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. An artifact is a binary or source package. + PackageType package_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Operating system architecture of the artifact. + string architecture = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Google Cloud Storage location where the artifacts currently reside. +message ImportYumArtifactsGcsSource { + // Cloud Storage paths URI (e.g., gs://my_bucket//my_object). + repeated string uris = 1; + + // Supports URI wildcards for matching multiple objects from a single URI. + bool use_wildcards = 2; +} + +// The request to import new yum artifacts. +message ImportYumArtifactsRequest { + // The source location of the package binaries. + oneof source { + // Google Cloud Storage location where input content is located. + ImportYumArtifactsGcsSource gcs_source = 2; + } + + // The name of the parent resource where the artifacts will be imported. + string parent = 1; +} + +// Error information explaining why a package was not imported. +message ImportYumArtifactsErrorInfo { + // The source that was not imported. + oneof source { + // Google Cloud Storage location requested. + ImportYumArtifactsGcsSource gcs_source = 1; + } + + // The detailed error status. + google.rpc.Status error = 2; +} + +// The response message from importing YUM artifacts. +message ImportYumArtifactsResponse { + // The yum artifacts imported. + repeated YumArtifact yum_artifacts = 1; + + // Detailed error info for packages that were not imported. + repeated ImportYumArtifactsErrorInfo errors = 2; +} + +// The operation metadata for importing artifacts. +message ImportYumArtifactsMetadata {} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/apt_artifact.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/apt_artifact.proto new file mode 100644 index 00000000000..a46acf0c1b0 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/apt_artifact.proto @@ -0,0 +1,115 @@ +// Copyright 2025 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/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; +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/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/file.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/file.proto new file mode 100644 index 00000000000..8e315002f64 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/file.proto @@ -0,0 +1,120 @@ +// Copyright 2025 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/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "FileProto"; +option java_package = "com.google.devtools.artifactregistry.v1beta2"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2"; + +// A hash of file content. +message Hash { + // The algorithm used to compute the hash. + enum HashType { + // Unspecified. + HASH_TYPE_UNSPECIFIED = 0; + + // SHA256 hash. + SHA256 = 1; + + // MD5 hash. + MD5 = 2; + } + + // The algorithm used to compute the hash value. + HashType type = 1; + + // The hash value. + bytes value = 2; +} + +// Files store content that is potentially associated with Packages or Versions. +message File { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/File" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/files/{file}" + }; + + // The name of the file, for example: + // "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt". + // If the file ID part contains slashes, they are escaped. + string name = 1; + + // The size of the File in bytes. + int64 size_bytes = 3; + + // The hashes of the file content. + repeated Hash hashes = 4; + + // The time when the File was created. + google.protobuf.Timestamp create_time = 5; + + // The time when the File was last updated. + google.protobuf.Timestamp update_time = 6; + + // The name of the Package or Version that owns this file, if any. + string owner = 7; +} + +// The request to list files. +message ListFilesRequest { + // The name of the repository whose files will be listed. For example: + // "projects/p1/locations/us-central1/repositories/repo1 + string parent = 1; + + // An expression for filtering the results of the request. Filter rules are + // case insensitive. The fields eligible for filtering are: + // + // * `name` + // * `owner` + // + // An example of using a filter: + // + // * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + // ID starting with "a/b/". + // * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + // Files owned by the version `1.0` in package `pkg1`. + string filter = 4; + + // The maximum number of files to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; +} + +// The response from listing files. +message ListFilesResponse { + // The files returned. + repeated File files = 1; + + // The token to retrieve the next page of files, or empty if there are no + // more files to return. + string next_page_token = 2; +} + +// The request to retrieve a file. +message GetFileRequest { + // The name of the file to retrieve. + string name = 1; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/package.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/package.proto new file mode 100644 index 00000000000..c56676be704 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/package.proto @@ -0,0 +1,79 @@ +// Copyright 2025 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/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "PackageProto"; +option java_package = "com.google.devtools.artifactregistry.v1beta2"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2"; + +// Packages are named collections of versions. +message Package { + // The name of the package, for example: + // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1". + string name = 1; + + // The display name of the package. + string display_name = 2; + + // The time when the package was created. + google.protobuf.Timestamp create_time = 5; + + // The time when the package was last updated. This includes publishing a new + // version of the package. + google.protobuf.Timestamp update_time = 6; +} + +// The request to list packages. +message ListPackagesRequest { + // The name of the parent resource whose packages will be listed. + string parent = 1; + + // The maximum number of packages to return. + // Maximum page size is 10,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; +} + +// The response from listing packages. +message ListPackagesResponse { + // The packages returned. + repeated Package packages = 1; + + // The token to retrieve the next page of packages, or empty if there are no + // more packages to return. + string next_page_token = 2; +} + +// The request to retrieve a package. +message GetPackageRequest { + // The name of the package to retrieve. + string name = 1; +} + +// The request to delete a package. +message DeletePackageRequest { + // The name of the package to delete. + string name = 1; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/repository.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/repository.proto new file mode 100644 index 00000000000..942d6d31349 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/repository.proto @@ -0,0 +1,201 @@ +// Copyright 2025 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/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "RepositoryProto"; +option java_package = "com.google.devtools.artifactregistry.v1beta2"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2"; + +// A Repository for storing artifacts with a specific format. +message Repository { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/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. + FORMAT_UNSPECIFIED = 0; + + // 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: + // "projects/p1/locations/us-central1/repositories/repo1". + string name = 1; + + // The format of packages that are stored in the repository. + Format format = 2; + + // The user-provided description of the repository. + string description = 3; + + // Labels with user-defined metadata. + // This field may contain up to 64 entries. Label keys and values may be no + // longer than 63 characters. Label keys must begin with a lowercase letter + // and may only contain lowercase letters, numeric characters, underscores, + // and dashes. + map labels = 4; + + // The time when the repository was created. + google.protobuf.Timestamp create_time = 5; + + // The time when the repository was last updated. + google.protobuf.Timestamp update_time = 6; + + // The Cloud KMS resource name of the customer managed encryption key that’s + // used to encrypt the contents of the Repository. Has the form: + // `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. + // This value may not be changed after the Repository has been created. + string kms_key_name = 8; +} + +// The request to list repositories. +message ListRepositoriesRequest { + // 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. + string page_token = 3; +} + +// The response from listing repositories. +message ListRepositoriesResponse { + // The repositories returned. + repeated Repository repositories = 1; + + // The token to retrieve the next page of repositories, or empty if there are + // no more repositories to return. + string next_page_token = 2; +} + +// The request to retrieve a repository. +message GetRepositoryRequest { + // 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 { + // Required. The name of the parent resource where the repository will be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/Repository" + } + ]; + + // The repository id to use for this repository. + string repository_id = 2; + + // The repository to be created. + Repository repository = 3; +} + +// The request to update a repository. +message UpdateRepositoryRequest { + // The repository that replaces the resource on the server. + Repository repository = 1; + + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 2; +} + +// The request to delete a repository. +message DeleteRepositoryRequest { + // Required. The name of the repository to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Repository" + } + ]; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/service.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/service.proto new file mode 100644 index 00000000000..0f872fa737d --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/service.proto @@ -0,0 +1,304 @@ +// Copyright 2025 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/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"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +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 API service. +// +// Artifact Registry is an artifact management system for storing artifacts +// from different package management systems. +// +// The resources managed by this API are: +// +// * Repositories, which group packages and their data. +// * Packages, which group versions and their tags. +// * Versions, which are specific forms of a package. +// * Tags, which represent alternative names for versions. +// * Files, which contain content and are optionally associated with a Package +// or Version. +service ArtifactRegistry { + option (google.api.default_host) = "artifactregistry.googleapis.com"; + option (google.api.oauth_scopes) = + "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) = { + get: "/v1beta2/{parent=projects/*/locations/*}/repositories" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a repository. + rpc GetRepository(GetRepositoryRequest) returns (Repository) { + option (google.api.http) = { + get: "/v1beta2/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a repository. The returned Operation will finish once the + // repository has been created. Its response will be the created Repository. + rpc CreateRepository(CreateRepositoryRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta2/{parent=projects/*/locations/*}/repositories" + body: "repository" + }; + option (google.api.method_signature) = "parent,repository,repository_id"; + option (google.longrunning.operation_info) = { + response_type: "google.devtools.artifactregistry.v1beta2.Repository" + metadata_type: "google.devtools.artifactregistry.v1beta2.OperationMetadata" + }; + } + + // Updates a repository. + rpc UpdateRepository(UpdateRepositoryRequest) returns (Repository) { + option (google.api.http) = { + patch: "/v1beta2/{repository.name=projects/*/locations/*/repositories/*}" + body: "repository" + }; + option (google.api.method_signature) = "repository,update_mask"; + } + + // Deletes a repository and all of its contents. The returned Operation will + // finish once the repository has been deleted. It will not have any Operation + // metadata and will return a google.protobuf.Empty response. + rpc DeleteRepository(DeleteRepositoryRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta2/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.artifactregistry.v1beta2.OperationMetadata" + }; + } + + // Lists packages. + rpc ListPackages(ListPackagesRequest) returns (ListPackagesResponse) { + option (google.api.http) = { + get: "/v1beta2/{parent=projects/*/locations/*/repositories/*}/packages" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a package. + rpc GetPackage(GetPackageRequest) returns (Package) { + option (google.api.http) = { + get: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a package and all of its versions and tags. The returned operation + // will complete once the package has been deleted. + rpc DeletePackage(DeletePackageRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.artifactregistry.v1beta2.OperationMetadata" + }; + } + + // Lists versions. + rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) { + option (google.api.http) = { + get: "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/versions" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a version + rpc GetVersion(GetVersionRequest) returns (Version) { + option (google.api.http) = { + get: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a version and all of its content. The returned operation will + // complete once the version has been deleted. + rpc DeleteVersion(DeleteVersionRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.artifactregistry.v1beta2.OperationMetadata" + }; + } + + // Lists files. + rpc ListFiles(ListFilesRequest) returns (ListFilesResponse) { + option (google.api.http) = { + get: "/v1beta2/{parent=projects/*/locations/*/repositories/*}/files" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a file. + rpc GetFile(GetFileRequest) returns (File) { + option (google.api.http) = { + get: "/v1beta2/{name=projects/*/locations/*/repositories/*/files/**}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists tags. + rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { + option (google.api.http) = { + get: "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a tag. + rpc GetTag(GetTagRequest) returns (Tag) { + option (google.api.http) = { + get: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a tag. + rpc CreateTag(CreateTagRequest) returns (Tag) { + option (google.api.http) = { + post: "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" + body: "tag" + }; + option (google.api.method_signature) = "parent,tag,tag_id"; + } + + // Updates a tag. + rpc UpdateTag(UpdateTagRequest) returns (Tag) { + option (google.api.http) = { + patch: "/v1beta2/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + body: "tag" + }; + option (google.api.method_signature) = "tag,update_mask"; + } + + // Deletes a tag. + rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the IAM policy for a given resource. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta2/{resource=projects/*/locations/*/repositories/*}:setIamPolicy" + body: "*" + }; + } + + // Gets the IAM policy for a given resource. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + get: "/v1beta2/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" + }; + } + + // Tests if the caller has a list of permissions on a resource. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1beta2/{resource=projects/*/locations/*/repositories/*}:testIamPermissions" + 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 { + +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/settings.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/settings.proto new file mode 100644 index 00000000000..844bc0080f2 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/settings.proto @@ -0,0 +1,84 @@ +// Copyright 2025 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/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +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/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/tag.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/tag.proto new file mode 100644 index 00000000000..5ca0805ff70 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/tag.proto @@ -0,0 +1,118 @@ +// Copyright 2025 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/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "TagProto"; +option java_package = "com.google.devtools.artifactregistry.v1beta2"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2"; +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; +} + +// The request to list tags. +message ListTagsRequest { + // The name of the parent resource whose tags will be listed. + string parent = 1; + + // An expression for filtering the results of the request. Filter rules are + // case insensitive. The fields eligible for filtering are: + // + // * `version` + // + // An example of using a filter: + // + // * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + // --> Tags that are applied to the version `1.0` in package `pkg1`. + string filter = 4; + + // The maximum number of tags to return. Maximum page size is 10,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; +} + +// The response from listing tags. +message ListTagsResponse { + // The tags returned. + repeated Tag tags = 1; + + // The token to retrieve the next page of tags, or empty if there are no + // more tags to return. + string next_page_token = 2; +} + +// The request to retrieve a tag. +message GetTagRequest { + // The name of the tag to retrieve. + string name = 1; +} + +// The request to create a new tag. +message CreateTagRequest { + // The name of the parent resource where the tag will be created. + string parent = 1; + + // The tag id to use for this repository. + string tag_id = 2; + + // The tag to be created. + Tag tag = 3; +} + +// The request to create or update a tag. +message UpdateTagRequest { + // The tag that replaces the resource on the server. + Tag tag = 1; + + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 2; +} + +// The request to delete a tag. +message DeleteTagRequest { + // The name of the tag to delete. + string name = 1; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/version.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/version.proto new file mode 100644 index 00000000000..92d157cb3d3 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/version.proto @@ -0,0 +1,127 @@ +// Copyright 2025 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/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"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "VersionProto"; +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. + string description = 3; + + // The time when the version was created. + google.protobuf.Timestamp create_time = 5; + + // The time when the version was last updated. + google.protobuf.Timestamp update_time = 6; + + // Output only. A list of related tags. Will contain up to 100 tags that + // reference this version. + repeated Tag related_tags = 7; + + // Output only. Repository-specific Metadata stored against this version. + // The fields returned are defined by the underlying repository-specific + // resource. Currently, the only resource in use is + // [DockerImage][google.devtools.artifactregistry.v1.DockerImage] + google.protobuf.Struct metadata = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request to list versions. +message ListVersionsRequest { + // The name of the parent resource whose versions will be listed. + string parent = 1; + + // The maximum number of versions to return. Maximum page size is 1,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; + + // The view that should be returned in the response. + VersionView view = 4; + + // Optional. The field to order the results by. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from listing versions. +message ListVersionsResponse { + // The versions returned. + repeated Version versions = 1; + + // The token to retrieve the next page of versions, or empty if there are no + // more versions to return. + string next_page_token = 2; +} + +// The request to retrieve a version. +message GetVersionRequest { + // The name of the version to retrieve. + string name = 1; + + // The view that should be returned in the response. + VersionView view = 2; +} + +// The request to delete a version. +message DeleteVersionRequest { + // The name of the version to delete. + string name = 1; + + // By default, a version that is tagged may not be deleted. If force=true, the + // version and any tags pointing to the version are deleted. + bool force = 2; +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/yum_artifact.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/yum_artifact.proto new file mode 100644 index 00000000000..1df2158b2a5 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/yum_artifact.proto @@ -0,0 +1,107 @@ +// Copyright 2025 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/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; +option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; +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/owl-bot-staging/google-devtools-artifactregistry/protos/protos.d.ts b/owl-bot-staging/google-devtools-artifactregistry/protos/protos.d.ts new file mode 100644 index 00000000000..1f77436a9c4 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/protos.d.ts @@ -0,0 +1,29137 @@ +// Copyright 2025 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. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace devtools. */ + namespace devtools { + + /** Namespace artifactregistry. */ + namespace artifactregistry { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of an AptArtifact. */ + interface IAptArtifact { + + /** AptArtifact name */ + name?: (string|null); + + /** AptArtifact packageName */ + packageName?: (string|null); + + /** AptArtifact packageType */ + packageType?: (google.devtools.artifactregistry.v1.AptArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1.AptArtifact.PackageType|null); + + /** AptArtifact architecture */ + architecture?: (string|null); + + /** AptArtifact component */ + component?: (string|null); + + /** AptArtifact controlFile */ + controlFile?: (Uint8Array|Buffer|string|null); + } + + /** Represents an AptArtifact. */ + class AptArtifact implements IAptArtifact { + + /** + * Constructs a new AptArtifact. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IAptArtifact); + + /** AptArtifact name. */ + public name: string; + + /** AptArtifact packageName. */ + public packageName: string; + + /** AptArtifact packageType. */ + public packageType: (google.devtools.artifactregistry.v1.AptArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1.AptArtifact.PackageType); + + /** AptArtifact architecture. */ + public architecture: string; + + /** AptArtifact component. */ + public component: string; + + /** AptArtifact controlFile. */ + public controlFile: (Uint8Array|Buffer|string); + + /** + * Creates a new AptArtifact instance using the specified properties. + * @param [properties] Properties to set + * @returns AptArtifact instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IAptArtifact): google.devtools.artifactregistry.v1.AptArtifact; + + /** + * Encodes the specified AptArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.AptArtifact.verify|verify} messages. + * @param message AptArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IAptArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AptArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.AptArtifact.verify|verify} messages. + * @param message AptArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IAptArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 AptArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.AptArtifact; + + /** + * Decodes an AptArtifact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AptArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.AptArtifact; + + /** + * 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 an AptArtifact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AptArtifact + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.AptArtifact; + + /** + * Creates a plain object from an AptArtifact message. Also converts values to other types if specified. + * @param message AptArtifact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.AptArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AptArtifact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AptArtifact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AptArtifact { + + /** PackageType enum. */ + enum PackageType { + PACKAGE_TYPE_UNSPECIFIED = 0, + BINARY = 1, + SOURCE = 2 + } + } + + /** Properties of an ImportAptArtifactsGcsSource. */ + interface IImportAptArtifactsGcsSource { + + /** ImportAptArtifactsGcsSource uris */ + uris?: (string[]|null); + + /** ImportAptArtifactsGcsSource useWildcards */ + useWildcards?: (boolean|null); + } + + /** Represents an ImportAptArtifactsGcsSource. */ + class ImportAptArtifactsGcsSource implements IImportAptArtifactsGcsSource { + + /** + * Constructs a new ImportAptArtifactsGcsSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource); + + /** ImportAptArtifactsGcsSource uris. */ + public uris: string[]; + + /** ImportAptArtifactsGcsSource useWildcards. */ + public useWildcards: boolean; + + /** + * Creates a new ImportAptArtifactsGcsSource instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportAptArtifactsGcsSource instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource): google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource; + + /** + * Encodes the specified ImportAptArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.verify|verify} messages. + * @param message ImportAptArtifactsGcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportAptArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.verify|verify} messages. + * @param message ImportAptArtifactsGcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 ImportAptArtifactsGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource; + + /** + * Decodes an ImportAptArtifactsGcsSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportAptArtifactsGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource; + + /** + * 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 an ImportAptArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportAptArtifactsGcsSource + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource; + + /** + * Creates a plain object from an ImportAptArtifactsGcsSource message. Also converts values to other types if specified. + * @param message ImportAptArtifactsGcsSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportAptArtifactsGcsSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportAptArtifactsGcsSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportAptArtifactsRequest. */ + interface IImportAptArtifactsRequest { + + /** ImportAptArtifactsRequest gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null); + + /** ImportAptArtifactsRequest parent */ + parent?: (string|null); + } + + /** Represents an ImportAptArtifactsRequest. */ + class ImportAptArtifactsRequest implements IImportAptArtifactsRequest { + + /** + * Constructs a new ImportAptArtifactsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest); + + /** ImportAptArtifactsRequest gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null); + + /** ImportAptArtifactsRequest parent. */ + public parent: string; + + /** ImportAptArtifactsRequest source. */ + public source?: "gcsSource"; + + /** + * Creates a new ImportAptArtifactsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportAptArtifactsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest): google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; + + /** + * Encodes the specified ImportAptArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.verify|verify} messages. + * @param message ImportAptArtifactsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportAptArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.verify|verify} messages. + * @param message ImportAptArtifactsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 ImportAptArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; + + /** + * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportAptArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; + + /** + * 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 an ImportAptArtifactsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportAptArtifactsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; + + /** + * Creates a plain object from an ImportAptArtifactsRequest message. Also converts values to other types if specified. + * @param message ImportAptArtifactsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportAptArtifactsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportAptArtifactsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportAptArtifactsErrorInfo. */ + interface IImportAptArtifactsErrorInfo { + + /** ImportAptArtifactsErrorInfo gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null); + + /** ImportAptArtifactsErrorInfo error */ + error?: (google.rpc.IStatus|null); + } + + /** Represents an ImportAptArtifactsErrorInfo. */ + class ImportAptArtifactsErrorInfo implements IImportAptArtifactsErrorInfo { + + /** + * Constructs a new ImportAptArtifactsErrorInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo); + + /** ImportAptArtifactsErrorInfo gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null); + + /** ImportAptArtifactsErrorInfo error. */ + public error?: (google.rpc.IStatus|null); + + /** ImportAptArtifactsErrorInfo source. */ + public source?: "gcsSource"; + + /** + * Creates a new ImportAptArtifactsErrorInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportAptArtifactsErrorInfo instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo): google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo; + + /** + * Encodes the specified ImportAptArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify|verify} messages. + * @param message ImportAptArtifactsErrorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportAptArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify|verify} messages. + * @param message ImportAptArtifactsErrorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 ImportAptArtifactsErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo; + + /** + * Decodes an ImportAptArtifactsErrorInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportAptArtifactsErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo; + + /** + * 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 an ImportAptArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportAptArtifactsErrorInfo + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo; + + /** + * Creates a plain object from an ImportAptArtifactsErrorInfo message. Also converts values to other types if specified. + * @param message ImportAptArtifactsErrorInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportAptArtifactsErrorInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportAptArtifactsErrorInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportAptArtifactsResponse. */ + interface IImportAptArtifactsResponse { + + /** ImportAptArtifactsResponse aptArtifacts */ + aptArtifacts?: (google.devtools.artifactregistry.v1.IAptArtifact[]|null); + + /** ImportAptArtifactsResponse errors */ + errors?: (google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo[]|null); + } + + /** Represents an ImportAptArtifactsResponse. */ + class ImportAptArtifactsResponse implements IImportAptArtifactsResponse { + + /** + * Constructs a new ImportAptArtifactsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsResponse); + + /** ImportAptArtifactsResponse aptArtifacts. */ + public aptArtifacts: google.devtools.artifactregistry.v1.IAptArtifact[]; + + /** ImportAptArtifactsResponse errors. */ + public errors: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo[]; + + /** + * Creates a new ImportAptArtifactsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportAptArtifactsResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsResponse): google.devtools.artifactregistry.v1.ImportAptArtifactsResponse; + + /** + * Encodes the specified ImportAptArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.verify|verify} messages. + * @param message ImportAptArtifactsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportAptArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.verify|verify} messages. + * @param message ImportAptArtifactsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 ImportAptArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsResponse; + + /** + * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportAptArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsResponse; + + /** + * 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 an ImportAptArtifactsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportAptArtifactsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsResponse; + + /** + * Creates a plain object from an ImportAptArtifactsResponse message. Also converts values to other types if specified. + * @param message ImportAptArtifactsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportAptArtifactsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportAptArtifactsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportAptArtifactsMetadata. */ + interface IImportAptArtifactsMetadata { + } + + /** Represents an ImportAptArtifactsMetadata. */ + class ImportAptArtifactsMetadata implements IImportAptArtifactsMetadata { + + /** + * Constructs a new ImportAptArtifactsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata); + + /** + * Creates a new ImportAptArtifactsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportAptArtifactsMetadata instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata): google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; + + /** + * Encodes the specified ImportAptArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata.verify|verify} messages. + * @param message ImportAptArtifactsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportAptArtifactsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata.verify|verify} messages. + * @param message ImportAptArtifactsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 ImportAptArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; + + /** + * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportAptArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; + + /** + * 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 an ImportAptArtifactsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportAptArtifactsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; + + /** + * Creates a plain object from an ImportAptArtifactsMetadata message. Also converts values to other types if specified. + * @param message ImportAptArtifactsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportAptArtifactsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportAptArtifactsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DockerImage. */ + interface IDockerImage { + + /** DockerImage name */ + name?: (string|null); + + /** DockerImage uri */ + uri?: (string|null); + + /** DockerImage tags */ + tags?: (string[]|null); + + /** DockerImage imageSizeBytes */ + imageSizeBytes?: (number|Long|string|null); + + /** DockerImage uploadTime */ + uploadTime?: (google.protobuf.ITimestamp|null); + + /** DockerImage mediaType */ + mediaType?: (string|null); + + /** DockerImage buildTime */ + buildTime?: (google.protobuf.ITimestamp|null); + + /** DockerImage updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DockerImage artifactType */ + artifactType?: (string|null); + + /** DockerImage imageManifests */ + imageManifests?: (google.devtools.artifactregistry.v1.IImageManifest[]|null); + } + + /** Represents a DockerImage. */ + class DockerImage implements IDockerImage { + + /** + * Constructs a new DockerImage. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IDockerImage); + + /** DockerImage name. */ + public name: string; + + /** DockerImage uri. */ + public uri: string; + + /** DockerImage tags. */ + public tags: string[]; + + /** DockerImage imageSizeBytes. */ + public imageSizeBytes: (number|Long|string); + + /** DockerImage uploadTime. */ + public uploadTime?: (google.protobuf.ITimestamp|null); + + /** DockerImage mediaType. */ + public mediaType: string; + + /** DockerImage buildTime. */ + public buildTime?: (google.protobuf.ITimestamp|null); + + /** DockerImage updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DockerImage artifactType. */ + public artifactType: string; + + /** DockerImage imageManifests. */ + public imageManifests: google.devtools.artifactregistry.v1.IImageManifest[]; + + /** + * Creates a new DockerImage instance using the specified properties. + * @param [properties] Properties to set + * @returns DockerImage instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IDockerImage): google.devtools.artifactregistry.v1.DockerImage; + + /** + * Encodes the specified DockerImage message. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. + * @param message DockerImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IDockerImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DockerImage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. + * @param message DockerImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDockerImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DockerImage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DockerImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DockerImage; + + /** + * Decodes a DockerImage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DockerImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DockerImage; + + /** + * Verifies a DockerImage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DockerImage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DockerImage + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DockerImage; + + /** + * Creates a plain object from a DockerImage message. Also converts values to other types if specified. + * @param message DockerImage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.DockerImage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DockerImage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DockerImage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImageManifest. */ + interface IImageManifest { + + /** ImageManifest architecture */ + architecture?: (string|null); + + /** ImageManifest os */ + os?: (string|null); + + /** ImageManifest digest */ + digest?: (string|null); + + /** ImageManifest mediaType */ + mediaType?: (string|null); + + /** ImageManifest osVersion */ + osVersion?: (string|null); + + /** ImageManifest osFeatures */ + osFeatures?: (string[]|null); + + /** ImageManifest variant */ + variant?: (string|null); + } + + /** Represents an ImageManifest. */ + class ImageManifest implements IImageManifest { + + /** + * Constructs a new ImageManifest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImageManifest); + + /** ImageManifest architecture. */ + public architecture: string; + + /** ImageManifest os. */ + public os: string; + + /** ImageManifest digest. */ + public digest: string; + + /** ImageManifest mediaType. */ + public mediaType: string; + + /** ImageManifest osVersion. */ + public osVersion: string; + + /** ImageManifest osFeatures. */ + public osFeatures: string[]; + + /** ImageManifest variant. */ + public variant: string; + + /** + * Creates a new ImageManifest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageManifest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImageManifest): google.devtools.artifactregistry.v1.ImageManifest; + + /** + * Encodes the specified ImageManifest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImageManifest.verify|verify} messages. + * @param message ImageManifest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IImageManifest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageManifest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImageManifest.verify|verify} messages. + * @param message ImageManifest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImageManifest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageManifest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageManifest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImageManifest; + + /** + * Decodes an ImageManifest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageManifest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImageManifest; + + /** + * Verifies an ImageManifest 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 ImageManifest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageManifest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImageManifest; + + /** + * Creates a plain object from an ImageManifest message. Also converts values to other types if specified. + * @param message ImageManifest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ImageManifest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageManifest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageManifest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDockerImagesRequest. */ + interface IListDockerImagesRequest { + + /** ListDockerImagesRequest parent */ + parent?: (string|null); + + /** ListDockerImagesRequest pageSize */ + pageSize?: (number|null); + + /** ListDockerImagesRequest pageToken */ + pageToken?: (string|null); + + /** ListDockerImagesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDockerImagesRequest. */ + class ListDockerImagesRequest implements IListDockerImagesRequest { + + /** + * Constructs a new ListDockerImagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListDockerImagesRequest); + + /** ListDockerImagesRequest parent. */ + public parent: string; + + /** ListDockerImagesRequest pageSize. */ + public pageSize: number; + + /** ListDockerImagesRequest pageToken. */ + public pageToken: string; + + /** ListDockerImagesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDockerImagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDockerImagesRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListDockerImagesRequest): google.devtools.artifactregistry.v1.ListDockerImagesRequest; + + /** + * Encodes the specified ListDockerImagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. + * @param message ListDockerImagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListDockerImagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDockerImagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. + * @param message ListDockerImagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListDockerImagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDockerImagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDockerImagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListDockerImagesRequest; + + /** + * Decodes a ListDockerImagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDockerImagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListDockerImagesRequest; + + /** + * Verifies a ListDockerImagesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDockerImagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDockerImagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListDockerImagesRequest; + + /** + * Creates a plain object from a ListDockerImagesRequest message. Also converts values to other types if specified. + * @param message ListDockerImagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListDockerImagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDockerImagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDockerImagesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDockerImagesResponse. */ + interface IListDockerImagesResponse { + + /** ListDockerImagesResponse dockerImages */ + dockerImages?: (google.devtools.artifactregistry.v1.IDockerImage[]|null); + + /** ListDockerImagesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDockerImagesResponse. */ + class ListDockerImagesResponse implements IListDockerImagesResponse { + + /** + * Constructs a new ListDockerImagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListDockerImagesResponse); + + /** ListDockerImagesResponse dockerImages. */ + public dockerImages: google.devtools.artifactregistry.v1.IDockerImage[]; + + /** ListDockerImagesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDockerImagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDockerImagesResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListDockerImagesResponse): google.devtools.artifactregistry.v1.ListDockerImagesResponse; + + /** + * Encodes the specified ListDockerImagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. + * @param message ListDockerImagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListDockerImagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDockerImagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. + * @param message ListDockerImagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListDockerImagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDockerImagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDockerImagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListDockerImagesResponse; + + /** + * Decodes a ListDockerImagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDockerImagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListDockerImagesResponse; + + /** + * Verifies a ListDockerImagesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDockerImagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDockerImagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListDockerImagesResponse; + + /** + * Creates a plain object from a ListDockerImagesResponse message. Also converts values to other types if specified. + * @param message ListDockerImagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListDockerImagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDockerImagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDockerImagesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDockerImageRequest. */ + interface IGetDockerImageRequest { + + /** GetDockerImageRequest name */ + name?: (string|null); + } + + /** Represents a GetDockerImageRequest. */ + class GetDockerImageRequest implements IGetDockerImageRequest { + + /** + * Constructs a new GetDockerImageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetDockerImageRequest); + + /** GetDockerImageRequest name. */ + public name: string; + + /** + * Creates a new GetDockerImageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDockerImageRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetDockerImageRequest): google.devtools.artifactregistry.v1.GetDockerImageRequest; + + /** + * Encodes the specified GetDockerImageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetDockerImageRequest.verify|verify} messages. + * @param message GetDockerImageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetDockerImageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDockerImageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetDockerImageRequest.verify|verify} messages. + * @param message GetDockerImageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetDockerImageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDockerImageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDockerImageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetDockerImageRequest; + + /** + * Decodes a GetDockerImageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDockerImageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetDockerImageRequest; + + /** + * Verifies a GetDockerImageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDockerImageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDockerImageRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetDockerImageRequest; + + /** + * Creates a plain object from a GetDockerImageRequest message. Also converts values to other types if specified. + * @param message GetDockerImageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetDockerImageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDockerImageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDockerImageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MavenArtifact. */ + interface IMavenArtifact { + + /** MavenArtifact name */ + name?: (string|null); + + /** MavenArtifact pomUri */ + pomUri?: (string|null); + + /** MavenArtifact groupId */ + groupId?: (string|null); + + /** MavenArtifact artifactId */ + artifactId?: (string|null); + + /** MavenArtifact version */ + version?: (string|null); + + /** MavenArtifact createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** MavenArtifact updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a MavenArtifact. */ + class MavenArtifact implements IMavenArtifact { + + /** + * Constructs a new MavenArtifact. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IMavenArtifact); + + /** MavenArtifact name. */ + public name: string; + + /** MavenArtifact pomUri. */ + public pomUri: string; + + /** MavenArtifact groupId. */ + public groupId: string; + + /** MavenArtifact artifactId. */ + public artifactId: string; + + /** MavenArtifact version. */ + public version: string; + + /** MavenArtifact createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** MavenArtifact updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new MavenArtifact instance using the specified properties. + * @param [properties] Properties to set + * @returns MavenArtifact instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IMavenArtifact): google.devtools.artifactregistry.v1.MavenArtifact; + + /** + * Encodes the specified MavenArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.MavenArtifact.verify|verify} messages. + * @param message MavenArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IMavenArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MavenArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.MavenArtifact.verify|verify} messages. + * @param message MavenArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IMavenArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MavenArtifact message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MavenArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.MavenArtifact; + + /** + * Decodes a MavenArtifact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MavenArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.MavenArtifact; + + /** + * Verifies a MavenArtifact 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 MavenArtifact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MavenArtifact + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.MavenArtifact; + + /** + * Creates a plain object from a MavenArtifact message. Also converts values to other types if specified. + * @param message MavenArtifact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.MavenArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MavenArtifact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MavenArtifact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMavenArtifactsRequest. */ + interface IListMavenArtifactsRequest { + + /** ListMavenArtifactsRequest parent */ + parent?: (string|null); + + /** ListMavenArtifactsRequest pageSize */ + pageSize?: (number|null); + + /** ListMavenArtifactsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListMavenArtifactsRequest. */ + class ListMavenArtifactsRequest implements IListMavenArtifactsRequest { + + /** + * Constructs a new ListMavenArtifactsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListMavenArtifactsRequest); + + /** ListMavenArtifactsRequest parent. */ + public parent: string; + + /** ListMavenArtifactsRequest pageSize. */ + public pageSize: number; + + /** ListMavenArtifactsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListMavenArtifactsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMavenArtifactsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListMavenArtifactsRequest): google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; + + /** + * Encodes the specified ListMavenArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.verify|verify} messages. + * @param message ListMavenArtifactsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMavenArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.verify|verify} messages. + * @param message ListMavenArtifactsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMavenArtifactsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMavenArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; + + /** + * Decodes a ListMavenArtifactsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMavenArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; + + /** + * Verifies a ListMavenArtifactsRequest 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 ListMavenArtifactsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMavenArtifactsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; + + /** + * Creates a plain object from a ListMavenArtifactsRequest message. Also converts values to other types if specified. + * @param message ListMavenArtifactsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListMavenArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMavenArtifactsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMavenArtifactsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMavenArtifactsResponse. */ + interface IListMavenArtifactsResponse { + + /** ListMavenArtifactsResponse mavenArtifacts */ + mavenArtifacts?: (google.devtools.artifactregistry.v1.IMavenArtifact[]|null); + + /** ListMavenArtifactsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMavenArtifactsResponse. */ + class ListMavenArtifactsResponse implements IListMavenArtifactsResponse { + + /** + * Constructs a new ListMavenArtifactsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListMavenArtifactsResponse); + + /** ListMavenArtifactsResponse mavenArtifacts. */ + public mavenArtifacts: google.devtools.artifactregistry.v1.IMavenArtifact[]; + + /** ListMavenArtifactsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMavenArtifactsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMavenArtifactsResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListMavenArtifactsResponse): google.devtools.artifactregistry.v1.ListMavenArtifactsResponse; + + /** + * Encodes the specified ListMavenArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.verify|verify} messages. + * @param message ListMavenArtifactsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListMavenArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMavenArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.verify|verify} messages. + * @param message ListMavenArtifactsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListMavenArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMavenArtifactsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMavenArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListMavenArtifactsResponse; + + /** + * Decodes a ListMavenArtifactsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMavenArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListMavenArtifactsResponse; + + /** + * Verifies a ListMavenArtifactsResponse 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 ListMavenArtifactsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMavenArtifactsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListMavenArtifactsResponse; + + /** + * Creates a plain object from a ListMavenArtifactsResponse message. Also converts values to other types if specified. + * @param message ListMavenArtifactsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListMavenArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMavenArtifactsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMavenArtifactsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMavenArtifactRequest. */ + interface IGetMavenArtifactRequest { + + /** GetMavenArtifactRequest name */ + name?: (string|null); + } + + /** Represents a GetMavenArtifactRequest. */ + class GetMavenArtifactRequest implements IGetMavenArtifactRequest { + + /** + * Constructs a new GetMavenArtifactRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetMavenArtifactRequest); + + /** GetMavenArtifactRequest name. */ + public name: string; + + /** + * Creates a new GetMavenArtifactRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMavenArtifactRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetMavenArtifactRequest): google.devtools.artifactregistry.v1.GetMavenArtifactRequest; + + /** + * Encodes the specified GetMavenArtifactRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetMavenArtifactRequest.verify|verify} messages. + * @param message GetMavenArtifactRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetMavenArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMavenArtifactRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetMavenArtifactRequest.verify|verify} messages. + * @param message GetMavenArtifactRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetMavenArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMavenArtifactRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMavenArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetMavenArtifactRequest; + + /** + * Decodes a GetMavenArtifactRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMavenArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetMavenArtifactRequest; + + /** + * Verifies a GetMavenArtifactRequest 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 GetMavenArtifactRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMavenArtifactRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetMavenArtifactRequest; + + /** + * Creates a plain object from a GetMavenArtifactRequest message. Also converts values to other types if specified. + * @param message GetMavenArtifactRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetMavenArtifactRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMavenArtifactRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMavenArtifactRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NpmPackage. */ + interface INpmPackage { + + /** NpmPackage name */ + name?: (string|null); + + /** NpmPackage packageName */ + packageName?: (string|null); + + /** NpmPackage version */ + version?: (string|null); + + /** NpmPackage tags */ + tags?: (string[]|null); + + /** NpmPackage createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** NpmPackage updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a NpmPackage. */ + class NpmPackage implements INpmPackage { + + /** + * Constructs a new NpmPackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.INpmPackage); + + /** NpmPackage name. */ + public name: string; + + /** NpmPackage packageName. */ + public packageName: string; + + /** NpmPackage version. */ + public version: string; + + /** NpmPackage tags. */ + public tags: string[]; + + /** NpmPackage createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** NpmPackage updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new NpmPackage instance using the specified properties. + * @param [properties] Properties to set + * @returns NpmPackage instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.INpmPackage): google.devtools.artifactregistry.v1.NpmPackage; + + /** + * Encodes the specified NpmPackage message. Does not implicitly {@link google.devtools.artifactregistry.v1.NpmPackage.verify|verify} messages. + * @param message NpmPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.INpmPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NpmPackage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.NpmPackage.verify|verify} messages. + * @param message NpmPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.INpmPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NpmPackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NpmPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.NpmPackage; + + /** + * Decodes a NpmPackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NpmPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.NpmPackage; + + /** + * Verifies a NpmPackage 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 NpmPackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NpmPackage + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.NpmPackage; + + /** + * Creates a plain object from a NpmPackage message. Also converts values to other types if specified. + * @param message NpmPackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.NpmPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NpmPackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NpmPackage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListNpmPackagesRequest. */ + interface IListNpmPackagesRequest { + + /** ListNpmPackagesRequest parent */ + parent?: (string|null); + + /** ListNpmPackagesRequest pageSize */ + pageSize?: (number|null); + + /** ListNpmPackagesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListNpmPackagesRequest. */ + class ListNpmPackagesRequest implements IListNpmPackagesRequest { + + /** + * Constructs a new ListNpmPackagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListNpmPackagesRequest); + + /** ListNpmPackagesRequest parent. */ + public parent: string; + + /** ListNpmPackagesRequest pageSize. */ + public pageSize: number; + + /** ListNpmPackagesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListNpmPackagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNpmPackagesRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListNpmPackagesRequest): google.devtools.artifactregistry.v1.ListNpmPackagesRequest; + + /** + * Encodes the specified ListNpmPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesRequest.verify|verify} messages. + * @param message ListNpmPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListNpmPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListNpmPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesRequest.verify|verify} messages. + * @param message ListNpmPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListNpmPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListNpmPackagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListNpmPackagesRequest; + + /** + * Decodes a ListNpmPackagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListNpmPackagesRequest; + + /** + * Verifies a ListNpmPackagesRequest 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 ListNpmPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNpmPackagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListNpmPackagesRequest; + + /** + * Creates a plain object from a ListNpmPackagesRequest message. Also converts values to other types if specified. + * @param message ListNpmPackagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListNpmPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListNpmPackagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListNpmPackagesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListNpmPackagesResponse. */ + interface IListNpmPackagesResponse { + + /** ListNpmPackagesResponse npmPackages */ + npmPackages?: (google.devtools.artifactregistry.v1.INpmPackage[]|null); + + /** ListNpmPackagesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListNpmPackagesResponse. */ + class ListNpmPackagesResponse implements IListNpmPackagesResponse { + + /** + * Constructs a new ListNpmPackagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListNpmPackagesResponse); + + /** ListNpmPackagesResponse npmPackages. */ + public npmPackages: google.devtools.artifactregistry.v1.INpmPackage[]; + + /** ListNpmPackagesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListNpmPackagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNpmPackagesResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListNpmPackagesResponse): google.devtools.artifactregistry.v1.ListNpmPackagesResponse; + + /** + * Encodes the specified ListNpmPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesResponse.verify|verify} messages. + * @param message ListNpmPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListNpmPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListNpmPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesResponse.verify|verify} messages. + * @param message ListNpmPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListNpmPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListNpmPackagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListNpmPackagesResponse; + + /** + * Decodes a ListNpmPackagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListNpmPackagesResponse; + + /** + * Verifies a ListNpmPackagesResponse 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 ListNpmPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNpmPackagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListNpmPackagesResponse; + + /** + * Creates a plain object from a ListNpmPackagesResponse message. Also converts values to other types if specified. + * @param message ListNpmPackagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListNpmPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListNpmPackagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListNpmPackagesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetNpmPackageRequest. */ + interface IGetNpmPackageRequest { + + /** GetNpmPackageRequest name */ + name?: (string|null); + } + + /** Represents a GetNpmPackageRequest. */ + class GetNpmPackageRequest implements IGetNpmPackageRequest { + + /** + * Constructs a new GetNpmPackageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetNpmPackageRequest); + + /** GetNpmPackageRequest name. */ + public name: string; + + /** + * Creates a new GetNpmPackageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNpmPackageRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetNpmPackageRequest): google.devtools.artifactregistry.v1.GetNpmPackageRequest; + + /** + * Encodes the specified GetNpmPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetNpmPackageRequest.verify|verify} messages. + * @param message GetNpmPackageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetNpmPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetNpmPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetNpmPackageRequest.verify|verify} messages. + * @param message GetNpmPackageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetNpmPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetNpmPackageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNpmPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetNpmPackageRequest; + + /** + * Decodes a GetNpmPackageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNpmPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetNpmPackageRequest; + + /** + * Verifies a GetNpmPackageRequest 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 GetNpmPackageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNpmPackageRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetNpmPackageRequest; + + /** + * Creates a plain object from a GetNpmPackageRequest message. Also converts values to other types if specified. + * @param message GetNpmPackageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetNpmPackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetNpmPackageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetNpmPackageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonPackage. */ + interface IPythonPackage { + + /** PythonPackage name */ + name?: (string|null); + + /** PythonPackage uri */ + uri?: (string|null); + + /** PythonPackage packageName */ + packageName?: (string|null); + + /** PythonPackage version */ + version?: (string|null); + + /** PythonPackage createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** PythonPackage updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a PythonPackage. */ + class PythonPackage implements IPythonPackage { + + /** + * Constructs a new PythonPackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IPythonPackage); + + /** PythonPackage name. */ + public name: string; + + /** PythonPackage uri. */ + public uri: string; + + /** PythonPackage packageName. */ + public packageName: string; + + /** PythonPackage version. */ + public version: string; + + /** PythonPackage createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** PythonPackage updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new PythonPackage instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonPackage instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IPythonPackage): google.devtools.artifactregistry.v1.PythonPackage; + + /** + * Encodes the specified PythonPackage message. Does not implicitly {@link google.devtools.artifactregistry.v1.PythonPackage.verify|verify} messages. + * @param message PythonPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IPythonPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonPackage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.PythonPackage.verify|verify} messages. + * @param message PythonPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IPythonPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonPackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.PythonPackage; + + /** + * Decodes a PythonPackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.PythonPackage; + + /** + * Verifies a PythonPackage 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 PythonPackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonPackage + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.PythonPackage; + + /** + * Creates a plain object from a PythonPackage message. Also converts values to other types if specified. + * @param message PythonPackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.PythonPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonPackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonPackage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPythonPackagesRequest. */ + interface IListPythonPackagesRequest { + + /** ListPythonPackagesRequest parent */ + parent?: (string|null); + + /** ListPythonPackagesRequest pageSize */ + pageSize?: (number|null); + + /** ListPythonPackagesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListPythonPackagesRequest. */ + class ListPythonPackagesRequest implements IListPythonPackagesRequest { + + /** + * Constructs a new ListPythonPackagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListPythonPackagesRequest); + + /** ListPythonPackagesRequest parent. */ + public parent: string; + + /** ListPythonPackagesRequest pageSize. */ + public pageSize: number; + + /** ListPythonPackagesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListPythonPackagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPythonPackagesRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListPythonPackagesRequest): google.devtools.artifactregistry.v1.ListPythonPackagesRequest; + + /** + * Encodes the specified ListPythonPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesRequest.verify|verify} messages. + * @param message ListPythonPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListPythonPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPythonPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesRequest.verify|verify} messages. + * @param message ListPythonPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListPythonPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPythonPackagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPythonPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListPythonPackagesRequest; + + /** + * Decodes a ListPythonPackagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPythonPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListPythonPackagesRequest; + + /** + * Verifies a ListPythonPackagesRequest 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 ListPythonPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPythonPackagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListPythonPackagesRequest; + + /** + * Creates a plain object from a ListPythonPackagesRequest message. Also converts values to other types if specified. + * @param message ListPythonPackagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListPythonPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPythonPackagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPythonPackagesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPythonPackagesResponse. */ + interface IListPythonPackagesResponse { + + /** ListPythonPackagesResponse pythonPackages */ + pythonPackages?: (google.devtools.artifactregistry.v1.IPythonPackage[]|null); + + /** ListPythonPackagesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPythonPackagesResponse. */ + class ListPythonPackagesResponse implements IListPythonPackagesResponse { + + /** + * Constructs a new ListPythonPackagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListPythonPackagesResponse); + + /** ListPythonPackagesResponse pythonPackages. */ + public pythonPackages: google.devtools.artifactregistry.v1.IPythonPackage[]; + + /** ListPythonPackagesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPythonPackagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPythonPackagesResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListPythonPackagesResponse): google.devtools.artifactregistry.v1.ListPythonPackagesResponse; + + /** + * Encodes the specified ListPythonPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesResponse.verify|verify} messages. + * @param message ListPythonPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListPythonPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPythonPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesResponse.verify|verify} messages. + * @param message ListPythonPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListPythonPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPythonPackagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPythonPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListPythonPackagesResponse; + + /** + * Decodes a ListPythonPackagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPythonPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListPythonPackagesResponse; + + /** + * Verifies a ListPythonPackagesResponse 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 ListPythonPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPythonPackagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListPythonPackagesResponse; + + /** + * Creates a plain object from a ListPythonPackagesResponse message. Also converts values to other types if specified. + * @param message ListPythonPackagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListPythonPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPythonPackagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPythonPackagesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPythonPackageRequest. */ + interface IGetPythonPackageRequest { + + /** GetPythonPackageRequest name */ + name?: (string|null); + } + + /** Represents a GetPythonPackageRequest. */ + class GetPythonPackageRequest implements IGetPythonPackageRequest { + + /** + * Constructs a new GetPythonPackageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetPythonPackageRequest); + + /** GetPythonPackageRequest name. */ + public name: string; + + /** + * Creates a new GetPythonPackageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPythonPackageRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetPythonPackageRequest): google.devtools.artifactregistry.v1.GetPythonPackageRequest; + + /** + * Encodes the specified GetPythonPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPythonPackageRequest.verify|verify} messages. + * @param message GetPythonPackageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetPythonPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPythonPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPythonPackageRequest.verify|verify} messages. + * @param message GetPythonPackageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetPythonPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPythonPackageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPythonPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetPythonPackageRequest; + + /** + * Decodes a GetPythonPackageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPythonPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetPythonPackageRequest; + + /** + * Verifies a GetPythonPackageRequest 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 GetPythonPackageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPythonPackageRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetPythonPackageRequest; + + /** + * Creates a plain object from a GetPythonPackageRequest message. Also converts values to other types if specified. + * @param message GetPythonPackageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetPythonPackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPythonPackageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPythonPackageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Attachment. */ + interface IAttachment { + + /** Attachment name */ + name?: (string|null); + + /** Attachment target */ + target?: (string|null); + + /** Attachment type */ + type?: (string|null); + + /** Attachment attachmentNamespace */ + attachmentNamespace?: (string|null); + + /** Attachment annotations */ + annotations?: ({ [k: string]: string }|null); + + /** Attachment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Attachment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Attachment files */ + files?: (string[]|null); + + /** Attachment ociVersionName */ + ociVersionName?: (string|null); + } + + /** Represents an Attachment. */ + class Attachment implements IAttachment { + + /** + * Constructs a new Attachment. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IAttachment); + + /** Attachment name. */ + public name: string; + + /** Attachment target. */ + public target: string; + + /** Attachment type. */ + public type: string; + + /** Attachment attachmentNamespace. */ + public attachmentNamespace: string; + + /** Attachment annotations. */ + public annotations: { [k: string]: string }; + + /** Attachment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Attachment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Attachment files. */ + public files: string[]; + + /** Attachment ociVersionName. */ + public ociVersionName: string; + + /** + * Creates a new Attachment instance using the specified properties. + * @param [properties] Properties to set + * @returns Attachment instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IAttachment): google.devtools.artifactregistry.v1.Attachment; + + /** + * Encodes the specified Attachment message. Does not implicitly {@link google.devtools.artifactregistry.v1.Attachment.verify|verify} messages. + * @param message Attachment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IAttachment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Attachment message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Attachment.verify|verify} messages. + * @param message Attachment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IAttachment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Attachment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Attachment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Attachment; + + /** + * Decodes an Attachment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Attachment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Attachment; + + /** + * Verifies an Attachment 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 Attachment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Attachment + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Attachment; + + /** + * Creates a plain object from an Attachment message. Also converts values to other types if specified. + * @param message Attachment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Attachment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Attachment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Attachment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAttachmentsRequest. */ + interface IListAttachmentsRequest { + + /** ListAttachmentsRequest parent */ + parent?: (string|null); + + /** ListAttachmentsRequest filter */ + filter?: (string|null); + + /** ListAttachmentsRequest pageSize */ + pageSize?: (number|null); + + /** ListAttachmentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAttachmentsRequest. */ + class ListAttachmentsRequest implements IListAttachmentsRequest { + + /** + * Constructs a new ListAttachmentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListAttachmentsRequest); + + /** ListAttachmentsRequest parent. */ + public parent: string; + + /** ListAttachmentsRequest filter. */ + public filter: string; + + /** ListAttachmentsRequest pageSize. */ + public pageSize: number; + + /** ListAttachmentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAttachmentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAttachmentsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListAttachmentsRequest): google.devtools.artifactregistry.v1.ListAttachmentsRequest; + + /** + * Encodes the specified ListAttachmentsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsRequest.verify|verify} messages. + * @param message ListAttachmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListAttachmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAttachmentsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsRequest.verify|verify} messages. + * @param message ListAttachmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListAttachmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAttachmentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAttachmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListAttachmentsRequest; + + /** + * Decodes a ListAttachmentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAttachmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListAttachmentsRequest; + + /** + * Verifies a ListAttachmentsRequest 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 ListAttachmentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAttachmentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListAttachmentsRequest; + + /** + * Creates a plain object from a ListAttachmentsRequest message. Also converts values to other types if specified. + * @param message ListAttachmentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListAttachmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAttachmentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAttachmentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAttachmentsResponse. */ + interface IListAttachmentsResponse { + + /** ListAttachmentsResponse attachments */ + attachments?: (google.devtools.artifactregistry.v1.IAttachment[]|null); + + /** ListAttachmentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAttachmentsResponse. */ + class ListAttachmentsResponse implements IListAttachmentsResponse { + + /** + * Constructs a new ListAttachmentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListAttachmentsResponse); + + /** ListAttachmentsResponse attachments. */ + public attachments: google.devtools.artifactregistry.v1.IAttachment[]; + + /** ListAttachmentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAttachmentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAttachmentsResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListAttachmentsResponse): google.devtools.artifactregistry.v1.ListAttachmentsResponse; + + /** + * Encodes the specified ListAttachmentsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsResponse.verify|verify} messages. + * @param message ListAttachmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListAttachmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAttachmentsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsResponse.verify|verify} messages. + * @param message ListAttachmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListAttachmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAttachmentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAttachmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListAttachmentsResponse; + + /** + * Decodes a ListAttachmentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAttachmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListAttachmentsResponse; + + /** + * Verifies a ListAttachmentsResponse 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 ListAttachmentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAttachmentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListAttachmentsResponse; + + /** + * Creates a plain object from a ListAttachmentsResponse message. Also converts values to other types if specified. + * @param message ListAttachmentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListAttachmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAttachmentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAttachmentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAttachmentRequest. */ + interface IGetAttachmentRequest { + + /** GetAttachmentRequest name */ + name?: (string|null); + } + + /** Represents a GetAttachmentRequest. */ + class GetAttachmentRequest implements IGetAttachmentRequest { + + /** + * Constructs a new GetAttachmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetAttachmentRequest); + + /** GetAttachmentRequest name. */ + public name: string; + + /** + * Creates a new GetAttachmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAttachmentRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetAttachmentRequest): google.devtools.artifactregistry.v1.GetAttachmentRequest; + + /** + * Encodes the specified GetAttachmentRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetAttachmentRequest.verify|verify} messages. + * @param message GetAttachmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetAttachmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAttachmentRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetAttachmentRequest.verify|verify} messages. + * @param message GetAttachmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetAttachmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAttachmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAttachmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetAttachmentRequest; + + /** + * Decodes a GetAttachmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAttachmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetAttachmentRequest; + + /** + * Verifies a GetAttachmentRequest 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 GetAttachmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAttachmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetAttachmentRequest; + + /** + * Creates a plain object from a GetAttachmentRequest message. Also converts values to other types if specified. + * @param message GetAttachmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetAttachmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAttachmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAttachmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAttachmentRequest. */ + interface ICreateAttachmentRequest { + + /** CreateAttachmentRequest parent */ + parent?: (string|null); + + /** CreateAttachmentRequest attachmentId */ + attachmentId?: (string|null); + + /** CreateAttachmentRequest attachment */ + attachment?: (google.devtools.artifactregistry.v1.IAttachment|null); + } + + /** Represents a CreateAttachmentRequest. */ + class CreateAttachmentRequest implements ICreateAttachmentRequest { + + /** + * Constructs a new CreateAttachmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.ICreateAttachmentRequest); + + /** CreateAttachmentRequest parent. */ + public parent: string; + + /** CreateAttachmentRequest attachmentId. */ + public attachmentId: string; + + /** CreateAttachmentRequest attachment. */ + public attachment?: (google.devtools.artifactregistry.v1.IAttachment|null); + + /** + * Creates a new CreateAttachmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAttachmentRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.ICreateAttachmentRequest): google.devtools.artifactregistry.v1.CreateAttachmentRequest; + + /** + * Encodes the specified CreateAttachmentRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateAttachmentRequest.verify|verify} messages. + * @param message CreateAttachmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.ICreateAttachmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAttachmentRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateAttachmentRequest.verify|verify} messages. + * @param message CreateAttachmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICreateAttachmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAttachmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAttachmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.CreateAttachmentRequest; + + /** + * Decodes a CreateAttachmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAttachmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.CreateAttachmentRequest; + + /** + * Verifies a CreateAttachmentRequest 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 CreateAttachmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAttachmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CreateAttachmentRequest; + + /** + * Creates a plain object from a CreateAttachmentRequest message. Also converts values to other types if specified. + * @param message CreateAttachmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.CreateAttachmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAttachmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAttachmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAttachmentRequest. */ + interface IDeleteAttachmentRequest { + + /** DeleteAttachmentRequest name */ + name?: (string|null); + } + + /** Represents a DeleteAttachmentRequest. */ + class DeleteAttachmentRequest implements IDeleteAttachmentRequest { + + /** + * Constructs a new DeleteAttachmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IDeleteAttachmentRequest); + + /** DeleteAttachmentRequest name. */ + public name: string; + + /** + * Creates a new DeleteAttachmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAttachmentRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IDeleteAttachmentRequest): google.devtools.artifactregistry.v1.DeleteAttachmentRequest; + + /** + * Encodes the specified DeleteAttachmentRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteAttachmentRequest.verify|verify} messages. + * @param message DeleteAttachmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IDeleteAttachmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAttachmentRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteAttachmentRequest.verify|verify} messages. + * @param message DeleteAttachmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteAttachmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAttachmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAttachmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DeleteAttachmentRequest; + + /** + * Decodes a DeleteAttachmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAttachmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DeleteAttachmentRequest; + + /** + * Verifies a DeleteAttachmentRequest 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 DeleteAttachmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAttachmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteAttachmentRequest; + + /** + * Creates a plain object from a DeleteAttachmentRequest message. Also converts values to other types if specified. + * @param message DeleteAttachmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.DeleteAttachmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAttachmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAttachmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportArtifactRequest. */ + interface IExportArtifactRequest { + + /** ExportArtifactRequest sourceVersion */ + sourceVersion?: (string|null); + + /** ExportArtifactRequest sourceTag */ + sourceTag?: (string|null); + + /** ExportArtifactRequest gcsPath */ + gcsPath?: (string|null); + + /** ExportArtifactRequest repository */ + repository?: (string|null); + } + + /** Represents an ExportArtifactRequest. */ + class ExportArtifactRequest implements IExportArtifactRequest { + + /** + * Constructs a new ExportArtifactRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IExportArtifactRequest); + + /** ExportArtifactRequest sourceVersion. */ + public sourceVersion?: (string|null); + + /** ExportArtifactRequest sourceTag. */ + public sourceTag?: (string|null); + + /** ExportArtifactRequest gcsPath. */ + public gcsPath?: (string|null); + + /** ExportArtifactRequest repository. */ + public repository: string; + + /** ExportArtifactRequest sourceArtifact. */ + public sourceArtifact?: ("sourceVersion"|"sourceTag"); + + /** ExportArtifactRequest destination. */ + public destination?: "gcsPath"; + + /** + * Creates a new ExportArtifactRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportArtifactRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IExportArtifactRequest): google.devtools.artifactregistry.v1.ExportArtifactRequest; + + /** + * Encodes the specified ExportArtifactRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactRequest.verify|verify} messages. + * @param message ExportArtifactRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IExportArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportArtifactRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactRequest.verify|verify} messages. + * @param message ExportArtifactRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IExportArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportArtifactRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ExportArtifactRequest; + + /** + * Decodes an ExportArtifactRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ExportArtifactRequest; + + /** + * Verifies an ExportArtifactRequest 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 ExportArtifactRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportArtifactRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ExportArtifactRequest; + + /** + * Creates a plain object from an ExportArtifactRequest message. Also converts values to other types if specified. + * @param message ExportArtifactRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ExportArtifactRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportArtifactRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportArtifactRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportArtifactResponse. */ + interface IExportArtifactResponse { + + /** ExportArtifactResponse exportedVersion */ + exportedVersion?: (google.devtools.artifactregistry.v1.IVersion|null); + } + + /** Represents an ExportArtifactResponse. */ + class ExportArtifactResponse implements IExportArtifactResponse { + + /** + * Constructs a new ExportArtifactResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IExportArtifactResponse); + + /** ExportArtifactResponse exportedVersion. */ + public exportedVersion?: (google.devtools.artifactregistry.v1.IVersion|null); + + /** + * Creates a new ExportArtifactResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportArtifactResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IExportArtifactResponse): google.devtools.artifactregistry.v1.ExportArtifactResponse; + + /** + * Encodes the specified ExportArtifactResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactResponse.verify|verify} messages. + * @param message ExportArtifactResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IExportArtifactResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportArtifactResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactResponse.verify|verify} messages. + * @param message ExportArtifactResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IExportArtifactResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportArtifactResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportArtifactResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ExportArtifactResponse; + + /** + * Decodes an ExportArtifactResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportArtifactResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ExportArtifactResponse; + + /** + * Verifies an ExportArtifactResponse 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 ExportArtifactResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportArtifactResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ExportArtifactResponse; + + /** + * Creates a plain object from an ExportArtifactResponse message. Also converts values to other types if specified. + * @param message ExportArtifactResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ExportArtifactResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportArtifactResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportArtifactResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportArtifactMetadata. */ + interface IExportArtifactMetadata { + + /** ExportArtifactMetadata exportedFiles */ + exportedFiles?: (google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile[]|null); + } + + /** Represents an ExportArtifactMetadata. */ + class ExportArtifactMetadata implements IExportArtifactMetadata { + + /** + * Constructs a new ExportArtifactMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IExportArtifactMetadata); + + /** ExportArtifactMetadata exportedFiles. */ + public exportedFiles: google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile[]; + + /** + * Creates a new ExportArtifactMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportArtifactMetadata instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IExportArtifactMetadata): google.devtools.artifactregistry.v1.ExportArtifactMetadata; + + /** + * Encodes the specified ExportArtifactMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.verify|verify} messages. + * @param message ExportArtifactMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IExportArtifactMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportArtifactMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.verify|verify} messages. + * @param message ExportArtifactMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IExportArtifactMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportArtifactMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportArtifactMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ExportArtifactMetadata; + + /** + * Decodes an ExportArtifactMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportArtifactMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ExportArtifactMetadata; + + /** + * Verifies an ExportArtifactMetadata 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 ExportArtifactMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportArtifactMetadata + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ExportArtifactMetadata; + + /** + * Creates a plain object from an ExportArtifactMetadata message. Also converts values to other types if specified. + * @param message ExportArtifactMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ExportArtifactMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportArtifactMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportArtifactMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExportArtifactMetadata { + + /** Properties of an ExportedFile. */ + interface IExportedFile { + + /** ExportedFile gcsObjectPath */ + gcsObjectPath?: (string|null); + + /** ExportedFile name */ + name?: (string|null); + + /** ExportedFile hashes */ + hashes?: (google.devtools.artifactregistry.v1.IHash[]|null); + } + + /** Represents an ExportedFile. */ + class ExportedFile implements IExportedFile { + + /** + * Constructs a new ExportedFile. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile); + + /** ExportedFile gcsObjectPath. */ + public gcsObjectPath?: (string|null); + + /** ExportedFile name. */ + public name: string; + + /** ExportedFile hashes. */ + public hashes: google.devtools.artifactregistry.v1.IHash[]; + + /** ExportedFile destination. */ + public destination?: "gcsObjectPath"; + + /** + * Creates a new ExportedFile instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportedFile instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile): google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile; + + /** + * Encodes the specified ExportedFile message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.verify|verify} messages. + * @param message ExportedFile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportedFile message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.verify|verify} messages. + * @param message ExportedFile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportedFile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportedFile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile; + + /** + * Decodes an ExportedFile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportedFile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile; + + /** + * Verifies an ExportedFile 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 ExportedFile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportedFile + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile; + + /** + * Creates a plain object from an ExportedFile message. Also converts values to other types if specified. + * @param message ExportedFile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportedFile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportedFile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Hash. */ + interface IHash { + + /** Hash type */ + type?: (google.devtools.artifactregistry.v1.Hash.HashType|keyof typeof google.devtools.artifactregistry.v1.Hash.HashType|null); + + /** Hash value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents a Hash. */ + class Hash implements IHash { + + /** + * Constructs a new Hash. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IHash); + + /** Hash type. */ + public type: (google.devtools.artifactregistry.v1.Hash.HashType|keyof typeof google.devtools.artifactregistry.v1.Hash.HashType); + + /** Hash value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Hash instance using the specified properties. + * @param [properties] Properties to set + * @returns Hash instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IHash): google.devtools.artifactregistry.v1.Hash; + + /** + * Encodes the specified Hash message. Does not implicitly {@link google.devtools.artifactregistry.v1.Hash.verify|verify} messages. + * @param message Hash message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IHash, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Hash message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Hash.verify|verify} messages. + * @param message Hash message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IHash, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Hash message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Hash; + + /** + * Decodes a Hash message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Hash; + + /** + * Verifies a Hash message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Hash message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Hash + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Hash; + + /** + * Creates a plain object from a Hash message. Also converts values to other types if specified. + * @param message Hash + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Hash, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Hash to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Hash + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Hash { + + /** HashType enum. */ + enum HashType { + HASH_TYPE_UNSPECIFIED = 0, + SHA256 = 1, + MD5 = 2 + } + } + + /** Properties of a File. */ + interface IFile { + + /** File name */ + name?: (string|null); + + /** File sizeBytes */ + sizeBytes?: (number|Long|string|null); + + /** File hashes */ + hashes?: (google.devtools.artifactregistry.v1.IHash[]|null); + + /** File createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** File updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** File owner */ + owner?: (string|null); + + /** File fetchTime */ + fetchTime?: (google.protobuf.ITimestamp|null); + + /** File annotations */ + annotations?: ({ [k: string]: string }|null); + } + + /** Represents a File. */ + class File implements IFile { + + /** + * Constructs a new File. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IFile); + + /** File name. */ + public name: string; + + /** File sizeBytes. */ + public sizeBytes: (number|Long|string); + + /** File hashes. */ + public hashes: google.devtools.artifactregistry.v1.IHash[]; + + /** File createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** File updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** File owner. */ + public owner: string; + + /** File fetchTime. */ + public fetchTime?: (google.protobuf.ITimestamp|null); + + /** File annotations. */ + public annotations: { [k: string]: string }; + + /** + * Creates a new File instance using the specified properties. + * @param [properties] Properties to set + * @returns File instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IFile): google.devtools.artifactregistry.v1.File; + + /** + * Encodes the specified File message. Does not implicitly {@link google.devtools.artifactregistry.v1.File.verify|verify} messages. + * @param message File message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified File message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.File.verify|verify} messages. + * @param message File message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a File message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.File; + + /** + * Decodes a File message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.File; + + /** + * Verifies a File message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a File message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns File + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.File; + + /** + * Creates a plain object from a File message. Also converts values to other types if specified. + * @param message File + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this File to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for File + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFilesRequest. */ + interface IListFilesRequest { + + /** ListFilesRequest parent */ + parent?: (string|null); + + /** ListFilesRequest filter */ + filter?: (string|null); + + /** ListFilesRequest pageSize */ + pageSize?: (number|null); + + /** ListFilesRequest pageToken */ + pageToken?: (string|null); + + /** ListFilesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListFilesRequest. */ + class ListFilesRequest implements IListFilesRequest { + + /** + * Constructs a new ListFilesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListFilesRequest); + + /** ListFilesRequest parent. */ + public parent: string; + + /** ListFilesRequest filter. */ + public filter: string; + + /** ListFilesRequest pageSize. */ + public pageSize: number; + + /** ListFilesRequest pageToken. */ + public pageToken: string; + + /** ListFilesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListFilesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFilesRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListFilesRequest): google.devtools.artifactregistry.v1.ListFilesRequest; + + /** + * Encodes the specified ListFilesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesRequest.verify|verify} messages. + * @param message ListFilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFilesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesRequest.verify|verify} messages. + * @param message ListFilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFilesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListFilesRequest; + + /** + * Decodes a ListFilesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListFilesRequest; + + /** + * Verifies a ListFilesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFilesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFilesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListFilesRequest; + + /** + * Creates a plain object from a ListFilesRequest message. Also converts values to other types if specified. + * @param message ListFilesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListFilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFilesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFilesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFilesResponse. */ + interface IListFilesResponse { + + /** ListFilesResponse files */ + files?: (google.devtools.artifactregistry.v1.IFile[]|null); + + /** ListFilesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListFilesResponse. */ + class ListFilesResponse implements IListFilesResponse { + + /** + * Constructs a new ListFilesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListFilesResponse); + + /** ListFilesResponse files. */ + public files: google.devtools.artifactregistry.v1.IFile[]; + + /** ListFilesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListFilesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFilesResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListFilesResponse): google.devtools.artifactregistry.v1.ListFilesResponse; + + /** + * Encodes the specified ListFilesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesResponse.verify|verify} messages. + * @param message ListFilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFilesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesResponse.verify|verify} messages. + * @param message ListFilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFilesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListFilesResponse; + + /** + * Decodes a ListFilesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListFilesResponse; + + /** + * Verifies a ListFilesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFilesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFilesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListFilesResponse; + + /** + * Creates a plain object from a ListFilesResponse message. Also converts values to other types if specified. + * @param message ListFilesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListFilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFilesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFilesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetFileRequest. */ + interface IGetFileRequest { + + /** GetFileRequest name */ + name?: (string|null); + } + + /** Represents a GetFileRequest. */ + class GetFileRequest implements IGetFileRequest { + + /** + * Constructs a new GetFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetFileRequest); + + /** GetFileRequest name. */ + public name: string; + + /** + * Creates a new GetFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFileRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetFileRequest): google.devtools.artifactregistry.v1.GetFileRequest; + + /** + * Encodes the specified GetFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetFileRequest.verify|verify} messages. + * @param message GetFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetFileRequest.verify|verify} messages. + * @param message GetFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetFileRequest; + + /** + * Decodes a GetFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetFileRequest; + + /** + * Verifies a GetFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetFileRequest; + + /** + * Creates a plain object from a GetFileRequest message. Also converts values to other types if specified. + * @param message GetFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteFileRequest. */ + interface IDeleteFileRequest { + + /** DeleteFileRequest name */ + name?: (string|null); + } + + /** Represents a DeleteFileRequest. */ + class DeleteFileRequest implements IDeleteFileRequest { + + /** + * Constructs a new DeleteFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IDeleteFileRequest); + + /** DeleteFileRequest name. */ + public name: string; + + /** + * Creates a new DeleteFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFileRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IDeleteFileRequest): google.devtools.artifactregistry.v1.DeleteFileRequest; + + /** + * Encodes the specified DeleteFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteFileRequest.verify|verify} messages. + * @param message DeleteFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IDeleteFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteFileRequest.verify|verify} messages. + * @param message DeleteFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DeleteFileRequest; + + /** + * Decodes a DeleteFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DeleteFileRequest; + + /** + * Verifies a DeleteFileRequest 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 DeleteFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteFileRequest; + + /** + * Creates a plain object from a DeleteFileRequest message. Also converts values to other types if specified. + * @param message DeleteFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.DeleteFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFileRequest. */ + interface IUpdateFileRequest { + + /** UpdateFileRequest file */ + file?: (google.devtools.artifactregistry.v1.IFile|null); + + /** UpdateFileRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateFileRequest. */ + class UpdateFileRequest implements IUpdateFileRequest { + + /** + * Constructs a new UpdateFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IUpdateFileRequest); + + /** UpdateFileRequest file. */ + public file?: (google.devtools.artifactregistry.v1.IFile|null); + + /** UpdateFileRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFileRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IUpdateFileRequest): google.devtools.artifactregistry.v1.UpdateFileRequest; + + /** + * Encodes the specified UpdateFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateFileRequest.verify|verify} messages. + * @param message UpdateFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IUpdateFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateFileRequest.verify|verify} messages. + * @param message UpdateFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdateFileRequest; + + /** + * Decodes an UpdateFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdateFileRequest; + + /** + * Verifies an UpdateFileRequest 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 UpdateFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateFileRequest; + + /** + * Creates a plain object from an UpdateFileRequest message. Also converts values to other types if specified. + * @param message UpdateFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.UpdateFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VersionView enum. */ + enum VersionView { + VERSION_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 2 + } + + /** Properties of a Version. */ + interface IVersion { + + /** Version name */ + name?: (string|null); + + /** Version description */ + description?: (string|null); + + /** Version createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Version updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Version relatedTags */ + relatedTags?: (google.devtools.artifactregistry.v1.ITag[]|null); + + /** Version metadata */ + metadata?: (google.protobuf.IStruct|null); + + /** Version annotations */ + annotations?: ({ [k: string]: string }|null); + + /** Version fingerprints */ + fingerprints?: (google.devtools.artifactregistry.v1.IHash[]|null); + } + + /** Represents a Version. */ + class Version implements IVersion { + + /** + * Constructs a new Version. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IVersion); + + /** Version name. */ + public name: string; + + /** Version description. */ + public description: string; + + /** Version createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Version updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Version relatedTags. */ + public relatedTags: google.devtools.artifactregistry.v1.ITag[]; + + /** Version metadata. */ + public metadata?: (google.protobuf.IStruct|null); + + /** Version annotations. */ + public annotations: { [k: string]: string }; + + /** Version fingerprints. */ + public fingerprints: google.devtools.artifactregistry.v1.IHash[]; + + /** + * Creates a new Version instance using the specified properties. + * @param [properties] Properties to set + * @returns Version instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IVersion): google.devtools.artifactregistry.v1.Version; + + /** + * Encodes the specified Version message. Does not implicitly {@link google.devtools.artifactregistry.v1.Version.verify|verify} messages. + * @param message Version message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Version message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Version.verify|verify} messages. + * @param message Version message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Version message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Version + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Version; + + /** + * Decodes a Version message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Version + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Version; + + /** + * Verifies a Version message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Version message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Version + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Version; + + /** + * Creates a plain object from a Version message. Also converts values to other types if specified. + * @param message Version + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Version to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Version + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListVersionsRequest. */ + interface IListVersionsRequest { + + /** ListVersionsRequest parent */ + parent?: (string|null); + + /** ListVersionsRequest pageSize */ + pageSize?: (number|null); + + /** ListVersionsRequest pageToken */ + pageToken?: (string|null); + + /** ListVersionsRequest view */ + view?: (google.devtools.artifactregistry.v1.VersionView|keyof typeof google.devtools.artifactregistry.v1.VersionView|null); + + /** ListVersionsRequest orderBy */ + orderBy?: (string|null); + + /** ListVersionsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListVersionsRequest. */ + class ListVersionsRequest implements IListVersionsRequest { + + /** + * Constructs a new ListVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListVersionsRequest); + + /** ListVersionsRequest parent. */ + public parent: string; + + /** ListVersionsRequest pageSize. */ + public pageSize: number; + + /** ListVersionsRequest pageToken. */ + public pageToken: string; + + /** ListVersionsRequest view. */ + public view: (google.devtools.artifactregistry.v1.VersionView|keyof typeof google.devtools.artifactregistry.v1.VersionView); + + /** ListVersionsRequest orderBy. */ + public orderBy: string; + + /** ListVersionsRequest filter. */ + public filter: string; + + /** + * Creates a new ListVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVersionsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListVersionsRequest): google.devtools.artifactregistry.v1.ListVersionsRequest; + + /** + * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsRequest.verify|verify} messages. + * @param message ListVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsRequest.verify|verify} messages. + * @param message ListVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListVersionsRequest; + + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListVersionsRequest; + + /** + * Verifies a ListVersionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListVersionsRequest; + + /** + * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. + * @param message ListVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVersionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListVersionsResponse. */ + interface IListVersionsResponse { + + /** ListVersionsResponse versions */ + versions?: (google.devtools.artifactregistry.v1.IVersion[]|null); + + /** ListVersionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListVersionsResponse. */ + class ListVersionsResponse implements IListVersionsResponse { + + /** + * Constructs a new ListVersionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListVersionsResponse); + + /** ListVersionsResponse versions. */ + public versions: google.devtools.artifactregistry.v1.IVersion[]; + + /** ListVersionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListVersionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVersionsResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListVersionsResponse): google.devtools.artifactregistry.v1.ListVersionsResponse; + + /** + * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsResponse.verify|verify} messages. + * @param message ListVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsResponse.verify|verify} messages. + * @param message ListVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVersionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListVersionsResponse; + + /** + * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListVersionsResponse; + + /** + * Verifies a ListVersionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVersionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListVersionsResponse; + + /** + * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. + * @param message ListVersionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVersionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVersionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetVersionRequest. */ + interface IGetVersionRequest { + + /** GetVersionRequest name */ + name?: (string|null); + + /** GetVersionRequest view */ + view?: (google.devtools.artifactregistry.v1.VersionView|keyof typeof google.devtools.artifactregistry.v1.VersionView|null); + } + + /** Represents a GetVersionRequest. */ + class GetVersionRequest implements IGetVersionRequest { + + /** + * Constructs a new GetVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetVersionRequest); + + /** GetVersionRequest name. */ + public name: string; + + /** GetVersionRequest view. */ + public view: (google.devtools.artifactregistry.v1.VersionView|keyof typeof google.devtools.artifactregistry.v1.VersionView); + + /** + * Creates a new GetVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVersionRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetVersionRequest): google.devtools.artifactregistry.v1.GetVersionRequest; + + /** + * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVersionRequest.verify|verify} messages. + * @param message GetVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVersionRequest.verify|verify} messages. + * @param message GetVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetVersionRequest; + + /** + * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetVersionRequest; + + /** + * Verifies a GetVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetVersionRequest; + + /** + * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. + * @param message GetVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteVersionRequest. */ + interface IDeleteVersionRequest { + + /** DeleteVersionRequest name */ + name?: (string|null); + + /** DeleteVersionRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteVersionRequest. */ + class DeleteVersionRequest implements IDeleteVersionRequest { + + /** + * Constructs a new DeleteVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IDeleteVersionRequest); + + /** DeleteVersionRequest name. */ + public name: string; + + /** DeleteVersionRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteVersionRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IDeleteVersionRequest): google.devtools.artifactregistry.v1.DeleteVersionRequest; + + /** + * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteVersionRequest.verify|verify} messages. + * @param message DeleteVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteVersionRequest.verify|verify} messages. + * @param message DeleteVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DeleteVersionRequest; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DeleteVersionRequest; + + /** + * Verifies a DeleteVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteVersionRequest; + + /** + * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. + * @param message DeleteVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.DeleteVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchDeleteVersionsRequest. */ + interface IBatchDeleteVersionsRequest { + + /** BatchDeleteVersionsRequest parent */ + parent?: (string|null); + + /** BatchDeleteVersionsRequest names */ + names?: (string[]|null); + + /** BatchDeleteVersionsRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a BatchDeleteVersionsRequest. */ + class BatchDeleteVersionsRequest implements IBatchDeleteVersionsRequest { + + /** + * Constructs a new BatchDeleteVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest); + + /** BatchDeleteVersionsRequest parent. */ + public parent: string; + + /** BatchDeleteVersionsRequest names. */ + public names: string[]; + + /** BatchDeleteVersionsRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new BatchDeleteVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchDeleteVersionsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest): google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; + + /** + * Encodes the specified BatchDeleteVersionsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.verify|verify} messages. + * @param message BatchDeleteVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchDeleteVersionsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.verify|verify} messages. + * @param message BatchDeleteVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchDeleteVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchDeleteVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; + + /** + * Decodes a BatchDeleteVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchDeleteVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; + + /** + * Verifies a BatchDeleteVersionsRequest 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 BatchDeleteVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchDeleteVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; + + /** + * Creates a plain object from a BatchDeleteVersionsRequest message. Also converts values to other types if specified. + * @param message BatchDeleteVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchDeleteVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchDeleteVersionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchDeleteVersionsMetadata. */ + interface IBatchDeleteVersionsMetadata { + + /** BatchDeleteVersionsMetadata failedVersions */ + failedVersions?: (string[]|null); + } + + /** Represents a BatchDeleteVersionsMetadata. */ + class BatchDeleteVersionsMetadata implements IBatchDeleteVersionsMetadata { + + /** + * Constructs a new BatchDeleteVersionsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata); + + /** BatchDeleteVersionsMetadata failedVersions. */ + public failedVersions: string[]; + + /** + * Creates a new BatchDeleteVersionsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchDeleteVersionsMetadata instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata): google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata; + + /** + * Encodes the specified BatchDeleteVersionsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.verify|verify} messages. + * @param message BatchDeleteVersionsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchDeleteVersionsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.verify|verify} messages. + * @param message BatchDeleteVersionsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchDeleteVersionsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchDeleteVersionsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata; + + /** + * Decodes a BatchDeleteVersionsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchDeleteVersionsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata; + + /** + * Verifies a BatchDeleteVersionsMetadata 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 BatchDeleteVersionsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchDeleteVersionsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata; + + /** + * Creates a plain object from a BatchDeleteVersionsMetadata message. Also converts values to other types if specified. + * @param message BatchDeleteVersionsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchDeleteVersionsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchDeleteVersionsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateVersionRequest. */ + interface IUpdateVersionRequest { + + /** UpdateVersionRequest version */ + version?: (google.devtools.artifactregistry.v1.IVersion|null); + + /** UpdateVersionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateVersionRequest. */ + class UpdateVersionRequest implements IUpdateVersionRequest { + + /** + * Constructs a new UpdateVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IUpdateVersionRequest); + + /** UpdateVersionRequest version. */ + public version?: (google.devtools.artifactregistry.v1.IVersion|null); + + /** UpdateVersionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateVersionRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IUpdateVersionRequest): google.devtools.artifactregistry.v1.UpdateVersionRequest; + + /** + * Encodes the specified UpdateVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVersionRequest.verify|verify} messages. + * @param message UpdateVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IUpdateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVersionRequest.verify|verify} messages. + * @param message UpdateVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdateVersionRequest; + + /** + * Decodes an UpdateVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdateVersionRequest; + + /** + * Verifies an UpdateVersionRequest 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 UpdateVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateVersionRequest; + + /** + * Creates a plain object from an UpdateVersionRequest message. Also converts values to other types if specified. + * @param message UpdateVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.UpdateVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Tag. */ + interface ITag { + + /** Tag name */ + name?: (string|null); + + /** Tag version */ + version?: (string|null); + } + + /** Represents a Tag. */ + class Tag implements ITag { + + /** + * Constructs a new Tag. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.ITag); + + /** Tag name. */ + public name: string; + + /** Tag version. */ + public version: string; + + /** + * Creates a new Tag instance using the specified properties. + * @param [properties] Properties to set + * @returns Tag instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.ITag): google.devtools.artifactregistry.v1.Tag; + + /** + * Encodes the specified Tag message. Does not implicitly {@link google.devtools.artifactregistry.v1.Tag.verify|verify} messages. + * @param message Tag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.ITag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Tag.verify|verify} messages. + * @param message Tag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.ITag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tag message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Tag; + + /** + * Decodes a Tag message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Tag; + + /** + * Verifies a Tag message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Tag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tag + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Tag; + + /** + * Creates a plain object from a Tag message. Also converts values to other types if specified. + * @param message Tag + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Tag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Tag to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Tag + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTagsRequest. */ + interface IListTagsRequest { + + /** ListTagsRequest parent */ + parent?: (string|null); + + /** ListTagsRequest filter */ + filter?: (string|null); + + /** ListTagsRequest pageSize */ + pageSize?: (number|null); + + /** ListTagsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListTagsRequest. */ + class ListTagsRequest implements IListTagsRequest { + + /** + * Constructs a new ListTagsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListTagsRequest); + + /** ListTagsRequest parent. */ + public parent: string; + + /** ListTagsRequest filter. */ + public filter: string; + + /** ListTagsRequest pageSize. */ + public pageSize: number; + + /** ListTagsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListTagsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTagsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListTagsRequest): google.devtools.artifactregistry.v1.ListTagsRequest; + + /** + * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsRequest.verify|verify} messages. + * @param message ListTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsRequest.verify|verify} messages. + * @param message ListTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTagsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListTagsRequest; + + /** + * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListTagsRequest; + + /** + * Verifies a ListTagsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTagsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListTagsRequest; + + /** + * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. + * @param message ListTagsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTagsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTagsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTagsResponse. */ + interface IListTagsResponse { + + /** ListTagsResponse tags */ + tags?: (google.devtools.artifactregistry.v1.ITag[]|null); + + /** ListTagsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListTagsResponse. */ + class ListTagsResponse implements IListTagsResponse { + + /** + * Constructs a new ListTagsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListTagsResponse); + + /** ListTagsResponse tags. */ + public tags: google.devtools.artifactregistry.v1.ITag[]; + + /** ListTagsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListTagsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTagsResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListTagsResponse): google.devtools.artifactregistry.v1.ListTagsResponse; + + /** + * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsResponse.verify|verify} messages. + * @param message ListTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTagsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsResponse.verify|verify} messages. + * @param message ListTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTagsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListTagsResponse; + + /** + * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListTagsResponse; + + /** + * Verifies a ListTagsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTagsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListTagsResponse; + + /** + * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. + * @param message ListTagsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTagsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTagsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetTagRequest. */ + interface IGetTagRequest { + + /** GetTagRequest name */ + name?: (string|null); + } + + /** Represents a GetTagRequest. */ + class GetTagRequest implements IGetTagRequest { + + /** + * Constructs a new GetTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetTagRequest); + + /** GetTagRequest name. */ + public name: string; + + /** + * Creates a new GetTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTagRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetTagRequest): google.devtools.artifactregistry.v1.GetTagRequest; + + /** + * Encodes the specified GetTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetTagRequest.verify|verify} messages. + * @param message GetTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetTagRequest.verify|verify} messages. + * @param message GetTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetTagRequest; + + /** + * Decodes a GetTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetTagRequest; + + /** + * Verifies a GetTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetTagRequest; + + /** + * Creates a plain object from a GetTagRequest message. Also converts values to other types if specified. + * @param message GetTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetTagRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateTagRequest. */ + interface ICreateTagRequest { + + /** CreateTagRequest parent */ + parent?: (string|null); + + /** CreateTagRequest tagId */ + tagId?: (string|null); + + /** CreateTagRequest tag */ + tag?: (google.devtools.artifactregistry.v1.ITag|null); + } + + /** Represents a CreateTagRequest. */ + class CreateTagRequest implements ICreateTagRequest { + + /** + * Constructs a new CreateTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.ICreateTagRequest); + + /** CreateTagRequest parent. */ + public parent: string; + + /** CreateTagRequest tagId. */ + public tagId: string; + + /** CreateTagRequest tag. */ + public tag?: (google.devtools.artifactregistry.v1.ITag|null); + + /** + * Creates a new CreateTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTagRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.ICreateTagRequest): google.devtools.artifactregistry.v1.CreateTagRequest; + + /** + * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateTagRequest.verify|verify} messages. + * @param message CreateTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateTagRequest.verify|verify} messages. + * @param message CreateTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.CreateTagRequest; + + /** + * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.CreateTagRequest; + + /** + * Verifies a CreateTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CreateTagRequest; + + /** + * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. + * @param message CreateTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.CreateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTagRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateTagRequest. */ + interface IUpdateTagRequest { + + /** UpdateTagRequest tag */ + tag?: (google.devtools.artifactregistry.v1.ITag|null); + + /** UpdateTagRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateTagRequest. */ + class UpdateTagRequest implements IUpdateTagRequest { + + /** + * Constructs a new UpdateTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IUpdateTagRequest); + + /** UpdateTagRequest tag. */ + public tag?: (google.devtools.artifactregistry.v1.ITag|null); + + /** UpdateTagRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTagRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IUpdateTagRequest): google.devtools.artifactregistry.v1.UpdateTagRequest; + + /** + * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateTagRequest.verify|verify} messages. + * @param message UpdateTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateTagRequest.verify|verify} messages. + * @param message UpdateTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdateTagRequest; + + /** + * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdateTagRequest; + + /** + * Verifies an UpdateTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateTagRequest; + + /** + * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. + * @param message UpdateTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.UpdateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateTagRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteTagRequest. */ + interface IDeleteTagRequest { + + /** DeleteTagRequest name */ + name?: (string|null); + } + + /** Represents a DeleteTagRequest. */ + class DeleteTagRequest implements IDeleteTagRequest { + + /** + * Constructs a new DeleteTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IDeleteTagRequest); + + /** DeleteTagRequest name. */ + public name: string; + + /** + * Creates a new DeleteTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTagRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IDeleteTagRequest): google.devtools.artifactregistry.v1.DeleteTagRequest; + + /** + * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteTagRequest.verify|verify} messages. + * @param message DeleteTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteTagRequest.verify|verify} messages. + * @param message DeleteTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DeleteTagRequest; + + /** + * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DeleteTagRequest; + + /** + * Verifies a DeleteTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteTagRequest; + + /** + * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. + * @param message DeleteTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.DeleteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteTagRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GenericArtifact. */ + interface IGenericArtifact { + + /** GenericArtifact name */ + name?: (string|null); + + /** GenericArtifact version */ + version?: (string|null); + + /** GenericArtifact createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** GenericArtifact updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a GenericArtifact. */ + class GenericArtifact implements IGenericArtifact { + + /** + * Constructs a new GenericArtifact. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGenericArtifact); + + /** GenericArtifact name. */ + public name: string; + + /** GenericArtifact version. */ + public version: string; + + /** GenericArtifact createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** GenericArtifact updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new GenericArtifact instance using the specified properties. + * @param [properties] Properties to set + * @returns GenericArtifact instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGenericArtifact): google.devtools.artifactregistry.v1.GenericArtifact; + + /** + * Encodes the specified GenericArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.GenericArtifact.verify|verify} messages. + * @param message GenericArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGenericArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenericArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GenericArtifact.verify|verify} messages. + * @param message GenericArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGenericArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenericArtifact message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenericArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GenericArtifact; + + /** + * Decodes a GenericArtifact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenericArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GenericArtifact; + + /** + * Verifies a GenericArtifact 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 GenericArtifact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenericArtifact + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GenericArtifact; + + /** + * Creates a plain object from a GenericArtifact message. Also converts values to other types if specified. + * @param message GenericArtifact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GenericArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenericArtifact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenericArtifact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoModule. */ + interface IGoModule { + + /** GoModule name */ + name?: (string|null); + + /** GoModule version */ + version?: (string|null); + + /** GoModule createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** GoModule updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a GoModule. */ + class GoModule implements IGoModule { + + /** + * Constructs a new GoModule. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGoModule); + + /** GoModule name. */ + public name: string; + + /** GoModule version. */ + public version: string; + + /** GoModule createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** GoModule updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new GoModule instance using the specified properties. + * @param [properties] Properties to set + * @returns GoModule instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGoModule): google.devtools.artifactregistry.v1.GoModule; + + /** + * Encodes the specified GoModule message. Does not implicitly {@link google.devtools.artifactregistry.v1.GoModule.verify|verify} messages. + * @param message GoModule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGoModule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoModule message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GoModule.verify|verify} messages. + * @param message GoModule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGoModule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoModule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GoModule; + + /** + * Decodes a GoModule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GoModule; + + /** + * Verifies a GoModule 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 GoModule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoModule + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GoModule; + + /** + * Creates a plain object from a GoModule message. Also converts values to other types if specified. + * @param message GoModule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GoModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoModule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoModule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KfpArtifact. */ + interface IKfpArtifact { + + /** KfpArtifact name */ + name?: (string|null); + + /** KfpArtifact version */ + version?: (string|null); + } + + /** Represents a KfpArtifact. */ + class KfpArtifact implements IKfpArtifact { + + /** + * Constructs a new KfpArtifact. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IKfpArtifact); + + /** KfpArtifact name. */ + public name: string; + + /** KfpArtifact version. */ + public version: string; + + /** + * Creates a new KfpArtifact instance using the specified properties. + * @param [properties] Properties to set + * @returns KfpArtifact instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IKfpArtifact): google.devtools.artifactregistry.v1.KfpArtifact; + + /** + * Encodes the specified KfpArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.KfpArtifact.verify|verify} messages. + * @param message KfpArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IKfpArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KfpArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.KfpArtifact.verify|verify} messages. + * @param message KfpArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IKfpArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KfpArtifact message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KfpArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.KfpArtifact; + + /** + * Decodes a KfpArtifact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KfpArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.KfpArtifact; + + /** + * Verifies a KfpArtifact 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 KfpArtifact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KfpArtifact + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.KfpArtifact; + + /** + * Creates a plain object from a KfpArtifact message. Also converts values to other types if specified. + * @param message KfpArtifact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.KfpArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KfpArtifact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KfpArtifact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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); + + /** Package annotations */ + annotations?: ({ [k: string]: string }|null); + } + + /** Represents a Package. */ + class Package implements IPackage { + + /** + * Constructs a new Package. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IPackage); + + /** Package name. */ + public name: string; + + /** Package displayName. */ + public displayName: string; + + /** Package createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Package updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Package annotations. */ + public annotations: { [k: string]: string }; + + /** + * Creates a new Package instance using the specified properties. + * @param [properties] Properties to set + * @returns Package instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IPackage): google.devtools.artifactregistry.v1.Package; + + /** + * Encodes the specified Package message. Does not implicitly {@link google.devtools.artifactregistry.v1.Package.verify|verify} messages. + * @param message Package message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Package message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Package.verify|verify} messages. + * @param message Package message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Package message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Package + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Package; + + /** + * Decodes a Package message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Package + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Package; + + /** + * Verifies a Package message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Package message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Package + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Package; + + /** + * Creates a plain object from a Package message. Also converts values to other types if specified. + * @param message Package + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Package, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Package to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Package + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPackagesRequest. */ + interface IListPackagesRequest { + + /** ListPackagesRequest parent */ + parent?: (string|null); + + /** ListPackagesRequest pageSize */ + pageSize?: (number|null); + + /** ListPackagesRequest pageToken */ + pageToken?: (string|null); + + /** ListPackagesRequest filter */ + filter?: (string|null); + + /** ListPackagesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListPackagesRequest. */ + class ListPackagesRequest implements IListPackagesRequest { + + /** + * Constructs a new ListPackagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListPackagesRequest); + + /** ListPackagesRequest parent. */ + public parent: string; + + /** ListPackagesRequest pageSize. */ + public pageSize: number; + + /** ListPackagesRequest pageToken. */ + public pageToken: string; + + /** ListPackagesRequest filter. */ + public filter: string; + + /** ListPackagesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListPackagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPackagesRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListPackagesRequest): google.devtools.artifactregistry.v1.ListPackagesRequest; + + /** + * Encodes the specified ListPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesRequest.verify|verify} messages. + * @param message ListPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesRequest.verify|verify} messages. + * @param message ListPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPackagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListPackagesRequest; + + /** + * Decodes a ListPackagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListPackagesRequest; + + /** + * Verifies a ListPackagesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPackagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListPackagesRequest; + + /** + * Creates a plain object from a ListPackagesRequest message. Also converts values to other types if specified. + * @param message ListPackagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPackagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPackagesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPackagesResponse. */ + interface IListPackagesResponse { + + /** ListPackagesResponse packages */ + packages?: (google.devtools.artifactregistry.v1.IPackage[]|null); + + /** ListPackagesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPackagesResponse. */ + class ListPackagesResponse implements IListPackagesResponse { + + /** + * Constructs a new ListPackagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListPackagesResponse); + + /** ListPackagesResponse packages. */ + public packages: google.devtools.artifactregistry.v1.IPackage[]; + + /** ListPackagesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPackagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPackagesResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListPackagesResponse): google.devtools.artifactregistry.v1.ListPackagesResponse; + + /** + * Encodes the specified ListPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesResponse.verify|verify} messages. + * @param message ListPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesResponse.verify|verify} messages. + * @param message ListPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPackagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListPackagesResponse; + + /** + * Decodes a ListPackagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListPackagesResponse; + + /** + * Verifies a ListPackagesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPackagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListPackagesResponse; + + /** + * Creates a plain object from a ListPackagesResponse message. Also converts values to other types if specified. + * @param message ListPackagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPackagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPackagesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPackageRequest. */ + interface IGetPackageRequest { + + /** GetPackageRequest name */ + name?: (string|null); + } + + /** Represents a GetPackageRequest. */ + class GetPackageRequest implements IGetPackageRequest { + + /** + * Constructs a new GetPackageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetPackageRequest); + + /** GetPackageRequest name. */ + public name: string; + + /** + * Creates a new GetPackageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPackageRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetPackageRequest): google.devtools.artifactregistry.v1.GetPackageRequest; + + /** + * Encodes the specified GetPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPackageRequest.verify|verify} messages. + * @param message GetPackageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPackageRequest.verify|verify} messages. + * @param message GetPackageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPackageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetPackageRequest; + + /** + * Decodes a GetPackageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetPackageRequest; + + /** + * Verifies a GetPackageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPackageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPackageRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetPackageRequest; + + /** + * Creates a plain object from a GetPackageRequest message. Also converts values to other types if specified. + * @param message GetPackageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetPackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPackageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPackageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeletePackageRequest. */ + interface IDeletePackageRequest { + + /** DeletePackageRequest name */ + name?: (string|null); + } + + /** Represents a DeletePackageRequest. */ + class DeletePackageRequest implements IDeletePackageRequest { + + /** + * Constructs a new DeletePackageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IDeletePackageRequest); + + /** DeletePackageRequest name. */ + public name: string; + + /** + * Creates a new DeletePackageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePackageRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IDeletePackageRequest): google.devtools.artifactregistry.v1.DeletePackageRequest; + + /** + * Encodes the specified DeletePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeletePackageRequest.verify|verify} messages. + * @param message DeletePackageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IDeletePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeletePackageRequest.verify|verify} messages. + * @param message DeletePackageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeletePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePackageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DeletePackageRequest; + + /** + * Decodes a DeletePackageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DeletePackageRequest; + + /** + * Verifies a DeletePackageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePackageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePackageRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeletePackageRequest; + + /** + * Creates a plain object from a DeletePackageRequest message. Also converts values to other types if specified. + * @param message DeletePackageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.DeletePackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePackageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePackageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePackageRequest. */ + interface IUpdatePackageRequest { + + /** UpdatePackageRequest package */ + "package"?: (google.devtools.artifactregistry.v1.IPackage|null); + + /** UpdatePackageRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdatePackageRequest. */ + class UpdatePackageRequest implements IUpdatePackageRequest { + + /** + * Constructs a new UpdatePackageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IUpdatePackageRequest); + + /** UpdatePackageRequest package. */ + public package?: (google.devtools.artifactregistry.v1.IPackage|null); + + /** UpdatePackageRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdatePackageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePackageRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IUpdatePackageRequest): google.devtools.artifactregistry.v1.UpdatePackageRequest; + + /** + * Encodes the specified UpdatePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdatePackageRequest.verify|verify} messages. + * @param message UpdatePackageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IUpdatePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdatePackageRequest.verify|verify} messages. + * @param message UpdatePackageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdatePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePackageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdatePackageRequest; + + /** + * Decodes an UpdatePackageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdatePackageRequest; + + /** + * Verifies an UpdatePackageRequest 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 UpdatePackageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePackageRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdatePackageRequest; + + /** + * Creates a plain object from an UpdatePackageRequest message. Also converts values to other types if specified. + * @param message UpdatePackageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.UpdatePackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePackageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePackageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpstreamPolicy. */ + interface IUpstreamPolicy { + + /** UpstreamPolicy id */ + id?: (string|null); + + /** UpstreamPolicy repository */ + repository?: (string|null); + + /** UpstreamPolicy priority */ + priority?: (number|null); + } + + /** Represents an UpstreamPolicy. */ + class UpstreamPolicy implements IUpstreamPolicy { + + /** + * Constructs a new UpstreamPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IUpstreamPolicy); + + /** UpstreamPolicy id. */ + public id: string; + + /** UpstreamPolicy repository. */ + public repository: string; + + /** UpstreamPolicy priority. */ + public priority: number; + + /** + * Creates a new UpstreamPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns UpstreamPolicy instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IUpstreamPolicy): google.devtools.artifactregistry.v1.UpstreamPolicy; + + /** + * Encodes the specified UpstreamPolicy message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpstreamPolicy.verify|verify} messages. + * @param message UpstreamPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IUpstreamPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpstreamPolicy message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpstreamPolicy.verify|verify} messages. + * @param message UpstreamPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpstreamPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpstreamPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpstreamPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpstreamPolicy; + + /** + * Decodes an UpstreamPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpstreamPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpstreamPolicy; + + /** + * Verifies an UpstreamPolicy 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 UpstreamPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpstreamPolicy + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpstreamPolicy; + + /** + * Creates a plain object from an UpstreamPolicy message. Also converts values to other types if specified. + * @param message UpstreamPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.UpstreamPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpstreamPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpstreamPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CleanupPolicyCondition. */ + interface ICleanupPolicyCondition { + + /** CleanupPolicyCondition tagState */ + tagState?: (google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState|keyof typeof google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState|null); + + /** CleanupPolicyCondition tagPrefixes */ + tagPrefixes?: (string[]|null); + + /** CleanupPolicyCondition versionNamePrefixes */ + versionNamePrefixes?: (string[]|null); + + /** CleanupPolicyCondition packageNamePrefixes */ + packageNamePrefixes?: (string[]|null); + + /** CleanupPolicyCondition olderThan */ + olderThan?: (google.protobuf.IDuration|null); + + /** CleanupPolicyCondition newerThan */ + newerThan?: (google.protobuf.IDuration|null); + } + + /** Represents a CleanupPolicyCondition. */ + class CleanupPolicyCondition implements ICleanupPolicyCondition { + + /** + * Constructs a new CleanupPolicyCondition. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.ICleanupPolicyCondition); + + /** CleanupPolicyCondition tagState. */ + public tagState?: (google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState|keyof typeof google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState|null); + + /** CleanupPolicyCondition tagPrefixes. */ + public tagPrefixes: string[]; + + /** CleanupPolicyCondition versionNamePrefixes. */ + public versionNamePrefixes: string[]; + + /** CleanupPolicyCondition packageNamePrefixes. */ + public packageNamePrefixes: string[]; + + /** CleanupPolicyCondition olderThan. */ + public olderThan?: (google.protobuf.IDuration|null); + + /** CleanupPolicyCondition newerThan. */ + public newerThan?: (google.protobuf.IDuration|null); + + /** + * Creates a new CleanupPolicyCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns CleanupPolicyCondition instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.ICleanupPolicyCondition): google.devtools.artifactregistry.v1.CleanupPolicyCondition; + + /** + * Encodes the specified CleanupPolicyCondition message. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyCondition.verify|verify} messages. + * @param message CleanupPolicyCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.ICleanupPolicyCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CleanupPolicyCondition message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyCondition.verify|verify} messages. + * @param message CleanupPolicyCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICleanupPolicyCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CleanupPolicyCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CleanupPolicyCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.CleanupPolicyCondition; + + /** + * Decodes a CleanupPolicyCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CleanupPolicyCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.CleanupPolicyCondition; + + /** + * Verifies a CleanupPolicyCondition 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 CleanupPolicyCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CleanupPolicyCondition + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CleanupPolicyCondition; + + /** + * Creates a plain object from a CleanupPolicyCondition message. Also converts values to other types if specified. + * @param message CleanupPolicyCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.CleanupPolicyCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CleanupPolicyCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CleanupPolicyCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CleanupPolicyCondition { + + /** TagState enum. */ + enum TagState { + TAG_STATE_UNSPECIFIED = 0, + TAGGED = 1, + UNTAGGED = 2, + ANY = 3 + } + } + + /** Properties of a CleanupPolicyMostRecentVersions. */ + interface ICleanupPolicyMostRecentVersions { + + /** CleanupPolicyMostRecentVersions packageNamePrefixes */ + packageNamePrefixes?: (string[]|null); + + /** CleanupPolicyMostRecentVersions keepCount */ + keepCount?: (number|null); + } + + /** Represents a CleanupPolicyMostRecentVersions. */ + class CleanupPolicyMostRecentVersions implements ICleanupPolicyMostRecentVersions { + + /** + * Constructs a new CleanupPolicyMostRecentVersions. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions); + + /** CleanupPolicyMostRecentVersions packageNamePrefixes. */ + public packageNamePrefixes: string[]; + + /** CleanupPolicyMostRecentVersions keepCount. */ + public keepCount?: (number|null); + + /** + * Creates a new CleanupPolicyMostRecentVersions instance using the specified properties. + * @param [properties] Properties to set + * @returns CleanupPolicyMostRecentVersions instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions): google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions; + + /** + * Encodes the specified CleanupPolicyMostRecentVersions message. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.verify|verify} messages. + * @param message CleanupPolicyMostRecentVersions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CleanupPolicyMostRecentVersions message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.verify|verify} messages. + * @param message CleanupPolicyMostRecentVersions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CleanupPolicyMostRecentVersions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CleanupPolicyMostRecentVersions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions; + + /** + * Decodes a CleanupPolicyMostRecentVersions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CleanupPolicyMostRecentVersions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions; + + /** + * Verifies a CleanupPolicyMostRecentVersions 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 CleanupPolicyMostRecentVersions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CleanupPolicyMostRecentVersions + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions; + + /** + * Creates a plain object from a CleanupPolicyMostRecentVersions message. Also converts values to other types if specified. + * @param message CleanupPolicyMostRecentVersions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CleanupPolicyMostRecentVersions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CleanupPolicyMostRecentVersions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CleanupPolicy. */ + interface ICleanupPolicy { + + /** CleanupPolicy condition */ + condition?: (google.devtools.artifactregistry.v1.ICleanupPolicyCondition|null); + + /** CleanupPolicy mostRecentVersions */ + mostRecentVersions?: (google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions|null); + + /** CleanupPolicy id */ + id?: (string|null); + + /** CleanupPolicy action */ + action?: (google.devtools.artifactregistry.v1.CleanupPolicy.Action|keyof typeof google.devtools.artifactregistry.v1.CleanupPolicy.Action|null); + } + + /** Represents a CleanupPolicy. */ + class CleanupPolicy implements ICleanupPolicy { + + /** + * Constructs a new CleanupPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.ICleanupPolicy); + + /** CleanupPolicy condition. */ + public condition?: (google.devtools.artifactregistry.v1.ICleanupPolicyCondition|null); + + /** CleanupPolicy mostRecentVersions. */ + public mostRecentVersions?: (google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions|null); + + /** CleanupPolicy id. */ + public id: string; + + /** CleanupPolicy action. */ + public action: (google.devtools.artifactregistry.v1.CleanupPolicy.Action|keyof typeof google.devtools.artifactregistry.v1.CleanupPolicy.Action); + + /** CleanupPolicy conditionType. */ + public conditionType?: ("condition"|"mostRecentVersions"); + + /** + * Creates a new CleanupPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns CleanupPolicy instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.ICleanupPolicy): google.devtools.artifactregistry.v1.CleanupPolicy; + + /** + * Encodes the specified CleanupPolicy message. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicy.verify|verify} messages. + * @param message CleanupPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.ICleanupPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CleanupPolicy message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicy.verify|verify} messages. + * @param message CleanupPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICleanupPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CleanupPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CleanupPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.CleanupPolicy; + + /** + * Decodes a CleanupPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CleanupPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.CleanupPolicy; + + /** + * Verifies a CleanupPolicy 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 CleanupPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CleanupPolicy + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CleanupPolicy; + + /** + * Creates a plain object from a CleanupPolicy message. Also converts values to other types if specified. + * @param message CleanupPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.CleanupPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CleanupPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CleanupPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CleanupPolicy { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + DELETE = 1, + KEEP = 2 + } + } + + /** Properties of a VirtualRepositoryConfig. */ + interface IVirtualRepositoryConfig { + + /** VirtualRepositoryConfig upstreamPolicies */ + upstreamPolicies?: (google.devtools.artifactregistry.v1.IUpstreamPolicy[]|null); + } + + /** Represents a VirtualRepositoryConfig. */ + class VirtualRepositoryConfig implements IVirtualRepositoryConfig { + + /** + * Constructs a new VirtualRepositoryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IVirtualRepositoryConfig); + + /** VirtualRepositoryConfig upstreamPolicies. */ + public upstreamPolicies: google.devtools.artifactregistry.v1.IUpstreamPolicy[]; + + /** + * Creates a new VirtualRepositoryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns VirtualRepositoryConfig instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IVirtualRepositoryConfig): google.devtools.artifactregistry.v1.VirtualRepositoryConfig; + + /** + * Encodes the specified VirtualRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.VirtualRepositoryConfig.verify|verify} messages. + * @param message VirtualRepositoryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IVirtualRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VirtualRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.VirtualRepositoryConfig.verify|verify} messages. + * @param message VirtualRepositoryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IVirtualRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VirtualRepositoryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VirtualRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.VirtualRepositoryConfig; + + /** + * Decodes a VirtualRepositoryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VirtualRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.VirtualRepositoryConfig; + + /** + * Verifies a VirtualRepositoryConfig 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 VirtualRepositoryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VirtualRepositoryConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.VirtualRepositoryConfig; + + /** + * Creates a plain object from a VirtualRepositoryConfig message. Also converts values to other types if specified. + * @param message VirtualRepositoryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.VirtualRepositoryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VirtualRepositoryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VirtualRepositoryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoteRepositoryConfig. */ + interface IRemoteRepositoryConfig { + + /** RemoteRepositoryConfig dockerRepository */ + dockerRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository|null); + + /** RemoteRepositoryConfig mavenRepository */ + mavenRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository|null); + + /** RemoteRepositoryConfig npmRepository */ + npmRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository|null); + + /** RemoteRepositoryConfig pythonRepository */ + pythonRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository|null); + + /** RemoteRepositoryConfig aptRepository */ + aptRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository|null); + + /** RemoteRepositoryConfig yumRepository */ + yumRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository|null); + + /** RemoteRepositoryConfig commonRepository */ + commonRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository|null); + + /** RemoteRepositoryConfig description */ + description?: (string|null); + + /** RemoteRepositoryConfig upstreamCredentials */ + upstreamCredentials?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials|null); + + /** RemoteRepositoryConfig disableUpstreamValidation */ + disableUpstreamValidation?: (boolean|null); + } + + /** Represents a RemoteRepositoryConfig. */ + class RemoteRepositoryConfig implements IRemoteRepositoryConfig { + + /** + * Constructs a new RemoteRepositoryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IRemoteRepositoryConfig); + + /** RemoteRepositoryConfig dockerRepository. */ + public dockerRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository|null); + + /** RemoteRepositoryConfig mavenRepository. */ + public mavenRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository|null); + + /** RemoteRepositoryConfig npmRepository. */ + public npmRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository|null); + + /** RemoteRepositoryConfig pythonRepository. */ + public pythonRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository|null); + + /** RemoteRepositoryConfig aptRepository. */ + public aptRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository|null); + + /** RemoteRepositoryConfig yumRepository. */ + public yumRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository|null); + + /** RemoteRepositoryConfig commonRepository. */ + public commonRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository|null); + + /** RemoteRepositoryConfig description. */ + public description: string; + + /** RemoteRepositoryConfig upstreamCredentials. */ + public upstreamCredentials?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials|null); + + /** RemoteRepositoryConfig disableUpstreamValidation. */ + public disableUpstreamValidation: boolean; + + /** RemoteRepositoryConfig remoteSource. */ + public remoteSource?: ("dockerRepository"|"mavenRepository"|"npmRepository"|"pythonRepository"|"aptRepository"|"yumRepository"|"commonRepository"); + + /** + * Creates a new RemoteRepositoryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoteRepositoryConfig instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IRemoteRepositoryConfig): google.devtools.artifactregistry.v1.RemoteRepositoryConfig; + + /** + * Encodes the specified RemoteRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.verify|verify} messages. + * @param message RemoteRepositoryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IRemoteRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoteRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.verify|verify} messages. + * @param message RemoteRepositoryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IRemoteRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoteRepositoryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoteRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig; + + /** + * Decodes a RemoteRepositoryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoteRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig; + + /** + * Verifies a RemoteRepositoryConfig 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 RemoteRepositoryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoteRepositoryConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig; + + /** + * Creates a plain object from a RemoteRepositoryConfig message. Also converts values to other types if specified. + * @param message RemoteRepositoryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoteRepositoryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoteRepositoryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RemoteRepositoryConfig { + + /** Properties of an UpstreamCredentials. */ + interface IUpstreamCredentials { + + /** UpstreamCredentials usernamePasswordCredentials */ + usernamePasswordCredentials?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials|null); + } + + /** Represents an UpstreamCredentials. */ + class UpstreamCredentials implements IUpstreamCredentials { + + /** + * Constructs a new UpstreamCredentials. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials); + + /** UpstreamCredentials usernamePasswordCredentials. */ + public usernamePasswordCredentials?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials|null); + + /** UpstreamCredentials credentials. */ + public credentials?: "usernamePasswordCredentials"; + + /** + * Creates a new UpstreamCredentials instance using the specified properties. + * @param [properties] Properties to set + * @returns UpstreamCredentials instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials; + + /** + * Encodes the specified UpstreamCredentials message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.verify|verify} messages. + * @param message UpstreamCredentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpstreamCredentials message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.verify|verify} messages. + * @param message UpstreamCredentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpstreamCredentials message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpstreamCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials; + + /** + * Decodes an UpstreamCredentials message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpstreamCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials; + + /** + * Verifies an UpstreamCredentials 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 UpstreamCredentials message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpstreamCredentials + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials; + + /** + * Creates a plain object from an UpstreamCredentials message. Also converts values to other types if specified. + * @param message UpstreamCredentials + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpstreamCredentials to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpstreamCredentials + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UpstreamCredentials { + + /** Properties of a UsernamePasswordCredentials. */ + interface IUsernamePasswordCredentials { + + /** UsernamePasswordCredentials username */ + username?: (string|null); + + /** UsernamePasswordCredentials passwordSecretVersion */ + passwordSecretVersion?: (string|null); + } + + /** Represents a UsernamePasswordCredentials. */ + class UsernamePasswordCredentials implements IUsernamePasswordCredentials { + + /** + * Constructs a new UsernamePasswordCredentials. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials); + + /** UsernamePasswordCredentials username. */ + public username: string; + + /** UsernamePasswordCredentials passwordSecretVersion. */ + public passwordSecretVersion: string; + + /** + * Creates a new UsernamePasswordCredentials instance using the specified properties. + * @param [properties] Properties to set + * @returns UsernamePasswordCredentials instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials; + + /** + * Encodes the specified UsernamePasswordCredentials message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.verify|verify} messages. + * @param message UsernamePasswordCredentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UsernamePasswordCredentials message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.verify|verify} messages. + * @param message UsernamePasswordCredentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UsernamePasswordCredentials message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UsernamePasswordCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials; + + /** + * Decodes a UsernamePasswordCredentials message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UsernamePasswordCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials; + + /** + * Verifies a UsernamePasswordCredentials 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 UsernamePasswordCredentials message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UsernamePasswordCredentials + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials; + + /** + * Creates a plain object from a UsernamePasswordCredentials message. Also converts values to other types if specified. + * @param message UsernamePasswordCredentials + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UsernamePasswordCredentials to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UsernamePasswordCredentials + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DockerRepository. */ + interface IDockerRepository { + + /** DockerRepository publicRepository */ + publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository|null); + + /** DockerRepository customRepository */ + customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository|null); + } + + /** Represents a DockerRepository. */ + class DockerRepository implements IDockerRepository { + + /** + * Constructs a new DockerRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository); + + /** DockerRepository publicRepository. */ + public publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository|null); + + /** DockerRepository customRepository. */ + public customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository|null); + + /** DockerRepository upstream. */ + public upstream?: ("publicRepository"|"customRepository"); + + /** + * Creates a new DockerRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns DockerRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository; + + /** + * Encodes the specified DockerRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.verify|verify} messages. + * @param message DockerRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DockerRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.verify|verify} messages. + * @param message DockerRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DockerRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DockerRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository; + + /** + * Decodes a DockerRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DockerRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository; + + /** + * Verifies a DockerRepository 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 DockerRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DockerRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository; + + /** + * Creates a plain object from a DockerRepository message. Also converts values to other types if specified. + * @param message DockerRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DockerRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DockerRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DockerRepository { + + /** Properties of a CustomRepository. */ + interface ICustomRepository { + + /** CustomRepository uri */ + uri?: (string|null); + } + + /** Represents a CustomRepository. */ + class CustomRepository implements ICustomRepository { + + /** + * Constructs a new CustomRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository); + + /** CustomRepository uri. */ + public uri: string; + + /** + * Creates a new CustomRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository; + + /** + * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.verify|verify} messages. + * @param message CustomRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.verify|verify} messages. + * @param message CustomRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository; + + /** + * Decodes a CustomRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository; + + /** + * Verifies a CustomRepository 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 CustomRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository; + + /** + * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. + * @param message CustomRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** PublicRepository enum. */ + enum PublicRepository { + PUBLIC_REPOSITORY_UNSPECIFIED = 0, + DOCKER_HUB = 1 + } + } + + /** Properties of a MavenRepository. */ + interface IMavenRepository { + + /** MavenRepository publicRepository */ + publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository|null); + + /** MavenRepository customRepository */ + customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository|null); + } + + /** Represents a MavenRepository. */ + class MavenRepository implements IMavenRepository { + + /** + * Constructs a new MavenRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository); + + /** MavenRepository publicRepository. */ + public publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository|null); + + /** MavenRepository customRepository. */ + public customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository|null); + + /** MavenRepository upstream. */ + public upstream?: ("publicRepository"|"customRepository"); + + /** + * Creates a new MavenRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns MavenRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository; + + /** + * Encodes the specified MavenRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.verify|verify} messages. + * @param message MavenRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MavenRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.verify|verify} messages. + * @param message MavenRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MavenRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MavenRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository; + + /** + * Decodes a MavenRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MavenRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository; + + /** + * Verifies a MavenRepository 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 MavenRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MavenRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository; + + /** + * Creates a plain object from a MavenRepository message. Also converts values to other types if specified. + * @param message MavenRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MavenRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MavenRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MavenRepository { + + /** Properties of a CustomRepository. */ + interface ICustomRepository { + + /** CustomRepository uri */ + uri?: (string|null); + } + + /** Represents a CustomRepository. */ + class CustomRepository implements ICustomRepository { + + /** + * Constructs a new CustomRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository); + + /** CustomRepository uri. */ + public uri: string; + + /** + * Creates a new CustomRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository; + + /** + * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.verify|verify} messages. + * @param message CustomRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.verify|verify} messages. + * @param message CustomRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository; + + /** + * Decodes a CustomRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository; + + /** + * Verifies a CustomRepository 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 CustomRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository; + + /** + * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. + * @param message CustomRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** PublicRepository enum. */ + enum PublicRepository { + PUBLIC_REPOSITORY_UNSPECIFIED = 0, + MAVEN_CENTRAL = 1 + } + } + + /** Properties of a NpmRepository. */ + interface INpmRepository { + + /** NpmRepository publicRepository */ + publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository|null); + + /** NpmRepository customRepository */ + customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository|null); + } + + /** Represents a NpmRepository. */ + class NpmRepository implements INpmRepository { + + /** + * Constructs a new NpmRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository); + + /** NpmRepository publicRepository. */ + public publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository|null); + + /** NpmRepository customRepository. */ + public customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository|null); + + /** NpmRepository upstream. */ + public upstream?: ("publicRepository"|"customRepository"); + + /** + * Creates a new NpmRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns NpmRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository; + + /** + * Encodes the specified NpmRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.verify|verify} messages. + * @param message NpmRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NpmRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.verify|verify} messages. + * @param message NpmRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NpmRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NpmRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository; + + /** + * Decodes a NpmRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NpmRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository; + + /** + * Verifies a NpmRepository 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 NpmRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NpmRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository; + + /** + * Creates a plain object from a NpmRepository message. Also converts values to other types if specified. + * @param message NpmRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NpmRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NpmRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NpmRepository { + + /** Properties of a CustomRepository. */ + interface ICustomRepository { + + /** CustomRepository uri */ + uri?: (string|null); + } + + /** Represents a CustomRepository. */ + class CustomRepository implements ICustomRepository { + + /** + * Constructs a new CustomRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository); + + /** CustomRepository uri. */ + public uri: string; + + /** + * Creates a new CustomRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository; + + /** + * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.verify|verify} messages. + * @param message CustomRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.verify|verify} messages. + * @param message CustomRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository; + + /** + * Decodes a CustomRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository; + + /** + * Verifies a CustomRepository 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 CustomRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository; + + /** + * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. + * @param message CustomRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** PublicRepository enum. */ + enum PublicRepository { + PUBLIC_REPOSITORY_UNSPECIFIED = 0, + NPMJS = 1 + } + } + + /** Properties of a PythonRepository. */ + interface IPythonRepository { + + /** PythonRepository publicRepository */ + publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository|null); + + /** PythonRepository customRepository */ + customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository|null); + } + + /** Represents a PythonRepository. */ + class PythonRepository implements IPythonRepository { + + /** + * Constructs a new PythonRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository); + + /** PythonRepository publicRepository. */ + public publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository|null); + + /** PythonRepository customRepository. */ + public customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository|null); + + /** PythonRepository upstream. */ + public upstream?: ("publicRepository"|"customRepository"); + + /** + * Creates a new PythonRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository; + + /** + * Encodes the specified PythonRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.verify|verify} messages. + * @param message PythonRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.verify|verify} messages. + * @param message PythonRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository; + + /** + * Decodes a PythonRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository; + + /** + * Verifies a PythonRepository 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 PythonRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository; + + /** + * Creates a plain object from a PythonRepository message. Also converts values to other types if specified. + * @param message PythonRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PythonRepository { + + /** Properties of a CustomRepository. */ + interface ICustomRepository { + + /** CustomRepository uri */ + uri?: (string|null); + } + + /** Represents a CustomRepository. */ + class CustomRepository implements ICustomRepository { + + /** + * Constructs a new CustomRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository); + + /** CustomRepository uri. */ + public uri: string; + + /** + * Creates a new CustomRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository; + + /** + * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.verify|verify} messages. + * @param message CustomRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.verify|verify} messages. + * @param message CustomRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository; + + /** + * Decodes a CustomRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository; + + /** + * Verifies a CustomRepository 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 CustomRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository; + + /** + * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. + * @param message CustomRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** PublicRepository enum. */ + enum PublicRepository { + PUBLIC_REPOSITORY_UNSPECIFIED = 0, + PYPI = 1 + } + } + + /** Properties of an AptRepository. */ + interface IAptRepository { + + /** AptRepository publicRepository */ + publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository|null); + + /** AptRepository customRepository */ + customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository|null); + } + + /** Represents an AptRepository. */ + class AptRepository implements IAptRepository { + + /** + * Constructs a new AptRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository); + + /** AptRepository publicRepository. */ + public publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository|null); + + /** AptRepository customRepository. */ + public customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository|null); + + /** AptRepository upstream. */ + public upstream?: ("publicRepository"|"customRepository"); + + /** + * Creates a new AptRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns AptRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository; + + /** + * Encodes the specified AptRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.verify|verify} messages. + * @param message AptRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AptRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.verify|verify} messages. + * @param message AptRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AptRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository; + + /** + * Decodes an AptRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository; + + /** + * Verifies an AptRepository 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 AptRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AptRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository; + + /** + * Creates a plain object from an AptRepository message. Also converts values to other types if specified. + * @param message AptRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AptRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AptRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AptRepository { + + /** Properties of a PublicRepository. */ + interface IPublicRepository { + + /** PublicRepository repositoryBase */ + repositoryBase?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase|null); + + /** PublicRepository repositoryPath */ + repositoryPath?: (string|null); + } + + /** Represents a PublicRepository. */ + class PublicRepository implements IPublicRepository { + + /** + * Constructs a new PublicRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository); + + /** PublicRepository repositoryBase. */ + public repositoryBase: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase); + + /** PublicRepository repositoryPath. */ + public repositoryPath: string; + + /** + * Creates a new PublicRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns PublicRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository; + + /** + * Encodes the specified PublicRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.verify|verify} messages. + * @param message PublicRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublicRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.verify|verify} messages. + * @param message PublicRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublicRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublicRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository; + + /** + * Decodes a PublicRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublicRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository; + + /** + * Verifies a PublicRepository 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 PublicRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublicRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository; + + /** + * Creates a plain object from a PublicRepository message. Also converts values to other types if specified. + * @param message PublicRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublicRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublicRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PublicRepository { + + /** RepositoryBase enum. */ + enum RepositoryBase { + REPOSITORY_BASE_UNSPECIFIED = 0, + DEBIAN = 1, + UBUNTU = 2, + DEBIAN_SNAPSHOT = 3 + } + } + + /** Properties of a CustomRepository. */ + interface ICustomRepository { + + /** CustomRepository uri */ + uri?: (string|null); + } + + /** Represents a CustomRepository. */ + class CustomRepository implements ICustomRepository { + + /** + * Constructs a new CustomRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository); + + /** CustomRepository uri. */ + public uri: string; + + /** + * Creates a new CustomRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository; + + /** + * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.verify|verify} messages. + * @param message CustomRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.verify|verify} messages. + * @param message CustomRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository; + + /** + * Decodes a CustomRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository; + + /** + * Verifies a CustomRepository 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 CustomRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository; + + /** + * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. + * @param message CustomRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a YumRepository. */ + interface IYumRepository { + + /** YumRepository publicRepository */ + publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository|null); + + /** YumRepository customRepository */ + customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository|null); + } + + /** Represents a YumRepository. */ + class YumRepository implements IYumRepository { + + /** + * Constructs a new YumRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository); + + /** YumRepository publicRepository. */ + public publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository|null); + + /** YumRepository customRepository. */ + public customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository|null); + + /** YumRepository upstream. */ + public upstream?: ("publicRepository"|"customRepository"); + + /** + * Creates a new YumRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns YumRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository; + + /** + * Encodes the specified YumRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.verify|verify} messages. + * @param message YumRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified YumRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.verify|verify} messages. + * @param message YumRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a YumRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YumRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository; + + /** + * Decodes a YumRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YumRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository; + + /** + * Verifies a YumRepository 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 YumRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YumRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository; + + /** + * Creates a plain object from a YumRepository message. Also converts values to other types if specified. + * @param message YumRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this YumRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for YumRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace YumRepository { + + /** Properties of a PublicRepository. */ + interface IPublicRepository { + + /** PublicRepository repositoryBase */ + repositoryBase?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase|null); + + /** PublicRepository repositoryPath */ + repositoryPath?: (string|null); + } + + /** Represents a PublicRepository. */ + class PublicRepository implements IPublicRepository { + + /** + * Constructs a new PublicRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository); + + /** PublicRepository repositoryBase. */ + public repositoryBase: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase); + + /** PublicRepository repositoryPath. */ + public repositoryPath: string; + + /** + * Creates a new PublicRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns PublicRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository; + + /** + * Encodes the specified PublicRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.verify|verify} messages. + * @param message PublicRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublicRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.verify|verify} messages. + * @param message PublicRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublicRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublicRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository; + + /** + * Decodes a PublicRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublicRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository; + + /** + * Verifies a PublicRepository 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 PublicRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublicRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository; + + /** + * Creates a plain object from a PublicRepository message. Also converts values to other types if specified. + * @param message PublicRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublicRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublicRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PublicRepository { + + /** RepositoryBase enum. */ + enum RepositoryBase { + REPOSITORY_BASE_UNSPECIFIED = 0, + CENTOS = 1, + CENTOS_DEBUG = 2, + CENTOS_VAULT = 3, + CENTOS_STREAM = 4, + ROCKY = 5, + EPEL = 6 + } + } + + /** Properties of a CustomRepository. */ + interface ICustomRepository { + + /** CustomRepository uri */ + uri?: (string|null); + } + + /** Represents a CustomRepository. */ + class CustomRepository implements ICustomRepository { + + /** + * Constructs a new CustomRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository); + + /** CustomRepository uri. */ + public uri: string; + + /** + * Creates a new CustomRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository; + + /** + * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.verify|verify} messages. + * @param message CustomRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.verify|verify} messages. + * @param message CustomRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository; + + /** + * Decodes a CustomRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository; + + /** + * Verifies a CustomRepository 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 CustomRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository; + + /** + * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. + * @param message CustomRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CommonRemoteRepository. */ + interface ICommonRemoteRepository { + + /** CommonRemoteRepository uri */ + uri?: (string|null); + } + + /** Represents a CommonRemoteRepository. */ + class CommonRemoteRepository implements ICommonRemoteRepository { + + /** + * Constructs a new CommonRemoteRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository); + + /** CommonRemoteRepository uri. */ + public uri: string; + + /** + * Creates a new CommonRemoteRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonRemoteRepository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository; + + /** + * Encodes the specified CommonRemoteRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.verify|verify} messages. + * @param message CommonRemoteRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonRemoteRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.verify|verify} messages. + * @param message CommonRemoteRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonRemoteRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonRemoteRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository; + + /** + * Decodes a CommonRemoteRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonRemoteRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository; + + /** + * Verifies a CommonRemoteRepository 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 CommonRemoteRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonRemoteRepository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository; + + /** + * Creates a plain object from a CommonRemoteRepository message. Also converts values to other types if specified. + * @param message CommonRemoteRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonRemoteRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonRemoteRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Repository. */ + interface IRepository { + + /** Repository mavenConfig */ + mavenConfig?: (google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig|null); + + /** Repository dockerConfig */ + dockerConfig?: (google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig|null); + + /** Repository virtualRepositoryConfig */ + virtualRepositoryConfig?: (google.devtools.artifactregistry.v1.IVirtualRepositoryConfig|null); + + /** Repository remoteRepositoryConfig */ + remoteRepositoryConfig?: (google.devtools.artifactregistry.v1.IRemoteRepositoryConfig|null); + + /** Repository name */ + name?: (string|null); + + /** Repository format */ + format?: (google.devtools.artifactregistry.v1.Repository.Format|keyof typeof google.devtools.artifactregistry.v1.Repository.Format|null); + + /** Repository description */ + description?: (string|null); + + /** Repository labels */ + labels?: ({ [k: string]: string }|null); + + /** Repository createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Repository updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Repository kmsKeyName */ + kmsKeyName?: (string|null); + + /** Repository mode */ + mode?: (google.devtools.artifactregistry.v1.Repository.Mode|keyof typeof google.devtools.artifactregistry.v1.Repository.Mode|null); + + /** Repository cleanupPolicies */ + cleanupPolicies?: ({ [k: string]: google.devtools.artifactregistry.v1.ICleanupPolicy }|null); + + /** Repository sizeBytes */ + sizeBytes?: (number|Long|string|null); + + /** Repository satisfiesPzs */ + satisfiesPzs?: (boolean|null); + + /** Repository cleanupPolicyDryRun */ + cleanupPolicyDryRun?: (boolean|null); + + /** Repository vulnerabilityScanningConfig */ + vulnerabilityScanningConfig?: (google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig|null); + + /** Repository disallowUnspecifiedMode */ + disallowUnspecifiedMode?: (boolean|null); + + /** Repository satisfiesPzi */ + satisfiesPzi?: (boolean|null); + + /** Repository registryUri */ + registryUri?: (string|null); + } + + /** Represents a Repository. */ + class Repository implements IRepository { + + /** + * Constructs a new Repository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IRepository); + + /** Repository mavenConfig. */ + public mavenConfig?: (google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig|null); + + /** Repository dockerConfig. */ + public dockerConfig?: (google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig|null); + + /** Repository virtualRepositoryConfig. */ + public virtualRepositoryConfig?: (google.devtools.artifactregistry.v1.IVirtualRepositoryConfig|null); + + /** Repository remoteRepositoryConfig. */ + public remoteRepositoryConfig?: (google.devtools.artifactregistry.v1.IRemoteRepositoryConfig|null); + + /** Repository name. */ + public name: string; + + /** Repository format. */ + public format: (google.devtools.artifactregistry.v1.Repository.Format|keyof typeof google.devtools.artifactregistry.v1.Repository.Format); + + /** Repository description. */ + public description: string; + + /** Repository labels. */ + public labels: { [k: string]: string }; + + /** Repository createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Repository updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Repository kmsKeyName. */ + public kmsKeyName: string; + + /** Repository mode. */ + public mode: (google.devtools.artifactregistry.v1.Repository.Mode|keyof typeof google.devtools.artifactregistry.v1.Repository.Mode); + + /** Repository cleanupPolicies. */ + public cleanupPolicies: { [k: string]: google.devtools.artifactregistry.v1.ICleanupPolicy }; + + /** Repository sizeBytes. */ + public sizeBytes: (number|Long|string); + + /** Repository satisfiesPzs. */ + public satisfiesPzs: boolean; + + /** Repository cleanupPolicyDryRun. */ + public cleanupPolicyDryRun: boolean; + + /** Repository vulnerabilityScanningConfig. */ + public vulnerabilityScanningConfig?: (google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig|null); + + /** Repository disallowUnspecifiedMode. */ + public disallowUnspecifiedMode: boolean; + + /** Repository satisfiesPzi. */ + public satisfiesPzi: boolean; + + /** Repository registryUri. */ + public registryUri: string; + + /** Repository formatConfig. */ + public formatConfig?: ("mavenConfig"|"dockerConfig"); + + /** Repository modeConfig. */ + public modeConfig?: ("virtualRepositoryConfig"|"remoteRepositoryConfig"); + + /** + * Creates a new Repository instance using the specified properties. + * @param [properties] Properties to set + * @returns Repository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IRepository): google.devtools.artifactregistry.v1.Repository; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Repository; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Repository; + + /** + * Verifies a Repository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Repository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Repository; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @param message Repository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Repository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Repository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Repository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Repository { + + /** Properties of a MavenRepositoryConfig. */ + interface IMavenRepositoryConfig { + + /** MavenRepositoryConfig allowSnapshotOverwrites */ + allowSnapshotOverwrites?: (boolean|null); + + /** MavenRepositoryConfig versionPolicy */ + versionPolicy?: (google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy|keyof typeof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy|null); + } + + /** Represents a MavenRepositoryConfig. */ + class MavenRepositoryConfig implements IMavenRepositoryConfig { + + /** + * Constructs a new MavenRepositoryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig); + + /** MavenRepositoryConfig allowSnapshotOverwrites. */ + public allowSnapshotOverwrites: boolean; + + /** MavenRepositoryConfig versionPolicy. */ + public versionPolicy: (google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy|keyof typeof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy); + + /** + * Creates a new MavenRepositoryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MavenRepositoryConfig instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig): google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig; + + /** + * Encodes the specified MavenRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify|verify} messages. + * @param message MavenRepositoryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MavenRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify|verify} messages. + * @param message MavenRepositoryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MavenRepositoryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MavenRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig; + + /** + * Decodes a MavenRepositoryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MavenRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig; + + /** + * Verifies a MavenRepositoryConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MavenRepositoryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MavenRepositoryConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig; + + /** + * Creates a plain object from a MavenRepositoryConfig message. Also converts values to other types if specified. + * @param message MavenRepositoryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MavenRepositoryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MavenRepositoryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MavenRepositoryConfig { + + /** VersionPolicy enum. */ + enum VersionPolicy { + VERSION_POLICY_UNSPECIFIED = 0, + RELEASE = 1, + SNAPSHOT = 2 + } + } + + /** Properties of a DockerRepositoryConfig. */ + interface IDockerRepositoryConfig { + + /** DockerRepositoryConfig immutableTags */ + immutableTags?: (boolean|null); + } + + /** Represents a DockerRepositoryConfig. */ + class DockerRepositoryConfig implements IDockerRepositoryConfig { + + /** + * Constructs a new DockerRepositoryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig); + + /** DockerRepositoryConfig immutableTags. */ + public immutableTags: boolean; + + /** + * Creates a new DockerRepositoryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DockerRepositoryConfig instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig): google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig; + + /** + * Encodes the specified DockerRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.verify|verify} messages. + * @param message DockerRepositoryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DockerRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.verify|verify} messages. + * @param message DockerRepositoryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DockerRepositoryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DockerRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig; + + /** + * Decodes a DockerRepositoryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DockerRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig; + + /** + * Verifies a DockerRepositoryConfig 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 DockerRepositoryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DockerRepositoryConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig; + + /** + * Creates a plain object from a DockerRepositoryConfig message. Also converts values to other types if specified. + * @param message DockerRepositoryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DockerRepositoryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DockerRepositoryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VulnerabilityScanningConfig. */ + interface IVulnerabilityScanningConfig { + + /** VulnerabilityScanningConfig enablementConfig */ + enablementConfig?: (google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig|keyof typeof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig|null); + + /** VulnerabilityScanningConfig lastEnableTime */ + lastEnableTime?: (google.protobuf.ITimestamp|null); + + /** VulnerabilityScanningConfig enablementState */ + enablementState?: (google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState|keyof typeof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState|null); + + /** VulnerabilityScanningConfig enablementStateReason */ + enablementStateReason?: (string|null); + } + + /** Represents a VulnerabilityScanningConfig. */ + class VulnerabilityScanningConfig implements IVulnerabilityScanningConfig { + + /** + * Constructs a new VulnerabilityScanningConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig); + + /** VulnerabilityScanningConfig enablementConfig. */ + public enablementConfig: (google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig|keyof typeof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig); + + /** VulnerabilityScanningConfig lastEnableTime. */ + public lastEnableTime?: (google.protobuf.ITimestamp|null); + + /** VulnerabilityScanningConfig enablementState. */ + public enablementState: (google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState|keyof typeof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState); + + /** VulnerabilityScanningConfig enablementStateReason. */ + public enablementStateReason: string; + + /** + * Creates a new VulnerabilityScanningConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns VulnerabilityScanningConfig instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig): google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig; + + /** + * Encodes the specified VulnerabilityScanningConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.verify|verify} messages. + * @param message VulnerabilityScanningConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VulnerabilityScanningConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.verify|verify} messages. + * @param message VulnerabilityScanningConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VulnerabilityScanningConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VulnerabilityScanningConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig; + + /** + * Decodes a VulnerabilityScanningConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VulnerabilityScanningConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig; + + /** + * Verifies a VulnerabilityScanningConfig 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 VulnerabilityScanningConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VulnerabilityScanningConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig; + + /** + * Creates a plain object from a VulnerabilityScanningConfig message. Also converts values to other types if specified. + * @param message VulnerabilityScanningConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VulnerabilityScanningConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VulnerabilityScanningConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VulnerabilityScanningConfig { + + /** EnablementConfig enum. */ + enum EnablementConfig { + ENABLEMENT_CONFIG_UNSPECIFIED = 0, + INHERITED = 1, + DISABLED = 2 + } + + /** EnablementState enum. */ + enum EnablementState { + ENABLEMENT_STATE_UNSPECIFIED = 0, + SCANNING_UNSUPPORTED = 1, + SCANNING_DISABLED = 2, + SCANNING_ACTIVE = 3 + } + } + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + DOCKER = 1, + MAVEN = 2, + NPM = 3, + APT = 5, + YUM = 6, + PYTHON = 8, + KFP = 9, + GO = 10, + GENERIC = 11, + RUBY = 12 + } + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + STANDARD_REPOSITORY = 1, + VIRTUAL_REPOSITORY = 2, + REMOTE_REPOSITORY = 3 + } + } + + /** Properties of a ListRepositoriesRequest. */ + interface IListRepositoriesRequest { + + /** ListRepositoriesRequest parent */ + parent?: (string|null); + + /** ListRepositoriesRequest pageSize */ + pageSize?: (number|null); + + /** ListRepositoriesRequest pageToken */ + pageToken?: (string|null); + + /** ListRepositoriesRequest filter */ + filter?: (string|null); + + /** ListRepositoriesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListRepositoriesRequest. */ + class ListRepositoriesRequest implements IListRepositoriesRequest { + + /** + * Constructs a new ListRepositoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListRepositoriesRequest); + + /** ListRepositoriesRequest parent. */ + public parent: string; + + /** ListRepositoriesRequest pageSize. */ + public pageSize: number; + + /** ListRepositoriesRequest pageToken. */ + public pageToken: string; + + /** ListRepositoriesRequest filter. */ + public filter: string; + + /** ListRepositoriesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListRepositoriesRequest): google.devtools.artifactregistry.v1.ListRepositoriesRequest; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListRepositoriesRequest; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListRepositoriesRequest; + + /** + * Verifies a ListRepositoriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListRepositoriesRequest; + + /** + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @param message ListRepositoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListRepositoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRepositoriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRepositoriesResponse. */ + interface IListRepositoriesResponse { + + /** ListRepositoriesResponse repositories */ + repositories?: (google.devtools.artifactregistry.v1.IRepository[]|null); + + /** ListRepositoriesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListRepositoriesResponse. */ + class ListRepositoriesResponse implements IListRepositoriesResponse { + + /** + * Constructs a new ListRepositoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListRepositoriesResponse); + + /** ListRepositoriesResponse repositories. */ + public repositories: google.devtools.artifactregistry.v1.IRepository[]; + + /** ListRepositoriesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListRepositoriesResponse): google.devtools.artifactregistry.v1.ListRepositoriesResponse; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListRepositoriesResponse; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListRepositoriesResponse; + + /** + * Verifies a ListRepositoriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListRepositoriesResponse; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @param message ListRepositoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListRepositoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRepositoriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetRepositoryRequest. */ + interface IGetRepositoryRequest { + + /** GetRepositoryRequest name */ + name?: (string|null); + } + + /** Represents a GetRepositoryRequest. */ + class GetRepositoryRequest implements IGetRepositoryRequest { + + /** + * Constructs a new GetRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetRepositoryRequest); + + /** GetRepositoryRequest name. */ + public name: string; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRepositoryRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetRepositoryRequest): google.devtools.artifactregistry.v1.GetRepositoryRequest; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetRepositoryRequest; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetRepositoryRequest; + + /** + * Verifies a GetRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetRepositoryRequest; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @param message GetRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateRepositoryRequest. */ + interface ICreateRepositoryRequest { + + /** CreateRepositoryRequest parent */ + parent?: (string|null); + + /** CreateRepositoryRequest repositoryId */ + repositoryId?: (string|null); + + /** CreateRepositoryRequest repository */ + repository?: (google.devtools.artifactregistry.v1.IRepository|null); + } + + /** Represents a CreateRepositoryRequest. */ + class CreateRepositoryRequest implements ICreateRepositoryRequest { + + /** + * Constructs a new CreateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.ICreateRepositoryRequest); + + /** CreateRepositoryRequest parent. */ + public parent: string; + + /** CreateRepositoryRequest repositoryId. */ + public repositoryId: string; + + /** CreateRepositoryRequest repository. */ + public repository?: (google.devtools.artifactregistry.v1.IRepository|null); + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRepositoryRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.ICreateRepositoryRequest): google.devtools.artifactregistry.v1.CreateRepositoryRequest; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.CreateRepositoryRequest; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.CreateRepositoryRequest; + + /** + * Verifies a CreateRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CreateRepositoryRequest; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @param message CreateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.CreateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateRepositoryRequest. */ + interface IUpdateRepositoryRequest { + + /** UpdateRepositoryRequest repository */ + repository?: (google.devtools.artifactregistry.v1.IRepository|null); + + /** UpdateRepositoryRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateRepositoryRequest. */ + class UpdateRepositoryRequest implements IUpdateRepositoryRequest { + + /** + * Constructs a new UpdateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest); + + /** UpdateRepositoryRequest repository. */ + public repository?: (google.devtools.artifactregistry.v1.IRepository|null); + + /** UpdateRepositoryRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateRepositoryRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest): google.devtools.artifactregistry.v1.UpdateRepositoryRequest; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRepositoryRequest.verify|verify} messages. + * @param message UpdateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRepositoryRequest.verify|verify} messages. + * @param message UpdateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdateRepositoryRequest; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdateRepositoryRequest; + + /** + * Verifies an UpdateRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateRepositoryRequest; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @param message UpdateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.UpdateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteRepositoryRequest. */ + interface IDeleteRepositoryRequest { + + /** DeleteRepositoryRequest name */ + name?: (string|null); + } + + /** Represents a DeleteRepositoryRequest. */ + class DeleteRepositoryRequest implements IDeleteRepositoryRequest { + + /** + * Constructs a new DeleteRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest); + + /** DeleteRepositoryRequest name. */ + public name: string; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteRepositoryRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest): google.devtools.artifactregistry.v1.DeleteRepositoryRequest; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DeleteRepositoryRequest; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DeleteRepositoryRequest; + + /** + * Verifies a DeleteRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteRepositoryRequest; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @param message DeleteRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.DeleteRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Rule. */ + interface IRule { + + /** Rule name */ + name?: (string|null); + + /** Rule action */ + action?: (google.devtools.artifactregistry.v1.Rule.Action|keyof typeof google.devtools.artifactregistry.v1.Rule.Action|null); + + /** Rule operation */ + operation?: (google.devtools.artifactregistry.v1.Rule.Operation|keyof typeof google.devtools.artifactregistry.v1.Rule.Operation|null); + + /** Rule condition */ + condition?: (google.type.IExpr|null); + + /** Rule packageId */ + packageId?: (string|null); + } + + /** Represents a Rule. */ + class Rule implements IRule { + + /** + * Constructs a new Rule. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IRule); + + /** Rule name. */ + public name: string; + + /** Rule action. */ + public action: (google.devtools.artifactregistry.v1.Rule.Action|keyof typeof google.devtools.artifactregistry.v1.Rule.Action); + + /** Rule operation. */ + public operation: (google.devtools.artifactregistry.v1.Rule.Operation|keyof typeof google.devtools.artifactregistry.v1.Rule.Operation); + + /** Rule condition. */ + public condition?: (google.type.IExpr|null); + + /** Rule packageId. */ + public packageId: string; + + /** + * Creates a new Rule instance using the specified properties. + * @param [properties] Properties to set + * @returns Rule instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IRule): google.devtools.artifactregistry.v1.Rule; + + /** + * Encodes the specified Rule message. Does not implicitly {@link google.devtools.artifactregistry.v1.Rule.verify|verify} messages. + * @param message Rule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Rule message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Rule.verify|verify} messages. + * @param message Rule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Rule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Rule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Rule; + + /** + * Decodes a Rule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Rule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Rule; + + /** + * Verifies a Rule 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 Rule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Rule + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Rule; + + /** + * Creates a plain object from a Rule message. Also converts values to other types if specified. + * @param message Rule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Rule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Rule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Rule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Rule { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ALLOW = 1, + DENY = 2 + } + + /** Operation enum. */ + enum Operation { + OPERATION_UNSPECIFIED = 0, + DOWNLOAD = 1 + } + } + + /** Properties of a ListRulesRequest. */ + interface IListRulesRequest { + + /** ListRulesRequest parent */ + parent?: (string|null); + + /** ListRulesRequest pageSize */ + pageSize?: (number|null); + + /** ListRulesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListRulesRequest. */ + class ListRulesRequest implements IListRulesRequest { + + /** + * Constructs a new ListRulesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListRulesRequest); + + /** ListRulesRequest parent. */ + public parent: string; + + /** ListRulesRequest pageSize. */ + public pageSize: number; + + /** ListRulesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListRulesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRulesRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListRulesRequest): google.devtools.artifactregistry.v1.ListRulesRequest; + + /** + * Encodes the specified ListRulesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesRequest.verify|verify} messages. + * @param message ListRulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRulesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesRequest.verify|verify} messages. + * @param message ListRulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRulesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListRulesRequest; + + /** + * Decodes a ListRulesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListRulesRequest; + + /** + * Verifies a ListRulesRequest 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 ListRulesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRulesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListRulesRequest; + + /** + * Creates a plain object from a ListRulesRequest message. Also converts values to other types if specified. + * @param message ListRulesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRulesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRulesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRulesResponse. */ + interface IListRulesResponse { + + /** ListRulesResponse rules */ + rules?: (google.devtools.artifactregistry.v1.IRule[]|null); + + /** ListRulesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListRulesResponse. */ + class ListRulesResponse implements IListRulesResponse { + + /** + * Constructs a new ListRulesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListRulesResponse); + + /** ListRulesResponse rules. */ + public rules: google.devtools.artifactregistry.v1.IRule[]; + + /** ListRulesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListRulesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRulesResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListRulesResponse): google.devtools.artifactregistry.v1.ListRulesResponse; + + /** + * Encodes the specified ListRulesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesResponse.verify|verify} messages. + * @param message ListRulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRulesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesResponse.verify|verify} messages. + * @param message ListRulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRulesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListRulesResponse; + + /** + * Decodes a ListRulesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListRulesResponse; + + /** + * Verifies a ListRulesResponse 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 ListRulesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRulesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListRulesResponse; + + /** + * Creates a plain object from a ListRulesResponse message. Also converts values to other types if specified. + * @param message ListRulesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRulesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRulesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetRuleRequest. */ + interface IGetRuleRequest { + + /** GetRuleRequest name */ + name?: (string|null); + } + + /** Represents a GetRuleRequest. */ + class GetRuleRequest implements IGetRuleRequest { + + /** + * Constructs a new GetRuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetRuleRequest); + + /** GetRuleRequest name. */ + public name: string; + + /** + * Creates a new GetRuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRuleRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetRuleRequest): google.devtools.artifactregistry.v1.GetRuleRequest; + + /** + * Encodes the specified GetRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRuleRequest.verify|verify} messages. + * @param message GetRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRuleRequest.verify|verify} messages. + * @param message GetRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetRuleRequest; + + /** + * Decodes a GetRuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetRuleRequest; + + /** + * Verifies a GetRuleRequest 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 GetRuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetRuleRequest; + + /** + * Creates a plain object from a GetRuleRequest message. Also converts values to other types if specified. + * @param message GetRuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetRuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateRuleRequest. */ + interface ICreateRuleRequest { + + /** CreateRuleRequest parent */ + parent?: (string|null); + + /** CreateRuleRequest ruleId */ + ruleId?: (string|null); + + /** CreateRuleRequest rule */ + rule?: (google.devtools.artifactregistry.v1.IRule|null); + } + + /** Represents a CreateRuleRequest. */ + class CreateRuleRequest implements ICreateRuleRequest { + + /** + * Constructs a new CreateRuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.ICreateRuleRequest); + + /** CreateRuleRequest parent. */ + public parent: string; + + /** CreateRuleRequest ruleId. */ + public ruleId: string; + + /** CreateRuleRequest rule. */ + public rule?: (google.devtools.artifactregistry.v1.IRule|null); + + /** + * Creates a new CreateRuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRuleRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.ICreateRuleRequest): google.devtools.artifactregistry.v1.CreateRuleRequest; + + /** + * Encodes the specified CreateRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRuleRequest.verify|verify} messages. + * @param message CreateRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.ICreateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRuleRequest.verify|verify} messages. + * @param message CreateRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICreateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.CreateRuleRequest; + + /** + * Decodes a CreateRuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.CreateRuleRequest; + + /** + * Verifies a CreateRuleRequest 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 CreateRuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateRuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CreateRuleRequest; + + /** + * Creates a plain object from a CreateRuleRequest message. Also converts values to other types if specified. + * @param message CreateRuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.CreateRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateRuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateRuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateRuleRequest. */ + interface IUpdateRuleRequest { + + /** UpdateRuleRequest rule */ + rule?: (google.devtools.artifactregistry.v1.IRule|null); + + /** UpdateRuleRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateRuleRequest. */ + class UpdateRuleRequest implements IUpdateRuleRequest { + + /** + * Constructs a new UpdateRuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IUpdateRuleRequest); + + /** UpdateRuleRequest rule. */ + public rule?: (google.devtools.artifactregistry.v1.IRule|null); + + /** UpdateRuleRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateRuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateRuleRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IUpdateRuleRequest): google.devtools.artifactregistry.v1.UpdateRuleRequest; + + /** + * Encodes the specified UpdateRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRuleRequest.verify|verify} messages. + * @param message UpdateRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IUpdateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRuleRequest.verify|verify} messages. + * @param message UpdateRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateRuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdateRuleRequest; + + /** + * Decodes an UpdateRuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdateRuleRequest; + + /** + * Verifies an UpdateRuleRequest 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 UpdateRuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateRuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateRuleRequest; + + /** + * Creates a plain object from an UpdateRuleRequest message. Also converts values to other types if specified. + * @param message UpdateRuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.UpdateRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateRuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateRuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteRuleRequest. */ + interface IDeleteRuleRequest { + + /** DeleteRuleRequest name */ + name?: (string|null); + } + + /** Represents a DeleteRuleRequest. */ + class DeleteRuleRequest implements IDeleteRuleRequest { + + /** + * Constructs a new DeleteRuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IDeleteRuleRequest); + + /** DeleteRuleRequest name. */ + public name: string; + + /** + * Creates a new DeleteRuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteRuleRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IDeleteRuleRequest): google.devtools.artifactregistry.v1.DeleteRuleRequest; + + /** + * Encodes the specified DeleteRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRuleRequest.verify|verify} messages. + * @param message DeleteRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IDeleteRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRuleRequest.verify|verify} messages. + * @param message DeleteRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteRuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DeleteRuleRequest; + + /** + * Decodes a DeleteRuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DeleteRuleRequest; + + /** + * Verifies a DeleteRuleRequest 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 DeleteRuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteRuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteRuleRequest; + + /** + * Creates a plain object from a DeleteRuleRequest message. Also converts values to other types if specified. + * @param message DeleteRuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.DeleteRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteRuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteRuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents an ArtifactRegistry */ + class ArtifactRegistry extends $protobuf.rpc.Service { + + /** + * Constructs a new ArtifactRegistry service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new ArtifactRegistry service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ArtifactRegistry; + + /** + * Calls ListDockerImages. + * @param request ListDockerImagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDockerImagesResponse + */ + public listDockerImages(request: google.devtools.artifactregistry.v1.IListDockerImagesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImagesCallback): void; + + /** + * Calls ListDockerImages. + * @param request ListDockerImagesRequest message or plain object + * @returns Promise + */ + public listDockerImages(request: google.devtools.artifactregistry.v1.IListDockerImagesRequest): Promise; + + /** + * Calls GetDockerImage. + * @param request GetDockerImageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DockerImage + */ + public getDockerImage(request: google.devtools.artifactregistry.v1.IGetDockerImageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImageCallback): void; + + /** + * Calls GetDockerImage. + * @param request GetDockerImageRequest message or plain object + * @returns Promise + */ + public getDockerImage(request: google.devtools.artifactregistry.v1.IGetDockerImageRequest): Promise; + + /** + * Calls ListMavenArtifacts. + * @param request ListMavenArtifactsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMavenArtifactsResponse + */ + public listMavenArtifacts(request: google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListMavenArtifactsCallback): void; + + /** + * Calls ListMavenArtifacts. + * @param request ListMavenArtifactsRequest message or plain object + * @returns Promise + */ + public listMavenArtifacts(request: google.devtools.artifactregistry.v1.IListMavenArtifactsRequest): Promise; + + /** + * Calls GetMavenArtifact. + * @param request GetMavenArtifactRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MavenArtifact + */ + public getMavenArtifact(request: google.devtools.artifactregistry.v1.IGetMavenArtifactRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetMavenArtifactCallback): void; + + /** + * Calls GetMavenArtifact. + * @param request GetMavenArtifactRequest message or plain object + * @returns Promise + */ + public getMavenArtifact(request: google.devtools.artifactregistry.v1.IGetMavenArtifactRequest): Promise; + + /** + * Calls ListNpmPackages. + * @param request ListNpmPackagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListNpmPackagesResponse + */ + public listNpmPackages(request: google.devtools.artifactregistry.v1.IListNpmPackagesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListNpmPackagesCallback): void; + + /** + * Calls ListNpmPackages. + * @param request ListNpmPackagesRequest message or plain object + * @returns Promise + */ + public listNpmPackages(request: google.devtools.artifactregistry.v1.IListNpmPackagesRequest): Promise; + + /** + * Calls GetNpmPackage. + * @param request GetNpmPackageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NpmPackage + */ + public getNpmPackage(request: google.devtools.artifactregistry.v1.IGetNpmPackageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetNpmPackageCallback): void; + + /** + * Calls GetNpmPackage. + * @param request GetNpmPackageRequest message or plain object + * @returns Promise + */ + public getNpmPackage(request: google.devtools.artifactregistry.v1.IGetNpmPackageRequest): Promise; + + /** + * Calls ListPythonPackages. + * @param request ListPythonPackagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPythonPackagesResponse + */ + public listPythonPackages(request: google.devtools.artifactregistry.v1.IListPythonPackagesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListPythonPackagesCallback): void; + + /** + * Calls ListPythonPackages. + * @param request ListPythonPackagesRequest message or plain object + * @returns Promise + */ + public listPythonPackages(request: google.devtools.artifactregistry.v1.IListPythonPackagesRequest): Promise; + + /** + * Calls GetPythonPackage. + * @param request GetPythonPackageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PythonPackage + */ + public getPythonPackage(request: google.devtools.artifactregistry.v1.IGetPythonPackageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetPythonPackageCallback): void; + + /** + * Calls GetPythonPackage. + * @param request GetPythonPackageRequest message or plain object + * @returns Promise + */ + public getPythonPackage(request: google.devtools.artifactregistry.v1.IGetPythonPackageRequest): Promise; + + /** + * Calls ImportAptArtifacts. + * @param request ImportAptArtifactsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importAptArtifacts(request: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifactsCallback): void; + + /** + * Calls ImportAptArtifacts. + * @param request ImportAptArtifactsRequest message or plain object + * @returns Promise + */ + public importAptArtifacts(request: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest): Promise; + + /** + * Calls ImportYumArtifacts. + * @param request ImportYumArtifactsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importYumArtifacts(request: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifactsCallback): void; + + /** + * Calls ImportYumArtifacts. + * @param request ImportYumArtifactsRequest message or plain object + * @returns Promise + */ + public importYumArtifacts(request: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest): Promise; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRepositoriesResponse + */ + public listRepositories(request: google.devtools.artifactregistry.v1.IListRepositoriesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositoriesCallback): void; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @returns Promise + */ + public listRepositories(request: google.devtools.artifactregistry.v1.IListRepositoriesRequest): Promise; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public getRepository(request: google.devtools.artifactregistry.v1.IGetRepositoryRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepositoryCallback): void; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @returns Promise + */ + public getRepository(request: google.devtools.artifactregistry.v1.IGetRepositoryRequest): Promise; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createRepository(request: google.devtools.artifactregistry.v1.ICreateRepositoryRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepositoryCallback): void; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @returns Promise + */ + public createRepository(request: google.devtools.artifactregistry.v1.ICreateRepositoryRequest): Promise; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public updateRepository(request: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepositoryCallback): void; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @returns Promise + */ + public updateRepository(request: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest): Promise; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteRepository(request: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepositoryCallback): void; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @returns Promise + */ + public deleteRepository(request: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest): Promise; + + /** + * Calls ListPackages. + * @param request ListPackagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPackagesResponse + */ + public listPackages(request: google.devtools.artifactregistry.v1.IListPackagesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackagesCallback): void; + + /** + * Calls ListPackages. + * @param request ListPackagesRequest message or plain object + * @returns Promise + */ + public listPackages(request: google.devtools.artifactregistry.v1.IListPackagesRequest): Promise; + + /** + * Calls GetPackage. + * @param request GetPackageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Package + */ + public getPackage(request: google.devtools.artifactregistry.v1.IGetPackageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackageCallback): void; + + /** + * Calls GetPackage. + * @param request GetPackageRequest message or plain object + * @returns Promise + */ + public getPackage(request: google.devtools.artifactregistry.v1.IGetPackageRequest): Promise; + + /** + * Calls DeletePackage. + * @param request DeletePackageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deletePackage(request: google.devtools.artifactregistry.v1.IDeletePackageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackageCallback): void; + + /** + * Calls DeletePackage. + * @param request DeletePackageRequest message or plain object + * @returns Promise + */ + public deletePackage(request: google.devtools.artifactregistry.v1.IDeletePackageRequest): Promise; + + /** + * Calls ListVersions. + * @param request ListVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListVersionsResponse + */ + public listVersions(request: google.devtools.artifactregistry.v1.IListVersionsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersionsCallback): void; + + /** + * Calls ListVersions. + * @param request ListVersionsRequest message or plain object + * @returns Promise + */ + public listVersions(request: google.devtools.artifactregistry.v1.IListVersionsRequest): Promise; + + /** + * Calls GetVersion. + * @param request GetVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Version + */ + public getVersion(request: google.devtools.artifactregistry.v1.IGetVersionRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersionCallback): void; + + /** + * Calls GetVersion. + * @param request GetVersionRequest message or plain object + * @returns Promise + */ + public getVersion(request: google.devtools.artifactregistry.v1.IGetVersionRequest): Promise; + + /** + * Calls DeleteVersion. + * @param request DeleteVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteVersion(request: google.devtools.artifactregistry.v1.IDeleteVersionRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersionCallback): void; + + /** + * Calls DeleteVersion. + * @param request DeleteVersionRequest message or plain object + * @returns Promise + */ + public deleteVersion(request: google.devtools.artifactregistry.v1.IDeleteVersionRequest): Promise; + + /** + * Calls BatchDeleteVersions. + * @param request BatchDeleteVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public batchDeleteVersions(request: google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.BatchDeleteVersionsCallback): void; + + /** + * Calls BatchDeleteVersions. + * @param request BatchDeleteVersionsRequest message or plain object + * @returns Promise + */ + public batchDeleteVersions(request: google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest): Promise; + + /** + * Calls UpdateVersion. + * @param request UpdateVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Version + */ + public updateVersion(request: google.devtools.artifactregistry.v1.IUpdateVersionRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVersionCallback): void; + + /** + * Calls UpdateVersion. + * @param request UpdateVersionRequest message or plain object + * @returns Promise + */ + public updateVersion(request: google.devtools.artifactregistry.v1.IUpdateVersionRequest): Promise; + + /** + * Calls ListFiles. + * @param request ListFilesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFilesResponse + */ + public listFiles(request: google.devtools.artifactregistry.v1.IListFilesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListFilesCallback): void; + + /** + * Calls ListFiles. + * @param request ListFilesRequest message or plain object + * @returns Promise + */ + public listFiles(request: google.devtools.artifactregistry.v1.IListFilesRequest): Promise; + + /** + * Calls GetFile. + * @param request GetFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and File + */ + public getFile(request: google.devtools.artifactregistry.v1.IGetFileRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetFileCallback): void; + + /** + * Calls GetFile. + * @param request GetFileRequest message or plain object + * @returns Promise + */ + public getFile(request: google.devtools.artifactregistry.v1.IGetFileRequest): Promise; + + /** + * Calls DeleteFile. + * @param request DeleteFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteFile(request: google.devtools.artifactregistry.v1.IDeleteFileRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteFileCallback): void; + + /** + * Calls DeleteFile. + * @param request DeleteFileRequest message or plain object + * @returns Promise + */ + public deleteFile(request: google.devtools.artifactregistry.v1.IDeleteFileRequest): Promise; + + /** + * Calls UpdateFile. + * @param request UpdateFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and File + */ + public updateFile(request: google.devtools.artifactregistry.v1.IUpdateFileRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateFileCallback): void; + + /** + * Calls UpdateFile. + * @param request UpdateFileRequest message or plain object + * @returns Promise + */ + public updateFile(request: google.devtools.artifactregistry.v1.IUpdateFileRequest): Promise; + + /** + * Calls ListTags. + * @param request ListTagsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTagsResponse + */ + public listTags(request: google.devtools.artifactregistry.v1.IListTagsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListTagsCallback): void; + + /** + * Calls ListTags. + * @param request ListTagsRequest message or plain object + * @returns Promise + */ + public listTags(request: google.devtools.artifactregistry.v1.IListTagsRequest): Promise; + + /** + * Calls GetTag. + * @param request GetTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Tag + */ + public getTag(request: google.devtools.artifactregistry.v1.IGetTagRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetTagCallback): void; + + /** + * Calls GetTag. + * @param request GetTagRequest message or plain object + * @returns Promise + */ + public getTag(request: google.devtools.artifactregistry.v1.IGetTagRequest): Promise; + + /** + * Calls CreateTag. + * @param request CreateTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Tag + */ + public createTag(request: google.devtools.artifactregistry.v1.ICreateTagRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTagCallback): void; + + /** + * Calls CreateTag. + * @param request CreateTagRequest message or plain object + * @returns Promise + */ + public createTag(request: google.devtools.artifactregistry.v1.ICreateTagRequest): Promise; + + /** + * Calls UpdateTag. + * @param request UpdateTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Tag + */ + public updateTag(request: google.devtools.artifactregistry.v1.IUpdateTagRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTagCallback): void; + + /** + * Calls UpdateTag. + * @param request UpdateTagRequest message or plain object + * @returns Promise + */ + public updateTag(request: google.devtools.artifactregistry.v1.IUpdateTagRequest): Promise; + + /** + * Calls DeleteTag. + * @param request DeleteTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteTag(request: google.devtools.artifactregistry.v1.IDeleteTagRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTagCallback): void; + + /** + * Calls DeleteTag. + * @param request DeleteTagRequest message or plain object + * @returns Promise + */ + public deleteTag(request: google.devtools.artifactregistry.v1.IDeleteTagRequest): Promise; + + /** + * Calls CreateRule. + * @param request CreateRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Rule + */ + public createRule(request: google.devtools.artifactregistry.v1.ICreateRuleRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRuleCallback): void; + + /** + * Calls CreateRule. + * @param request CreateRuleRequest message or plain object + * @returns Promise + */ + public createRule(request: google.devtools.artifactregistry.v1.ICreateRuleRequest): Promise; + + /** + * Calls ListRules. + * @param request ListRulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRulesResponse + */ + public listRules(request: google.devtools.artifactregistry.v1.IListRulesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListRulesCallback): void; + + /** + * Calls ListRules. + * @param request ListRulesRequest message or plain object + * @returns Promise + */ + public listRules(request: google.devtools.artifactregistry.v1.IListRulesRequest): Promise; + + /** + * Calls GetRule. + * @param request GetRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Rule + */ + public getRule(request: google.devtools.artifactregistry.v1.IGetRuleRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetRuleCallback): void; + + /** + * Calls GetRule. + * @param request GetRuleRequest message or plain object + * @returns Promise + */ + public getRule(request: google.devtools.artifactregistry.v1.IGetRuleRequest): Promise; + + /** + * Calls UpdateRule. + * @param request UpdateRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Rule + */ + public updateRule(request: google.devtools.artifactregistry.v1.IUpdateRuleRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRuleCallback): void; + + /** + * Calls UpdateRule. + * @param request UpdateRuleRequest message or plain object + * @returns Promise + */ + public updateRule(request: google.devtools.artifactregistry.v1.IUpdateRuleRequest): Promise; + + /** + * Calls DeleteRule. + * @param request DeleteRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteRule(request: google.devtools.artifactregistry.v1.IDeleteRuleRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRuleCallback): void; + + /** + * Calls DeleteRule. + * @param request DeleteRuleRequest message or plain object + * @returns Promise + */ + public deleteRule(request: google.devtools.artifactregistry.v1.IDeleteRuleRequest): Promise; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + + /** + * Calls GetProjectSettings. + * @param request GetProjectSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ProjectSettings + */ + public getProjectSettings(request: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettingsCallback): void; + + /** + * Calls GetProjectSettings. + * @param request GetProjectSettingsRequest message or plain object + * @returns Promise + */ + public getProjectSettings(request: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest): Promise; + + /** + * Calls UpdateProjectSettings. + * @param request UpdateProjectSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ProjectSettings + */ + public updateProjectSettings(request: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettingsCallback): void; + + /** + * Calls UpdateProjectSettings. + * @param request UpdateProjectSettingsRequest message or plain object + * @returns Promise + */ + public updateProjectSettings(request: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest): Promise; + + /** + * Calls GetVPCSCConfig. + * @param request GetVPCSCConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VPCSCConfig + */ + public getVPCSCConfig(request: google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetVPCSCConfigCallback): void; + + /** + * Calls GetVPCSCConfig. + * @param request GetVPCSCConfigRequest message or plain object + * @returns Promise + */ + public getVPCSCConfig(request: google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest): Promise; + + /** + * Calls UpdateVPCSCConfig. + * @param request UpdateVPCSCConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VPCSCConfig + */ + public updateVPCSCConfig(request: google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVPCSCConfigCallback): void; + + /** + * Calls UpdateVPCSCConfig. + * @param request UpdateVPCSCConfigRequest message or plain object + * @returns Promise + */ + public updateVPCSCConfig(request: google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest): Promise; + + /** + * Calls UpdatePackage. + * @param request UpdatePackageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Package + */ + public updatePackage(request: google.devtools.artifactregistry.v1.IUpdatePackageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdatePackageCallback): void; + + /** + * Calls UpdatePackage. + * @param request UpdatePackageRequest message or plain object + * @returns Promise + */ + public updatePackage(request: google.devtools.artifactregistry.v1.IUpdatePackageRequest): Promise; + + /** + * Calls ListAttachments. + * @param request ListAttachmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAttachmentsResponse + */ + public listAttachments(request: google.devtools.artifactregistry.v1.IListAttachmentsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListAttachmentsCallback): void; + + /** + * Calls ListAttachments. + * @param request ListAttachmentsRequest message or plain object + * @returns Promise + */ + public listAttachments(request: google.devtools.artifactregistry.v1.IListAttachmentsRequest): Promise; + + /** + * Calls GetAttachment. + * @param request GetAttachmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Attachment + */ + public getAttachment(request: google.devtools.artifactregistry.v1.IGetAttachmentRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetAttachmentCallback): void; + + /** + * Calls GetAttachment. + * @param request GetAttachmentRequest message or plain object + * @returns Promise + */ + public getAttachment(request: google.devtools.artifactregistry.v1.IGetAttachmentRequest): Promise; + + /** + * Calls CreateAttachment. + * @param request CreateAttachmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAttachment(request: google.devtools.artifactregistry.v1.ICreateAttachmentRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.CreateAttachmentCallback): void; + + /** + * Calls CreateAttachment. + * @param request CreateAttachmentRequest message or plain object + * @returns Promise + */ + public createAttachment(request: google.devtools.artifactregistry.v1.ICreateAttachmentRequest): Promise; + + /** + * Calls DeleteAttachment. + * @param request DeleteAttachmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteAttachment(request: google.devtools.artifactregistry.v1.IDeleteAttachmentRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteAttachmentCallback): void; + + /** + * Calls DeleteAttachment. + * @param request DeleteAttachmentRequest message or plain object + * @returns Promise + */ + public deleteAttachment(request: google.devtools.artifactregistry.v1.IDeleteAttachmentRequest): Promise; + + /** + * Calls ExportArtifact. + * @param request ExportArtifactRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public exportArtifact(request: google.devtools.artifactregistry.v1.IExportArtifactRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ExportArtifactCallback): void; + + /** + * Calls ExportArtifact. + * @param request ExportArtifactRequest message or plain object + * @returns Promise + */ + public exportArtifact(request: google.devtools.artifactregistry.v1.IExportArtifactRequest): Promise; + } + + namespace ArtifactRegistry { + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listDockerImages}. + * @param error Error, if any + * @param [response] ListDockerImagesResponse + */ + type ListDockerImagesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListDockerImagesResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getDockerImage}. + * @param error Error, if any + * @param [response] DockerImage + */ + type GetDockerImageCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.DockerImage) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listMavenArtifacts}. + * @param error Error, if any + * @param [response] ListMavenArtifactsResponse + */ + type ListMavenArtifactsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListMavenArtifactsResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getMavenArtifact}. + * @param error Error, if any + * @param [response] MavenArtifact + */ + type GetMavenArtifactCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.MavenArtifact) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listNpmPackages}. + * @param error Error, if any + * @param [response] ListNpmPackagesResponse + */ + type ListNpmPackagesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListNpmPackagesResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getNpmPackage}. + * @param error Error, if any + * @param [response] NpmPackage + */ + type GetNpmPackageCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.NpmPackage) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listPythonPackages}. + * @param error Error, if any + * @param [response] ListPythonPackagesResponse + */ + type ListPythonPackagesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListPythonPackagesResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getPythonPackage}. + * @param error Error, if any + * @param [response] PythonPackage + */ + type GetPythonPackageCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.PythonPackage) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|importAptArtifacts}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportAptArtifactsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|importYumArtifacts}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportYumArtifactsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listRepositories}. + * @param error Error, if any + * @param [response] ListRepositoriesResponse + */ + type ListRepositoriesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListRepositoriesResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type GetRepositoryCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Repository) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createRepository}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateRepositoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type UpdateRepositoryCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Repository) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteRepository}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteRepositoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listPackages}. + * @param error Error, if any + * @param [response] ListPackagesResponse + */ + type ListPackagesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListPackagesResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getPackage}. + * @param error Error, if any + * @param [response] Package + */ + type GetPackageCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Package) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deletePackage}. + * @param error Error, if any + * @param [response] Operation + */ + type DeletePackageCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listVersions}. + * @param error Error, if any + * @param [response] ListVersionsResponse + */ + type ListVersionsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListVersionsResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getVersion}. + * @param error Error, if any + * @param [response] Version + */ + type GetVersionCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Version) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteVersion}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteVersionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|batchDeleteVersions}. + * @param error Error, if any + * @param [response] Operation + */ + type BatchDeleteVersionsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateVersion}. + * @param error Error, if any + * @param [response] Version + */ + type UpdateVersionCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Version) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listFiles}. + * @param error Error, if any + * @param [response] ListFilesResponse + */ + type ListFilesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListFilesResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getFile}. + * @param error Error, if any + * @param [response] File + */ + type GetFileCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.File) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteFile}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteFileCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateFile}. + * @param error Error, if any + * @param [response] File + */ + type UpdateFileCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.File) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listTags}. + * @param error Error, if any + * @param [response] ListTagsResponse + */ + type ListTagsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListTagsResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getTag}. + * @param error Error, if any + * @param [response] Tag + */ + type GetTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Tag) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createTag}. + * @param error Error, if any + * @param [response] Tag + */ + type CreateTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Tag) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateTag}. + * @param error Error, if any + * @param [response] Tag + */ + type UpdateTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Tag) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteTag}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteTagCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createRule}. + * @param error Error, if any + * @param [response] Rule + */ + type CreateRuleCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Rule) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listRules}. + * @param error Error, if any + * @param [response] ListRulesResponse + */ + type ListRulesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListRulesResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getRule}. + * @param error Error, if any + * @param [response] Rule + */ + type GetRuleCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Rule) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateRule}. + * @param error Error, if any + * @param [response] Rule + */ + type UpdateRuleCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Rule) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteRule}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteRuleCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getProjectSettings}. + * @param error Error, if any + * @param [response] ProjectSettings + */ + type GetProjectSettingsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ProjectSettings) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateProjectSettings}. + * @param error Error, if any + * @param [response] ProjectSettings + */ + type UpdateProjectSettingsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ProjectSettings) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getVPCSCConfig}. + * @param error Error, if any + * @param [response] VPCSCConfig + */ + type GetVPCSCConfigCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.VPCSCConfig) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateVPCSCConfig}. + * @param error Error, if any + * @param [response] VPCSCConfig + */ + type UpdateVPCSCConfigCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.VPCSCConfig) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updatePackage}. + * @param error Error, if any + * @param [response] Package + */ + type UpdatePackageCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Package) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listAttachments}. + * @param error Error, if any + * @param [response] ListAttachmentsResponse + */ + type ListAttachmentsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListAttachmentsResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getAttachment}. + * @param error Error, if any + * @param [response] Attachment + */ + type GetAttachmentCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Attachment) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createAttachment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAttachmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteAttachment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteAttachmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|exportArtifact}. + * @param error Error, if any + * @param [response] Operation + */ + type ExportArtifactCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IOperationMetadata); + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IOperationMetadata): google.devtools.artifactregistry.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.OperationMetadata; + + /** + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProjectSettings. */ + interface IProjectSettings { + + /** ProjectSettings name */ + name?: (string|null); + + /** ProjectSettings legacyRedirectionState */ + legacyRedirectionState?: (google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState|keyof typeof google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState|null); + + /** ProjectSettings pullPercent */ + pullPercent?: (number|null); + } + + /** Represents a ProjectSettings. */ + class ProjectSettings implements IProjectSettings { + + /** + * Constructs a new ProjectSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IProjectSettings); + + /** ProjectSettings name. */ + public name: string; + + /** ProjectSettings legacyRedirectionState. */ + public legacyRedirectionState: (google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState|keyof typeof google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState); + + /** ProjectSettings pullPercent. */ + public pullPercent: number; + + /** + * Creates a new ProjectSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ProjectSettings instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IProjectSettings): google.devtools.artifactregistry.v1.ProjectSettings; + + /** + * Encodes the specified ProjectSettings message. Does not implicitly {@link google.devtools.artifactregistry.v1.ProjectSettings.verify|verify} messages. + * @param message ProjectSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IProjectSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProjectSettings message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ProjectSettings.verify|verify} messages. + * @param message ProjectSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IProjectSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProjectSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProjectSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ProjectSettings; + + /** + * Decodes a ProjectSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProjectSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ProjectSettings; + + /** + * Verifies a ProjectSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProjectSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProjectSettings + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ProjectSettings; + + /** + * Creates a plain object from a ProjectSettings message. Also converts values to other types if specified. + * @param message ProjectSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ProjectSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProjectSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProjectSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + 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, + REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING = 5, + REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING = 6 + } + } + + /** Properties of a GetProjectSettingsRequest. */ + interface IGetProjectSettingsRequest { + + /** GetProjectSettingsRequest name */ + name?: (string|null); + } + + /** Represents a GetProjectSettingsRequest. */ + class GetProjectSettingsRequest implements IGetProjectSettingsRequest { + + /** + * Constructs a new GetProjectSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest); + + /** GetProjectSettingsRequest name. */ + public name: string; + + /** + * Creates a new GetProjectSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetProjectSettingsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest): google.devtools.artifactregistry.v1.GetProjectSettingsRequest; + + /** + * Encodes the specified GetProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetProjectSettingsRequest.verify|verify} messages. + * @param message GetProjectSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetProjectSettingsRequest.verify|verify} messages. + * @param message GetProjectSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetProjectSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetProjectSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetProjectSettingsRequest; + + /** + * Decodes a GetProjectSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetProjectSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetProjectSettingsRequest; + + /** + * Verifies a GetProjectSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetProjectSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetProjectSettingsRequest; + + /** + * Creates a plain object from a GetProjectSettingsRequest message. Also converts values to other types if specified. + * @param message GetProjectSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetProjectSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetProjectSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetProjectSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateProjectSettingsRequest. */ + interface IUpdateProjectSettingsRequest { + + /** UpdateProjectSettingsRequest projectSettings */ + projectSettings?: (google.devtools.artifactregistry.v1.IProjectSettings|null); + + /** UpdateProjectSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateProjectSettingsRequest. */ + class UpdateProjectSettingsRequest implements IUpdateProjectSettingsRequest { + + /** + * Constructs a new UpdateProjectSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest); + + /** UpdateProjectSettingsRequest projectSettings. */ + public projectSettings?: (google.devtools.artifactregistry.v1.IProjectSettings|null); + + /** UpdateProjectSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateProjectSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateProjectSettingsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest): google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; + + /** + * Encodes the specified UpdateProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.verify|verify} messages. + * @param message UpdateProjectSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.verify|verify} messages. + * @param message UpdateProjectSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateProjectSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; + + /** + * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateProjectSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; + + /** + * Verifies an UpdateProjectSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateProjectSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; + + /** + * Creates a plain object from an UpdateProjectSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateProjectSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateProjectSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateProjectSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VPCSCConfig. */ + interface IVPCSCConfig { + + /** VPCSCConfig name */ + name?: (string|null); + + /** VPCSCConfig vpcscPolicy */ + vpcscPolicy?: (google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy|keyof typeof google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy|null); + } + + /** Represents a VPCSCConfig. */ + class VPCSCConfig implements IVPCSCConfig { + + /** + * Constructs a new VPCSCConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IVPCSCConfig); + + /** VPCSCConfig name. */ + public name: string; + + /** VPCSCConfig vpcscPolicy. */ + public vpcscPolicy: (google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy|keyof typeof google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy); + + /** + * Creates a new VPCSCConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns VPCSCConfig instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IVPCSCConfig): google.devtools.artifactregistry.v1.VPCSCConfig; + + /** + * Encodes the specified VPCSCConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.VPCSCConfig.verify|verify} messages. + * @param message VPCSCConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IVPCSCConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VPCSCConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.VPCSCConfig.verify|verify} messages. + * @param message VPCSCConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IVPCSCConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VPCSCConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VPCSCConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.VPCSCConfig; + + /** + * Decodes a VPCSCConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VPCSCConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.VPCSCConfig; + + /** + * Verifies a VPCSCConfig 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 VPCSCConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VPCSCConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.VPCSCConfig; + + /** + * Creates a plain object from a VPCSCConfig message. Also converts values to other types if specified. + * @param message VPCSCConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.VPCSCConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VPCSCConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VPCSCConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VPCSCConfig { + + /** VPCSCPolicy enum. */ + enum VPCSCPolicy { + VPCSC_POLICY_UNSPECIFIED = 0, + DENY = 1, + ALLOW = 2 + } + } + + /** Properties of a GetVPCSCConfigRequest. */ + interface IGetVPCSCConfigRequest { + + /** GetVPCSCConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetVPCSCConfigRequest. */ + class GetVPCSCConfigRequest implements IGetVPCSCConfigRequest { + + /** + * Constructs a new GetVPCSCConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest); + + /** GetVPCSCConfigRequest name. */ + public name: string; + + /** + * Creates a new GetVPCSCConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVPCSCConfigRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest): google.devtools.artifactregistry.v1.GetVPCSCConfigRequest; + + /** + * Encodes the specified GetVPCSCConfigRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.verify|verify} messages. + * @param message GetVPCSCConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVPCSCConfigRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.verify|verify} messages. + * @param message GetVPCSCConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVPCSCConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVPCSCConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetVPCSCConfigRequest; + + /** + * Decodes a GetVPCSCConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVPCSCConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetVPCSCConfigRequest; + + /** + * Verifies a GetVPCSCConfigRequest 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 GetVPCSCConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVPCSCConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetVPCSCConfigRequest; + + /** + * Creates a plain object from a GetVPCSCConfigRequest message. Also converts values to other types if specified. + * @param message GetVPCSCConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetVPCSCConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVPCSCConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetVPCSCConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateVPCSCConfigRequest. */ + interface IUpdateVPCSCConfigRequest { + + /** UpdateVPCSCConfigRequest vpcscConfig */ + vpcscConfig?: (google.devtools.artifactregistry.v1.IVPCSCConfig|null); + + /** UpdateVPCSCConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateVPCSCConfigRequest. */ + class UpdateVPCSCConfigRequest implements IUpdateVPCSCConfigRequest { + + /** + * Constructs a new UpdateVPCSCConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest); + + /** UpdateVPCSCConfigRequest vpcscConfig. */ + public vpcscConfig?: (google.devtools.artifactregistry.v1.IVPCSCConfig|null); + + /** UpdateVPCSCConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateVPCSCConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateVPCSCConfigRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest): google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest; + + /** + * Encodes the specified UpdateVPCSCConfigRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.verify|verify} messages. + * @param message UpdateVPCSCConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateVPCSCConfigRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.verify|verify} messages. + * @param message UpdateVPCSCConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateVPCSCConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateVPCSCConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest; + + /** + * Decodes an UpdateVPCSCConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateVPCSCConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest; + + /** + * Verifies an UpdateVPCSCConfigRequest 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 UpdateVPCSCConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateVPCSCConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest; + + /** + * Creates a plain object from an UpdateVPCSCConfigRequest message. Also converts values to other types if specified. + * @param message UpdateVPCSCConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateVPCSCConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateVPCSCConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a YumArtifact. */ + interface IYumArtifact { + + /** YumArtifact name */ + name?: (string|null); + + /** YumArtifact packageName */ + packageName?: (string|null); + + /** YumArtifact packageType */ + packageType?: (google.devtools.artifactregistry.v1.YumArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1.YumArtifact.PackageType|null); + + /** YumArtifact architecture */ + architecture?: (string|null); + } + + /** Represents a YumArtifact. */ + class YumArtifact implements IYumArtifact { + + /** + * Constructs a new YumArtifact. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IYumArtifact); + + /** YumArtifact name. */ + public name: string; + + /** YumArtifact packageName. */ + public packageName: string; + + /** YumArtifact packageType. */ + public packageType: (google.devtools.artifactregistry.v1.YumArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1.YumArtifact.PackageType); + + /** YumArtifact architecture. */ + public architecture: string; + + /** + * Creates a new YumArtifact instance using the specified properties. + * @param [properties] Properties to set + * @returns YumArtifact instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IYumArtifact): google.devtools.artifactregistry.v1.YumArtifact; + + /** + * Encodes the specified YumArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.YumArtifact.verify|verify} messages. + * @param message YumArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IYumArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified YumArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.YumArtifact.verify|verify} messages. + * @param message YumArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IYumArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a YumArtifact message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YumArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.YumArtifact; + + /** + * Decodes a YumArtifact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YumArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.YumArtifact; + + /** + * Verifies a YumArtifact message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a YumArtifact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YumArtifact + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.YumArtifact; + + /** + * Creates a plain object from a YumArtifact message. Also converts values to other types if specified. + * @param message YumArtifact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.YumArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this YumArtifact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for YumArtifact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace YumArtifact { + + /** PackageType enum. */ + enum PackageType { + PACKAGE_TYPE_UNSPECIFIED = 0, + BINARY = 1, + SOURCE = 2 + } + } + + /** Properties of an ImportYumArtifactsGcsSource. */ + interface IImportYumArtifactsGcsSource { + + /** ImportYumArtifactsGcsSource uris */ + uris?: (string[]|null); + + /** ImportYumArtifactsGcsSource useWildcards */ + useWildcards?: (boolean|null); + } + + /** Represents an ImportYumArtifactsGcsSource. */ + class ImportYumArtifactsGcsSource implements IImportYumArtifactsGcsSource { + + /** + * Constructs a new ImportYumArtifactsGcsSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource); + + /** ImportYumArtifactsGcsSource uris. */ + public uris: string[]; + + /** ImportYumArtifactsGcsSource useWildcards. */ + public useWildcards: boolean; + + /** + * Creates a new ImportYumArtifactsGcsSource instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsGcsSource instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource): google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource; + + /** + * Encodes the specified ImportYumArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify|verify} messages. + * @param message ImportYumArtifactsGcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportYumArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify|verify} messages. + * @param message ImportYumArtifactsGcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportYumArtifactsGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource; + + /** + * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportYumArtifactsGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource; + + /** + * Verifies an ImportYumArtifactsGcsSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportYumArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportYumArtifactsGcsSource + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource; + + /** + * Creates a plain object from an ImportYumArtifactsGcsSource message. Also converts values to other types if specified. + * @param message ImportYumArtifactsGcsSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportYumArtifactsGcsSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportYumArtifactsGcsSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportYumArtifactsRequest. */ + interface IImportYumArtifactsRequest { + + /** ImportYumArtifactsRequest gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null); + + /** ImportYumArtifactsRequest parent */ + parent?: (string|null); + } + + /** Represents an ImportYumArtifactsRequest. */ + class ImportYumArtifactsRequest implements IImportYumArtifactsRequest { + + /** + * Constructs a new ImportYumArtifactsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest); + + /** ImportYumArtifactsRequest gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null); + + /** ImportYumArtifactsRequest parent. */ + public parent: string; + + /** ImportYumArtifactsRequest source. */ + public source?: "gcsSource"; + + /** + * Creates a new ImportYumArtifactsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest): google.devtools.artifactregistry.v1.ImportYumArtifactsRequest; + + /** + * Encodes the specified ImportYumArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.verify|verify} messages. + * @param message ImportYumArtifactsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportYumArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.verify|verify} messages. + * @param message ImportYumArtifactsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportYumArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportYumArtifactsRequest; + + /** + * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportYumArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportYumArtifactsRequest; + + /** + * Verifies an ImportYumArtifactsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportYumArtifactsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportYumArtifactsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsRequest; + + /** + * Creates a plain object from an ImportYumArtifactsRequest message. Also converts values to other types if specified. + * @param message ImportYumArtifactsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ImportYumArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportYumArtifactsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportYumArtifactsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportYumArtifactsErrorInfo. */ + interface IImportYumArtifactsErrorInfo { + + /** ImportYumArtifactsErrorInfo gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null); + + /** ImportYumArtifactsErrorInfo error */ + error?: (google.rpc.IStatus|null); + } + + /** Represents an ImportYumArtifactsErrorInfo. */ + class ImportYumArtifactsErrorInfo implements IImportYumArtifactsErrorInfo { + + /** + * Constructs a new ImportYumArtifactsErrorInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo); + + /** ImportYumArtifactsErrorInfo gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null); + + /** ImportYumArtifactsErrorInfo error. */ + public error?: (google.rpc.IStatus|null); + + /** ImportYumArtifactsErrorInfo source. */ + public source?: "gcsSource"; + + /** + * Creates a new ImportYumArtifactsErrorInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsErrorInfo instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo): google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo; + + /** + * Encodes the specified ImportYumArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify|verify} messages. + * @param message ImportYumArtifactsErrorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportYumArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify|verify} messages. + * @param message ImportYumArtifactsErrorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportYumArtifactsErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo; + + /** + * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportYumArtifactsErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo; + + /** + * Verifies an ImportYumArtifactsErrorInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportYumArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportYumArtifactsErrorInfo + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo; + + /** + * Creates a plain object from an ImportYumArtifactsErrorInfo message. Also converts values to other types if specified. + * @param message ImportYumArtifactsErrorInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportYumArtifactsErrorInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportYumArtifactsErrorInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportYumArtifactsResponse. */ + interface IImportYumArtifactsResponse { + + /** ImportYumArtifactsResponse yumArtifacts */ + yumArtifacts?: (google.devtools.artifactregistry.v1.IYumArtifact[]|null); + + /** ImportYumArtifactsResponse errors */ + errors?: (google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo[]|null); + } + + /** Represents an ImportYumArtifactsResponse. */ + class ImportYumArtifactsResponse implements IImportYumArtifactsResponse { + + /** + * Constructs a new ImportYumArtifactsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsResponse); + + /** ImportYumArtifactsResponse yumArtifacts. */ + public yumArtifacts: google.devtools.artifactregistry.v1.IYumArtifact[]; + + /** ImportYumArtifactsResponse errors. */ + public errors: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo[]; + + /** + * Creates a new ImportYumArtifactsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsResponse): google.devtools.artifactregistry.v1.ImportYumArtifactsResponse; + + /** + * Encodes the specified ImportYumArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.verify|verify} messages. + * @param message ImportYumArtifactsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportYumArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.verify|verify} messages. + * @param message ImportYumArtifactsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 ImportYumArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportYumArtifactsResponse; + + /** + * Decodes an ImportYumArtifactsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportYumArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportYumArtifactsResponse; + + /** + * 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 an ImportYumArtifactsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportYumArtifactsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsResponse; + + /** + * Creates a plain object from an ImportYumArtifactsResponse message. Also converts values to other types if specified. + * @param message ImportYumArtifactsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ImportYumArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportYumArtifactsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportYumArtifactsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportYumArtifactsMetadata. */ + interface IImportYumArtifactsMetadata { + } + + /** Represents an ImportYumArtifactsMetadata. */ + class ImportYumArtifactsMetadata implements IImportYumArtifactsMetadata { + + /** + * Constructs a new ImportYumArtifactsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata); + + /** + * Creates a new ImportYumArtifactsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsMetadata instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata): google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata; + + /** + * Encodes the specified ImportYumArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata.verify|verify} messages. + * @param message ImportYumArtifactsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportYumArtifactsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata.verify|verify} messages. + * @param message ImportYumArtifactsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportYumArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata; + + /** + * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportYumArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata; + + /** + * 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 an ImportYumArtifactsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportYumArtifactsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata; + + /** + * 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.v1.ImportYumArtifactsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportYumArtifactsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportYumArtifactsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace v1beta2. */ + namespace v1beta2 { + + /** Properties of an AptArtifact. */ + interface IAptArtifact { + + /** AptArtifact name */ + name?: (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|Buffer|string|null); + } + + /** Represents an AptArtifact. */ + class AptArtifact implements IAptArtifact { + + /** + * Constructs a new AptArtifact. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IAptArtifact); + + /** AptArtifact name. */ + public name: 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|Buffer|string); + + /** + * Creates a new AptArtifact instance using the specified properties. + * @param [properties] Properties to set + * @returns AptArtifact instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IAptArtifact): google.devtools.artifactregistry.v1beta2.AptArtifact; + + /** + * 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.IAptArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IAptArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.AptArtifact; + + /** + * Decodes an AptArtifact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.AptArtifact; + + /** + * 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 an AptArtifact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AptArtifact + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.AptArtifact; + + /** + * 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.AptArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AptArtifact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AptArtifact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AptArtifact { + + /** PackageType enum. */ + enum PackageType { + PACKAGE_TYPE_UNSPECIFIED = 0, + BINARY = 1, + SOURCE = 2 + } + } + + /** Properties of an ImportAptArtifactsGcsSource. */ + interface IImportAptArtifactsGcsSource { + + /** ImportAptArtifactsGcsSource uris */ + uris?: (string[]|null); + + /** ImportAptArtifactsGcsSource useWildcards */ + useWildcards?: (boolean|null); + } + + /** Represents an ImportAptArtifactsGcsSource. */ + class ImportAptArtifactsGcsSource implements IImportAptArtifactsGcsSource { + + /** + * Constructs a new ImportAptArtifactsGcsSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource); + + /** ImportAptArtifactsGcsSource uris. */ + public uris: string[]; + + /** ImportAptArtifactsGcsSource useWildcards. */ + public useWildcards: boolean; + + /** + * Creates a new ImportAptArtifactsGcsSource instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportAptArtifactsGcsSource instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource; + + /** + * 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.IImportAptArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IImportAptArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ImportAptArtifactsGcsSource; + + /** + * Decodes an ImportAptArtifactsGcsSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ImportAptArtifactsGcsSource; + + /** + * 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 an ImportAptArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportAptArtifactsGcsSource + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource; + + /** + * 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.ImportAptArtifactsGcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportAptArtifactsGcsSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportAptArtifactsGcsSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportAptArtifactsRequest. */ + interface IImportAptArtifactsRequest { + + /** ImportAptArtifactsRequest gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null); + + /** ImportAptArtifactsRequest parent */ + parent?: (string|null); + } + + /** Represents an ImportAptArtifactsRequest. */ + class ImportAptArtifactsRequest implements IImportAptArtifactsRequest { + + /** + * Constructs a new ImportAptArtifactsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest); + + /** ImportAptArtifactsRequest gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null); + + /** ImportAptArtifactsRequest parent. */ + public parent: string; + + /** ImportAptArtifactsRequest source. */ + public source?: "gcsSource"; + + /** + * Creates a new ImportAptArtifactsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportAptArtifactsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest; + + /** + * 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.IImportAptArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IImportAptArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ImportAptArtifactsRequest; + + /** + * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ImportAptArtifactsRequest; + + /** + * 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 an ImportAptArtifactsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportAptArtifactsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest; + + /** + * 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.ImportAptArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportAptArtifactsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportAptArtifactsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportAptArtifactsErrorInfo. */ + interface IImportAptArtifactsErrorInfo { + + /** ImportAptArtifactsErrorInfo gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null); + + /** ImportAptArtifactsErrorInfo error */ + error?: (google.rpc.IStatus|null); + } + + /** Represents an ImportAptArtifactsErrorInfo. */ + class ImportAptArtifactsErrorInfo implements IImportAptArtifactsErrorInfo { + + /** + * Constructs a new ImportAptArtifactsErrorInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo); + + /** ImportAptArtifactsErrorInfo gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null); + + /** ImportAptArtifactsErrorInfo error. */ + public error?: (google.rpc.IStatus|null); + + /** ImportAptArtifactsErrorInfo source. */ + public source?: "gcsSource"; + + /** + * Creates a new ImportAptArtifactsErrorInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportAptArtifactsErrorInfo instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo; + + /** + * 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.IImportAptArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IImportAptArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ImportAptArtifactsErrorInfo; + + /** + * Decodes an ImportAptArtifactsErrorInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ImportAptArtifactsErrorInfo; + + /** + * 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 an ImportAptArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportAptArtifactsErrorInfo + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo; + + /** + * 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.ImportAptArtifactsErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportAptArtifactsErrorInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportAptArtifactsErrorInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportAptArtifactsResponse. */ + interface IImportAptArtifactsResponse { + + /** ImportAptArtifactsResponse aptArtifacts */ + aptArtifacts?: (google.devtools.artifactregistry.v1beta2.IAptArtifact[]|null); + + /** ImportAptArtifactsResponse errors */ + errors?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo[]|null); + } + + /** Represents an ImportAptArtifactsResponse. */ + class ImportAptArtifactsResponse implements IImportAptArtifactsResponse { + + /** + * Constructs a new ImportAptArtifactsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse); + + /** ImportAptArtifactsResponse aptArtifacts. */ + public aptArtifacts: google.devtools.artifactregistry.v1beta2.IAptArtifact[]; + + /** ImportAptArtifactsResponse errors. */ + public errors: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo[]; + + /** + * Creates a new ImportAptArtifactsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportAptArtifactsResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse; + + /** + * 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.IImportAptArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IImportAptArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ImportAptArtifactsResponse; + + /** + * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ImportAptArtifactsResponse; + + /** + * 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 an ImportAptArtifactsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportAptArtifactsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse; + + /** + * 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.ImportAptArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportAptArtifactsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportAptArtifactsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportAptArtifactsMetadata. */ + interface IImportAptArtifactsMetadata { + } + + /** Represents an ImportAptArtifactsMetadata. */ + class ImportAptArtifactsMetadata implements IImportAptArtifactsMetadata { + + /** + * Constructs a new ImportAptArtifactsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata); + + /** + * Creates a new ImportAptArtifactsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportAptArtifactsMetadata instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata; + + /** + * 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.IImportAptArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IImportAptArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ImportAptArtifactsMetadata; + + /** + * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ImportAptArtifactsMetadata; + + /** + * 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 an ImportAptArtifactsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportAptArtifactsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata; + + /** + * 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.ImportAptArtifactsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportAptArtifactsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportAptArtifactsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Hash. */ + interface IHash { + + /** Hash type */ + type?: (google.devtools.artifactregistry.v1beta2.Hash.HashType|keyof typeof google.devtools.artifactregistry.v1beta2.Hash.HashType|null); + + /** Hash value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents a Hash. */ + class Hash implements IHash { + + /** + * Constructs a new Hash. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IHash); + + /** Hash type. */ + public type: (google.devtools.artifactregistry.v1beta2.Hash.HashType|keyof typeof google.devtools.artifactregistry.v1beta2.Hash.HashType); + + /** Hash value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Hash instance using the specified properties. + * @param [properties] Properties to set + * @returns Hash instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IHash): google.devtools.artifactregistry.v1beta2.Hash; + + /** + * 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.IHash, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IHash, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Hash message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Hash; + + /** + * Decodes a Hash message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Hash; + + /** + * Verifies a Hash message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Hash message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Hash + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Hash; + + /** + * Creates a plain object from a Hash message. Also converts values to other types if specified. + * @param message Hash + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.Hash, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Hash to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Hash + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Hash { + + /** HashType enum. */ + enum HashType { + HASH_TYPE_UNSPECIFIED = 0, + SHA256 = 1, + MD5 = 2 + } + } + + /** Properties of a File. */ + interface IFile { + + /** File name */ + name?: (string|null); + + /** File sizeBytes */ + sizeBytes?: (number|Long|string|null); + + /** File hashes */ + hashes?: (google.devtools.artifactregistry.v1beta2.IHash[]|null); + + /** File createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** File updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** File owner */ + owner?: (string|null); + } + + /** Represents a File. */ + class File implements IFile { + + /** + * Constructs a new File. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.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); + + /** File updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** File owner. */ + public owner: string; + + /** + * Creates a new File instance using the specified properties. + * @param [properties] Properties to set + * @returns File instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IFile): google.devtools.artifactregistry.v1beta2.File; + + /** + * 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.IFile, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a File message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.File; + + /** + * Decodes a File message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.File; + + /** + * Verifies a File message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a File message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns File + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.File; + + /** + * Creates a plain object from a File message. Also converts values to other types if specified. + * @param message File + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this File to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for File + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFilesRequest. */ + interface IListFilesRequest { + + /** ListFilesRequest parent */ + parent?: (string|null); + + /** ListFilesRequest filter */ + filter?: (string|null); + + /** ListFilesRequest pageSize */ + pageSize?: (number|null); + + /** ListFilesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListFilesRequest. */ + class ListFilesRequest implements IListFilesRequest { + + /** + * Constructs a new ListFilesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListFilesRequest); + + /** ListFilesRequest parent. */ + public parent: string; + + /** ListFilesRequest filter. */ + public filter: string; + + /** 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.IListFilesRequest, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFilesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListFilesRequest; + + /** + * Decodes a ListFilesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListFilesRequest; + + /** + * Verifies a ListFilesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFilesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFilesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListFilesRequest; + + /** + * Creates a plain object from a ListFilesRequest message. Also converts values to other types if specified. + * @param message ListFilesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListFilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFilesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFilesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFilesResponse. */ + interface IListFilesResponse { + + /** ListFilesResponse files */ + files?: (google.devtools.artifactregistry.v1beta2.IFile[]|null); + + /** ListFilesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListFilesResponse. */ + class ListFilesResponse implements IListFilesResponse { + + /** + * Constructs a new ListFilesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListFilesResponse); + + /** ListFilesResponse files. */ + public files: google.devtools.artifactregistry.v1beta2.IFile[]; + + /** ListFilesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListFilesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFilesResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IListFilesResponse): google.devtools.artifactregistry.v1beta2.ListFilesResponse; + + /** + * 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.IListFilesResponse, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFilesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListFilesResponse; + + /** + * Decodes a ListFilesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListFilesResponse; + + /** + * Verifies a ListFilesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFilesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFilesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListFilesResponse; + + /** + * Creates a plain object from a ListFilesResponse message. Also converts values to other types if specified. + * @param message ListFilesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListFilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFilesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFilesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetFileRequest. */ + interface IGetFileRequest { + + /** GetFileRequest name */ + name?: (string|null); + } + + /** Represents a GetFileRequest. */ + class GetFileRequest implements IGetFileRequest { + + /** + * Constructs a new GetFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetFileRequest); + + /** GetFileRequest name. */ + public name: string; + + /** + * Creates a new GetFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFileRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetFileRequest): google.devtools.artifactregistry.v1beta2.GetFileRequest; + + /** + * 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.IGetFileRequest, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IGetFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.GetFileRequest; + + /** + * Decodes a GetFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.GetFileRequest; + + /** + * Verifies a GetFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetFileRequest; + + /** + * Creates a plain object from a GetFileRequest message. Also converts values to other types if specified. + * @param message GetFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.GetFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Package. */ + interface IPackage { + + /** Package name */ + name?: (string|null); + + /** Package displayName */ + displayName?: (string|null); + + /** Package createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Package updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Package. */ + class Package implements IPackage { + + /** + * Constructs a new Package. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.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); + + /** + * Creates a new Package instance using the specified properties. + * @param [properties] Properties to set + * @returns Package instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IPackage): google.devtools.artifactregistry.v1beta2.Package; + + /** + * 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.IPackage, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Package message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Package + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Package; + + /** + * Decodes a Package message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Package + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Package; + + /** + * Verifies a Package message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Package message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Package + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Package; + + /** + * Creates a plain object from a Package message. Also converts values to other types if specified. + * @param message Package + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.Package, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Package to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Package + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPackagesRequest. */ + interface IListPackagesRequest { + + /** ListPackagesRequest parent */ + parent?: (string|null); + + /** ListPackagesRequest pageSize */ + pageSize?: (number|null); + + /** ListPackagesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListPackagesRequest. */ + class ListPackagesRequest implements IListPackagesRequest { + + /** + * Constructs a new ListPackagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesRequest); + + /** ListPackagesRequest parent. */ + public parent: string; + + /** ListPackagesRequest pageSize. */ + public pageSize: number; + + /** ListPackagesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListPackagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPackagesRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesRequest): google.devtools.artifactregistry.v1beta2.ListPackagesRequest; + + /** + * 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.IListPackagesRequest, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPackagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListPackagesRequest; + + /** + * Decodes a ListPackagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListPackagesRequest; + + /** + * Verifies a ListPackagesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPackagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListPackagesRequest; + + /** + * Creates a plain object from a ListPackagesRequest message. Also converts values to other types if specified. + * @param message ListPackagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPackagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPackagesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPackagesResponse. */ + interface IListPackagesResponse { + + /** ListPackagesResponse packages */ + packages?: (google.devtools.artifactregistry.v1beta2.IPackage[]|null); + + /** ListPackagesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPackagesResponse. */ + class ListPackagesResponse implements IListPackagesResponse { + + /** + * Constructs a new ListPackagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesResponse); + + /** ListPackagesResponse packages. */ + public packages: google.devtools.artifactregistry.v1beta2.IPackage[]; + + /** ListPackagesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPackagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPackagesResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesResponse): google.devtools.artifactregistry.v1beta2.ListPackagesResponse; + + /** + * 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.IListPackagesResponse, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPackagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListPackagesResponse; + + /** + * Decodes a ListPackagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListPackagesResponse; + + /** + * Verifies a ListPackagesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPackagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListPackagesResponse; + + /** + * Creates a plain object from a ListPackagesResponse message. Also converts values to other types if specified. + * @param message ListPackagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPackagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPackagesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPackageRequest. */ + interface IGetPackageRequest { + + /** GetPackageRequest name */ + name?: (string|null); + } + + /** Represents a GetPackageRequest. */ + class GetPackageRequest implements IGetPackageRequest { + + /** + * Constructs a new GetPackageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetPackageRequest); + + /** GetPackageRequest name. */ + public name: string; + + /** + * Creates a new GetPackageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPackageRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetPackageRequest): google.devtools.artifactregistry.v1beta2.GetPackageRequest; + + /** + * 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.IGetPackageRequest, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IGetPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPackageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.GetPackageRequest; + + /** + * Decodes a GetPackageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.GetPackageRequest; + + /** + * Verifies a GetPackageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPackageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPackageRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetPackageRequest; + + /** + * Creates a plain object from a GetPackageRequest message. Also converts values to other types if specified. + * @param message GetPackageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.GetPackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPackageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPackageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeletePackageRequest. */ + interface IDeletePackageRequest { + + /** DeletePackageRequest name */ + name?: (string|null); + } + + /** Represents a DeletePackageRequest. */ + class DeletePackageRequest implements IDeletePackageRequest { + + /** + * Constructs a new DeletePackageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IDeletePackageRequest); + + /** DeletePackageRequest name. */ + public name: string; + + /** + * Creates a new DeletePackageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePackageRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IDeletePackageRequest): google.devtools.artifactregistry.v1beta2.DeletePackageRequest; + + /** + * 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.IDeletePackageRequest, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePackageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.DeletePackageRequest; + + /** + * Decodes a DeletePackageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.DeletePackageRequest; + + /** + * Verifies a DeletePackageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePackageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePackageRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.DeletePackageRequest; + + /** + * Creates a plain object from a DeletePackageRequest message. Also converts values to other types if specified. + * @param message DeletePackageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.DeletePackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePackageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePackageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Repository. */ + interface IRepository { + + /** 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 Repository. */ + class Repository implements IRepository { + + /** + * Constructs a new Repository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IRepository); + + /** 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 Repository instance using the specified properties. + * @param [properties] Properties to set + * @returns Repository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IRepository): google.devtools.artifactregistry.v1beta2.Repository; + + /** + * 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.IRepository, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Repository; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Repository; + + /** + * Verifies a Repository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Repository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Repository; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @param message Repository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.Repository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Repository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Repository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Repository { + + /** Properties of a MavenRepositoryConfig. */ + interface IMavenRepositoryConfig { + + /** MavenRepositoryConfig allowSnapshotOverwrites */ + allowSnapshotOverwrites?: (boolean|null); + + /** MavenRepositoryConfig versionPolicy */ + versionPolicy?: (google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy|keyof typeof google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy|null); + } + + /** Represents a MavenRepositoryConfig. */ + class MavenRepositoryConfig implements IMavenRepositoryConfig { + + /** + * Constructs a new MavenRepositoryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.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 }; + + /** + * Gets the default type url for MavenRepositoryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MavenRepositoryConfig { + + /** VersionPolicy enum. */ + enum VersionPolicy { + VERSION_POLICY_UNSPECIFIED = 0, + RELEASE = 1, + SNAPSHOT = 2 + } + } + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + DOCKER = 1, + MAVEN = 2, + NPM = 3, + APT = 5, + YUM = 6, + PYTHON = 8 + } + } + + /** Properties of a ListRepositoriesRequest. */ + interface IListRepositoriesRequest { + + /** ListRepositoriesRequest parent */ + parent?: (string|null); + + /** ListRepositoriesRequest pageSize */ + pageSize?: (number|null); + + /** ListRepositoriesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListRepositoriesRequest. */ + class ListRepositoriesRequest implements IListRepositoriesRequest { + + /** + * Constructs a new ListRepositoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.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 }; + + /** + * Gets the default type url for ListRepositoriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 }; + + /** + * Gets the default type url for ListRepositoriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 }; + + /** + * Gets the default type url for GetRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 }; + + /** + * Gets the default type url for CreateRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 }; + + /** + * Gets the default type url for UpdateRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 }; + + /** + * Gets the default type url for DeleteRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 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; + + /** + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 { + + /** + * Constructs a new ProjectSettings. + * @param [properties] Properties to set + */ + 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); + + /** + * Creates a new ProjectSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ProjectSettings instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IProjectSettings): google.devtools.artifactregistry.v1beta2.ProjectSettings; + + /** + * 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 static encode(message: google.devtools.artifactregistry.v1beta2.IProjectSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IProjectSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProjectSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProjectSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.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 }; + + /** + * Gets the default type url for ProjectSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + 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 }; + + /** + * Gets the default type url for GetProjectSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 }; + + /** + * Gets the default type url for UpdateProjectSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 static create(properties?: google.devtools.artifactregistry.v1beta2.ITag): google.devtools.artifactregistry.v1beta2.Tag; + + /** + * 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 static encode(message: google.devtools.artifactregistry.v1beta2.ITag, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.ITag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tag message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Tag; + + /** + * Decodes a Tag message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Tag; + + /** + * Verifies a Tag message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Tag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tag + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Tag; + + /** + * Creates a plain object from a Tag message. Also converts values to other types if specified. + * @param message Tag + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.Tag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Tag to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Tag + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTagsRequest. */ + interface IListTagsRequest { + + /** ListTagsRequest parent */ + parent?: (string|null); + + /** ListTagsRequest filter */ + filter?: (string|null); + + /** ListTagsRequest pageSize */ + pageSize?: (number|null); + + /** ListTagsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListTagsRequest. */ + class ListTagsRequest implements IListTagsRequest { + + /** + * Constructs a new ListTagsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListTagsRequest); + + /** ListTagsRequest parent. */ + public parent: string; + + /** ListTagsRequest filter. */ + public filter: string; + + /** ListTagsRequest pageSize. */ + public pageSize: number; + + /** ListTagsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListTagsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTagsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IListTagsRequest): google.devtools.artifactregistry.v1beta2.ListTagsRequest; + + /** + * 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 static encode(message: google.devtools.artifactregistry.v1beta2.IListTagsRequest, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTagsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListTagsRequest; + + /** + * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListTagsRequest; + + /** + * Verifies a ListTagsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTagsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListTagsRequest; + + /** + * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. + * @param message ListTagsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTagsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTagsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 { + + /** + * Constructs a new ListTagsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListTagsResponse); + + /** ListTagsResponse tags. */ + public tags: google.devtools.artifactregistry.v1beta2.ITag[]; + + /** ListTagsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListTagsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTagsResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IListTagsResponse): google.devtools.artifactregistry.v1beta2.ListTagsResponse; + + /** + * 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 static encode(message: google.devtools.artifactregistry.v1beta2.IListTagsResponse, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTagsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListTagsResponse; + + /** + * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListTagsResponse; + + /** + * Verifies a ListTagsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTagsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListTagsResponse; + + /** + * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. + * @param message ListTagsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTagsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTagsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetTagRequest. */ + interface IGetTagRequest { + + /** GetTagRequest name */ + name?: (string|null); + } + + /** Represents a GetTagRequest. */ + class GetTagRequest implements IGetTagRequest { + + /** + * Constructs a new GetTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetTagRequest); + + /** GetTagRequest name. */ + public name: string; + + /** + * Creates a new GetTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTagRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetTagRequest): google.devtools.artifactregistry.v1beta2.GetTagRequest; + + /** + * 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 + */ + public static encode(message: google.devtools.artifactregistry.v1beta2.IGetTagRequest, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IGetTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.GetTagRequest; + + /** + * Decodes a GetTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.GetTagRequest; + + /** + * Verifies a GetTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetTagRequest; + + /** + * Creates a plain object from a GetTagRequest message. Also converts values to other types if specified. + * @param message GetTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.GetTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetTagRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 { + + /** + * Constructs a new CreateTagRequest. + * @param [properties] Properties to set + */ + 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); + + /** + * Creates a new CreateTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTagRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.ICreateTagRequest): google.devtools.artifactregistry.v1beta2.CreateTagRequest; + + /** + * 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 + */ + public static encode(message: google.devtools.artifactregistry.v1beta2.ICreateTagRequest, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.CreateTagRequest; + + /** + * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.CreateTagRequest; + + /** + * Verifies a CreateTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.CreateTagRequest; + + /** + * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. + * @param message CreateTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.CreateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTagRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateTagRequest. */ + interface IUpdateTagRequest { + + /** UpdateTagRequest tag */ + tag?: (google.devtools.artifactregistry.v1beta2.ITag|null); + + /** UpdateTagRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateTagRequest. */ + class UpdateTagRequest implements IUpdateTagRequest { + + /** + * Constructs a new UpdateTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IUpdateTagRequest); + + /** UpdateTagRequest tag. */ + public tag?: (google.devtools.artifactregistry.v1beta2.ITag|null); + + /** UpdateTagRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTagRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IUpdateTagRequest): google.devtools.artifactregistry.v1beta2.UpdateTagRequest; + + /** + * 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.IUpdateTagRequest, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.UpdateTagRequest; + + /** + * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.UpdateTagRequest; + + /** + * Verifies an UpdateTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.UpdateTagRequest; + + /** + * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. + * @param message UpdateTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.UpdateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateTagRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteTagRequest. */ + interface IDeleteTagRequest { + + /** DeleteTagRequest name */ + name?: (string|null); + } + + /** Represents a DeleteTagRequest. */ + class DeleteTagRequest implements IDeleteTagRequest { + + /** + * Constructs a new DeleteTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IDeleteTagRequest); + + /** DeleteTagRequest name. */ + public name: string; + + /** + * Creates a new DeleteTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTagRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IDeleteTagRequest): google.devtools.artifactregistry.v1beta2.DeleteTagRequest; + + /** + * 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.IDeleteTagRequest, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.DeleteTagRequest; + + /** + * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.DeleteTagRequest; + + /** + * Verifies a DeleteTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.DeleteTagRequest; + + /** + * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. + * @param message DeleteTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.DeleteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteTagRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VersionView enum. */ + enum VersionView { + VERSION_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 2 + } + + /** Properties of a Version. */ + interface IVersion { + + /** Version name */ + name?: (string|null); + + /** Version description */ + description?: (string|null); + + /** Version createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Version updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Version relatedTags */ + relatedTags?: (google.devtools.artifactregistry.v1beta2.ITag[]|null); + + /** Version metadata */ + metadata?: (google.protobuf.IStruct|null); + } + + /** Represents a Version. */ + class Version implements IVersion { + + /** + * Constructs a new Version. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IVersion); + + /** Version name. */ + public name: string; + + /** Version description. */ + public description: string; + + /** Version createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Version updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Version relatedTags. */ + public relatedTags: google.devtools.artifactregistry.v1beta2.ITag[]; + + /** Version metadata. */ + public metadata?: (google.protobuf.IStruct|null); + + /** + * Creates a new Version instance using the specified properties. + * @param [properties] Properties to set + * @returns Version instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IVersion): google.devtools.artifactregistry.v1beta2.Version; + + /** + * 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.IVersion, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Version message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Version + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Version; + + /** + * Decodes a Version message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Version + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Version; + + /** + * Verifies a Version message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Version message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Version + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Version; + + /** + * Creates a plain object from a Version message. Also converts values to other types if specified. + * @param message Version + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Version to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Version + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListVersionsRequest. */ + interface IListVersionsRequest { + + /** ListVersionsRequest parent */ + parent?: (string|null); + + /** ListVersionsRequest pageSize */ + pageSize?: (number|null); + + /** ListVersionsRequest pageToken */ + pageToken?: (string|null); + + /** ListVersionsRequest view */ + view?: (google.devtools.artifactregistry.v1beta2.VersionView|keyof typeof google.devtools.artifactregistry.v1beta2.VersionView|null); + + /** ListVersionsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListVersionsRequest. */ + class ListVersionsRequest implements IListVersionsRequest { + + /** + * Constructs a new ListVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsRequest); + + /** ListVersionsRequest parent. */ + public parent: 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 ListVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVersionsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsRequest): google.devtools.artifactregistry.v1beta2.ListVersionsRequest; + + /** + * 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.IListVersionsRequest, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListVersionsRequest; + + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListVersionsRequest; + + /** + * Verifies a ListVersionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListVersionsRequest; + + /** + * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. + * @param message ListVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVersionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListVersionsResponse. */ + interface IListVersionsResponse { + + /** ListVersionsResponse versions */ + versions?: (google.devtools.artifactregistry.v1beta2.IVersion[]|null); + + /** ListVersionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListVersionsResponse. */ + class ListVersionsResponse implements IListVersionsResponse { + + /** + * Constructs a new ListVersionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsResponse); + + /** ListVersionsResponse versions. */ + public versions: google.devtools.artifactregistry.v1beta2.IVersion[]; + + /** ListVersionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListVersionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVersionsResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsResponse): google.devtools.artifactregistry.v1beta2.ListVersionsResponse; + + /** + * 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.IListVersionsResponse, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVersionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListVersionsResponse; + + /** + * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListVersionsResponse; + + /** + * Verifies a ListVersionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVersionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListVersionsResponse; + + /** + * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. + * @param message ListVersionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVersionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVersionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetVersionRequest. */ + interface IGetVersionRequest { + + /** GetVersionRequest name */ + name?: (string|null); + + /** GetVersionRequest view */ + view?: (google.devtools.artifactregistry.v1beta2.VersionView|keyof typeof google.devtools.artifactregistry.v1beta2.VersionView|null); + } + + /** Represents a GetVersionRequest. */ + class GetVersionRequest implements IGetVersionRequest { + + /** + * Constructs a new GetVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetVersionRequest); + + /** GetVersionRequest name. */ + public name: string; + + /** GetVersionRequest view. */ + public view: (google.devtools.artifactregistry.v1beta2.VersionView|keyof typeof google.devtools.artifactregistry.v1beta2.VersionView); + + /** + * Creates a new GetVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVersionRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetVersionRequest): google.devtools.artifactregistry.v1beta2.GetVersionRequest; + + /** + * 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.IGetVersionRequest, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.GetVersionRequest; + + /** + * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.GetVersionRequest; + + /** + * Verifies a GetVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetVersionRequest; + + /** + * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. + * @param message GetVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.GetVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteVersionRequest. */ + interface IDeleteVersionRequest { + + /** DeleteVersionRequest name */ + name?: (string|null); + + /** DeleteVersionRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteVersionRequest. */ + class DeleteVersionRequest implements IDeleteVersionRequest { + + /** + * Constructs a new DeleteVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest); + + /** DeleteVersionRequest name. */ + public name: string; + + /** DeleteVersionRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteVersionRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest): google.devtools.artifactregistry.v1beta2.DeleteVersionRequest; + + /** + * 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.IDeleteVersionRequest, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.DeleteVersionRequest; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.DeleteVersionRequest; + + /** + * Verifies a DeleteVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.DeleteVersionRequest; + + /** + * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. + * @param message DeleteVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.DeleteVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a YumArtifact. */ + interface IYumArtifact { + + /** 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 YumArtifact. */ + class YumArtifact implements IYumArtifact { + + /** + * Constructs a new YumArtifact. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IYumArtifact); + + /** 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 YumArtifact instance using the specified properties. + * @param [properties] Properties to set + * @returns YumArtifact instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IYumArtifact): google.devtools.artifactregistry.v1beta2.YumArtifact; + + /** + * 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.IYumArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IYumArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a YumArtifact message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YumArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.YumArtifact; + + /** + * Decodes a YumArtifact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YumArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.YumArtifact; + + /** + * Verifies a YumArtifact message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a YumArtifact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YumArtifact + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.YumArtifact; + + /** + * Creates a plain object from a YumArtifact message. Also converts values to other types if specified. + * @param message YumArtifact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.YumArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this YumArtifact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for YumArtifact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace YumArtifact { + + /** PackageType enum. */ + enum PackageType { + PACKAGE_TYPE_UNSPECIFIED = 0, + BINARY = 1, + SOURCE = 2 + } + } + + /** Properties of an ImportYumArtifactsGcsSource. */ + interface IImportYumArtifactsGcsSource { + + /** ImportYumArtifactsGcsSource uris */ + uris?: (string[]|null); + + /** ImportYumArtifactsGcsSource useWildcards */ + useWildcards?: (boolean|null); + } + + /** Represents an ImportYumArtifactsGcsSource. */ + class ImportYumArtifactsGcsSource implements IImportYumArtifactsGcsSource { + + /** + * Constructs a new ImportYumArtifactsGcsSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource); + + /** ImportYumArtifactsGcsSource uris. */ + public uris: string[]; + + /** ImportYumArtifactsGcsSource useWildcards. */ + public useWildcards: boolean; + + /** + * Creates a new ImportYumArtifactsGcsSource instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsGcsSource instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource; + + /** + * 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.IImportYumArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IImportYumArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportYumArtifactsGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource; + + /** + * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportYumArtifactsGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource; + + /** + * Verifies an ImportYumArtifactsGcsSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportYumArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportYumArtifactsGcsSource + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource; + + /** + * Creates a plain object from an ImportYumArtifactsGcsSource message. Also converts values to other types if specified. + * @param message ImportYumArtifactsGcsSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportYumArtifactsGcsSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportYumArtifactsGcsSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportYumArtifactsRequest. */ + interface IImportYumArtifactsRequest { + + /** ImportYumArtifactsRequest gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource|null); + + /** ImportYumArtifactsRequest parent */ + parent?: (string|null); + } + + /** Represents an ImportYumArtifactsRequest. */ + class ImportYumArtifactsRequest implements IImportYumArtifactsRequest { + + /** + * Constructs a new ImportYumArtifactsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest); + + /** ImportYumArtifactsRequest gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource|null); + + /** ImportYumArtifactsRequest parent. */ + public parent: string; + + /** ImportYumArtifactsRequest source. */ + public source?: "gcsSource"; + + /** + * Creates a new ImportYumArtifactsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest; + + /** + * 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.IImportYumArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IImportYumArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportYumArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest; + + /** + * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportYumArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest; + + /** + * Verifies an ImportYumArtifactsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportYumArtifactsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportYumArtifactsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest; + + /** + * Creates a plain object from an ImportYumArtifactsRequest message. Also converts values to other types if specified. + * @param message ImportYumArtifactsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportYumArtifactsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportYumArtifactsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportYumArtifactsErrorInfo. */ + interface IImportYumArtifactsErrorInfo { + + /** ImportYumArtifactsErrorInfo gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource|null); + + /** ImportYumArtifactsErrorInfo error */ + error?: (google.rpc.IStatus|null); + } + + /** Represents an ImportYumArtifactsErrorInfo. */ + class ImportYumArtifactsErrorInfo implements IImportYumArtifactsErrorInfo { + + /** + * Constructs a new ImportYumArtifactsErrorInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo); + + /** ImportYumArtifactsErrorInfo gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource|null); + + /** ImportYumArtifactsErrorInfo error. */ + public error?: (google.rpc.IStatus|null); + + /** ImportYumArtifactsErrorInfo source. */ + public source?: "gcsSource"; + + /** + * Creates a new ImportYumArtifactsErrorInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsErrorInfo instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo; + + /** + * 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.IImportYumArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IImportYumArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportYumArtifactsErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo; + + /** + * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportYumArtifactsErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo; + + /** + * Verifies an ImportYumArtifactsErrorInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportYumArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportYumArtifactsErrorInfo + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo; + + /** + * 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.ImportYumArtifactsErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportYumArtifactsErrorInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportYumArtifactsErrorInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportYumArtifactsResponse. */ + interface IImportYumArtifactsResponse { + + /** ImportYumArtifactsResponse yumArtifacts */ + yumArtifacts?: (google.devtools.artifactregistry.v1beta2.IYumArtifact[]|null); + + /** ImportYumArtifactsResponse errors */ + errors?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo[]|null); + } + + /** Represents an ImportYumArtifactsResponse. */ + class ImportYumArtifactsResponse implements IImportYumArtifactsResponse { + + /** + * Constructs a new ImportYumArtifactsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse); + + /** ImportYumArtifactsResponse yumArtifacts. */ + public yumArtifacts: google.devtools.artifactregistry.v1beta2.IYumArtifact[]; + + /** ImportYumArtifactsResponse errors. */ + public errors: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo[]; + + /** + * Creates a new ImportYumArtifactsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse; + + /** + * 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.IImportYumArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IImportYumArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ImportYumArtifactsResponse; + + /** + * Decodes an ImportYumArtifactsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ImportYumArtifactsResponse; + + /** + * 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 an ImportYumArtifactsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportYumArtifactsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse; + + /** + * 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.ImportYumArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportYumArtifactsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportYumArtifactsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportYumArtifactsMetadata. */ + interface IImportYumArtifactsMetadata { + } + + /** Represents an ImportYumArtifactsMetadata. */ + class ImportYumArtifactsMetadata implements IImportYumArtifactsMetadata { + + /** + * Constructs a new ImportYumArtifactsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata); + + /** + * Creates a new ImportYumArtifactsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsMetadata instance + */ + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata; + + /** + * 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.IImportYumArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IImportYumArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportYumArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata; + + /** + * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportYumArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata; + + /** + * 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 an ImportYumArtifactsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportYumArtifactsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata; + + /** + * 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.ImportYumArtifactsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportYumArtifactsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportYumArtifactsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @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.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @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.api.Http; + + /** + * Verifies a Http 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 Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Verifies a HttpRule 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @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.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @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.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings 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 CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @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.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @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.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @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.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @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.api.Publishing; + + /** + * Verifies a Publishing 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 Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @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.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @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.api.JavaSettings; + + /** + * Verifies a JavaSettings 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 JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @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.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @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.api.CppSettings; + + /** + * Verifies a CppSettings 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 CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @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.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @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.api.PhpSettings; + + /** + * Verifies a PhpSettings 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 PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @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.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @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.api.PythonSettings; + + /** + * Verifies a PythonSettings 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 PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @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.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @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.api.NodeSettings; + + /** + * Verifies a NodeSettings 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 NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @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.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @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.api.DotnetSettings; + + /** + * Verifies a DotnetSettings 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 DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @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.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @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.api.RubySettings; + + /** + * Verifies a RubySettings 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 RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @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.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @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.api.GoSettings; + + /** + * Verifies a GoSettings 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 GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @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.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @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.api.MethodSettings; + + /** + * Verifies a MethodSettings 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 MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @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.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @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.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning 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 LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @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.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @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.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @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.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @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.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @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.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @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.DescriptorProto; + + /** + * Verifies a DescriptorProto 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @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.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @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.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange 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 ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @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.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @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.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange 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 ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @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.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @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.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @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.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @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.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration 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 Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @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.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @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.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @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.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @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.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto 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 OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @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.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @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.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @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.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @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.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange 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 EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @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.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @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.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto 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 EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @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.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @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.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @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.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @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.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @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.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @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.FileOptions; + + /** + * Verifies a FileOptions 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 FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @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.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @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.MessageOptions; + + /** + * Verifies a MessageOptions 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 MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @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.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @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.FieldOptions; + + /** + * Verifies a FieldOptions 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @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.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @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.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault 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 EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @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.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @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.OneofOptions; + + /** + * Verifies an OneofOptions 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @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.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @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.EnumOptions; + + /** + * Verifies an EnumOptions 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @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.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @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.EnumValueOptions; + + /** + * Verifies an EnumValueOptions 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @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.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @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.ServiceOptions; + + /** + * Verifies a ServiceOptions 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @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.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @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.MethodOptions; + + /** + * Verifies a MethodOptions 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|Buffer|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @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.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @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.UninterpretedOption; + + /** + * Verifies an UninterpretedOption 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 UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @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.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @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.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart 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 NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @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.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @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.FeatureSet; + + /** + * Verifies a FeatureSet 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 FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @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.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @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.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults 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 FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @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.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @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.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault 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 FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @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.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @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.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @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.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @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.SourceCodeInfo.Location; + + /** + * Verifies a Location 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 Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** 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 }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + 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); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|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; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * 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 }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an 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; + + /** + * 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; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates 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; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); + + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + + /** + * 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.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Struct; + + /** + * Verifies a Struct message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue. */ + public numberValue?: (number|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value boolValue. */ + public boolValue?: (boolean|null); + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + + /** + * 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.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Value; + + /** + * 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 Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + + /** + * 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.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } + + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { + + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; + + /** + * Creates a new ListValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ListValue instance + */ + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + + /** + * 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.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ListValue; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ListValue; + + /** + * Verifies a ListValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + + /** + * 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.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * 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.IEmpty, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Empty; + + /** + * 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 an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * 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.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of an Expr. */ + interface IExpr { + + /** Expr expression */ + expression?: (string|null); + + /** Expr title */ + title?: (string|null); + + /** Expr description */ + description?: (string|null); + + /** Expr location */ + location?: (string|null); + } + + /** Represents an Expr. */ + class Expr implements IExpr { + + /** + * Constructs a new Expr. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IExpr); + + /** Expr expression. */ + public expression: string; + + /** Expr title. */ + public title: string; + + /** Expr description. */ + public description: string; + + /** Expr location. */ + public location: string; + + /** + * Creates a new Expr instance using the specified properties. + * @param [properties] Properties to set + * @returns Expr instance + */ + public static create(properties?: google.type.IExpr): google.type.Expr; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Expr + * @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.type.Expr; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Expr + * @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.type.Expr; + + /** + * Verifies an Expr 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 Expr message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Expr + */ + public static fromObject(object: { [k: string]: any }): google.type.Expr; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @param message Expr + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Expr to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Expr + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace iam. */ + namespace iam { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a IAMPolicy */ + class IAMPolicy extends $protobuf.rpc.Service { + + /** + * Constructs a new IAMPolicy service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new IAMPolicy service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): IAMPolicy; + + /** + * 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.iam.v1.IAMPolicy.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.iam.v1.IAMPolicy.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.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + } + + namespace IAMPolicy { + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|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.iam.v1.IAMPolicy|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.iam.v1.IAMPolicy|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + } + + /** Properties of a SetIamPolicyRequest. */ + interface ISetIamPolicyRequest { + + /** SetIamPolicyRequest resource */ + resource?: (string|null); + + /** SetIamPolicyRequest policy */ + policy?: (google.iam.v1.IPolicy|null); + + /** SetIamPolicyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a SetIamPolicyRequest. */ + class SetIamPolicyRequest implements ISetIamPolicyRequest { + + /** + * Constructs a new SetIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ISetIamPolicyRequest); + + /** SetIamPolicyRequest resource. */ + public resource: string; + + /** SetIamPolicyRequest policy. */ + public policy?: (google.iam.v1.IPolicy|null); + + /** SetIamPolicyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new SetIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetIamPolicyRequest instance + */ + public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; + + /** + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest; + + /** + * Verifies a SetIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; + + /** + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @param message SetIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetIamPolicyRequest. */ + interface IGetIamPolicyRequest { + + /** GetIamPolicyRequest resource */ + resource?: (string|null); + + /** GetIamPolicyRequest options */ + options?: (google.iam.v1.IGetPolicyOptions|null); + } + + /** Represents a GetIamPolicyRequest. */ + class GetIamPolicyRequest implements IGetIamPolicyRequest { + + /** + * Constructs a new GetIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetIamPolicyRequest); + + /** GetIamPolicyRequest resource. */ + public resource: string; + + /** GetIamPolicyRequest options. */ + public options?: (google.iam.v1.IGetPolicyOptions|null); + + /** + * Creates a new GetIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetIamPolicyRequest instance + */ + public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; + + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest; + + /** + * Verifies a GetIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; + + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @param message GetIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TestIamPermissionsRequest. */ + interface ITestIamPermissionsRequest { + + /** TestIamPermissionsRequest resource */ + resource?: (string|null); + + /** TestIamPermissionsRequest permissions */ + permissions?: (string[]|null); + } + + /** Represents a TestIamPermissionsRequest. */ + class TestIamPermissionsRequest implements ITestIamPermissionsRequest { + + /** + * Constructs a new TestIamPermissionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); + + /** TestIamPermissionsRequest resource. */ + public resource: string; + + /** TestIamPermissionsRequest permissions. */ + public permissions: string[]; + + /** + * Creates a new TestIamPermissionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsRequest instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; + + /** + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest; + + /** + * Verifies a TestIamPermissionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; + + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @param message TestIamPermissionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TestIamPermissionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TestIamPermissionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TestIamPermissionsResponse. */ + interface ITestIamPermissionsResponse { + + /** TestIamPermissionsResponse permissions */ + permissions?: (string[]|null); + } + + /** Represents a TestIamPermissionsResponse. */ + class TestIamPermissionsResponse implements ITestIamPermissionsResponse { + + /** + * Constructs a new TestIamPermissionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); + + /** TestIamPermissionsResponse permissions. */ + public permissions: string[]; + + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsResponse instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; + + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse; + + /** + * Verifies a TestIamPermissionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; + + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @param message TestIamPermissionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TestIamPermissionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TestIamPermissionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPolicyOptions. */ + interface IGetPolicyOptions { + + /** GetPolicyOptions requestedPolicyVersion */ + requestedPolicyVersion?: (number|null); + } + + /** Represents a GetPolicyOptions. */ + class GetPolicyOptions implements IGetPolicyOptions { + + /** + * Constructs a new GetPolicyOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetPolicyOptions); + + /** GetPolicyOptions requestedPolicyVersion. */ + public requestedPolicyVersion: number; + + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPolicyOptions instance + */ + public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; + + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions; + + /** + * Verifies a GetPolicyOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPolicyOptions + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; + + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @param message GetPolicyOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPolicyOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPolicyOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Policy. */ + interface IPolicy { + + /** Policy version */ + version?: (number|null); + + /** Policy bindings */ + bindings?: (google.iam.v1.IBinding[]|null); + + /** Policy auditConfigs */ + auditConfigs?: (google.iam.v1.IAuditConfig[]|null); + + /** Policy etag */ + etag?: (Uint8Array|Buffer|string|null); + } + + /** Represents a Policy. */ + class Policy implements IPolicy { + + /** + * Constructs a new Policy. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicy); + + /** Policy version. */ + public version: number; + + /** Policy bindings. */ + public bindings: google.iam.v1.IBinding[]; + + /** Policy auditConfigs. */ + public auditConfigs: google.iam.v1.IAuditConfig[]; + + /** Policy etag. */ + public etag: (Uint8Array|Buffer|string); + + /** + * Creates a new Policy instance using the specified properties. + * @param [properties] Properties to set + * @returns Policy instance + */ + public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; + + /** + * Verifies a Policy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Policy + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @param message Policy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Policy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Policy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Binding. */ + interface IBinding { + + /** Binding role */ + role?: (string|null); + + /** Binding members */ + members?: (string[]|null); + + /** Binding condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a Binding. */ + class Binding implements IBinding { + + /** + * Constructs a new Binding. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBinding); + + /** Binding role. */ + public role: string; + + /** Binding members. */ + public members: string[]; + + /** Binding condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new Binding instance using the specified properties. + * @param [properties] Properties to set + * @returns Binding instance + */ + public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; + + /** + * Verifies a Binding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Binding + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @param message Binding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Binding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Binding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditConfig. */ + interface IAuditConfig { + + /** AuditConfig service */ + service?: (string|null); + + /** AuditConfig auditLogConfigs */ + auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); + } + + /** Represents an AuditConfig. */ + class AuditConfig implements IAuditConfig { + + /** + * Constructs a new AuditConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfig); + + /** AuditConfig service. */ + public service: string; + + /** AuditConfig auditLogConfigs. */ + public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfig instance + */ + public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; + + /** + * Verifies an AuditConfig 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 AuditConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @param message AuditConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditLogConfig. */ + interface IAuditLogConfig { + + /** AuditLogConfig logType */ + logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); + + /** AuditLogConfig exemptedMembers */ + exemptedMembers?: (string[]|null); + } + + /** Represents an AuditLogConfig. */ + class AuditLogConfig implements IAuditLogConfig { + + /** + * Constructs a new AuditLogConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditLogConfig); + + /** AuditLogConfig logType. */ + public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); + + /** AuditLogConfig exemptedMembers. */ + public exemptedMembers: string[]; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditLogConfig instance + */ + public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; + + /** + * Verifies an AuditLogConfig 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 AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditLogConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @param message AuditLogConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditLogConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditLogConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditLogConfig { + + /** LogType enum. */ + enum LogType { + LOG_TYPE_UNSPECIFIED = 0, + ADMIN_READ = 1, + DATA_WRITE = 2, + DATA_READ = 3 + } + } + + /** Properties of a PolicyDelta. */ + interface IPolicyDelta { + + /** PolicyDelta bindingDeltas */ + bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); + + /** PolicyDelta auditConfigDeltas */ + auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); + } + + /** Represents a PolicyDelta. */ + class PolicyDelta implements IPolicyDelta { + + /** + * Constructs a new PolicyDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicyDelta); + + /** PolicyDelta bindingDeltas. */ + public bindingDeltas: google.iam.v1.IBindingDelta[]; + + /** PolicyDelta auditConfigDeltas. */ + public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyDelta instance + */ + public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; + + /** + * Verifies a PolicyDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @param message PolicyDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolicyDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PolicyDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BindingDelta. */ + interface IBindingDelta { + + /** BindingDelta action */ + action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); + + /** BindingDelta role */ + role?: (string|null); + + /** BindingDelta member */ + member?: (string|null); + + /** BindingDelta condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a BindingDelta. */ + class BindingDelta implements IBindingDelta { + + /** + * Constructs a new BindingDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBindingDelta); + + /** BindingDelta action. */ + public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); + + /** BindingDelta role. */ + public role: string; + + /** BindingDelta member. */ + public member: string; + + /** BindingDelta condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new BindingDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns BindingDelta instance + */ + public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; + + /** + * Verifies a BindingDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindingDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @param message BindingDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BindingDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BindingDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BindingDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + + /** Properties of an AuditConfigDelta. */ + interface IAuditConfigDelta { + + /** AuditConfigDelta action */ + action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); + + /** AuditConfigDelta service */ + service?: (string|null); + + /** AuditConfigDelta exemptedMember */ + exemptedMember?: (string|null); + + /** AuditConfigDelta logType */ + logType?: (string|null); + } + + /** Represents an AuditConfigDelta. */ + class AuditConfigDelta implements IAuditConfigDelta { + + /** + * Constructs a new AuditConfigDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfigDelta); + + /** AuditConfigDelta action. */ + public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); + + /** AuditConfigDelta service. */ + public service: string; + + /** AuditConfigDelta exemptedMember. */ + public exemptedMember: string; + + /** AuditConfigDelta logType. */ + public logType: string; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfigDelta instance + */ + public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; + + /** + * Verifies an AuditConfigDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfigDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @param message AuditConfigDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfigDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfigDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditConfigDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations 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 Operations 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): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @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.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @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.longrunning.Operation; + + /** + * Verifies an Operation 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 Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @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.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @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.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest 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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @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.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @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.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest 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 ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @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.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @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.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse 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 ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @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.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @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.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest 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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @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.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @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.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest 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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @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.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @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.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest 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 WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @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.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @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.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo 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 OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/protos.js b/owl-bot-staging/google-devtools-artifactregistry/protos/protos.js new file mode 100644 index 00000000000..c1bbd9102cf --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/protos.js @@ -0,0 +1,71994 @@ +// Copyright 2025 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_artifact_registry_protos || ($protobuf.roots._google_cloud_artifact_registry_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.devtools = (function() { + + /** + * Namespace devtools. + * @memberof google + * @namespace + */ + var devtools = {}; + + devtools.artifactregistry = (function() { + + /** + * Namespace artifactregistry. + * @memberof google.devtools + * @namespace + */ + var artifactregistry = {}; + + artifactregistry.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.devtools.artifactregistry + * @namespace + */ + var v1 = {}; + + v1.AptArtifact = (function() { + + /** + * Properties of an AptArtifact. + * @memberof google.devtools.artifactregistry.v1 + * @interface IAptArtifact + * @property {string|null} [name] AptArtifact name + * @property {string|null} [packageName] AptArtifact packageName + * @property {google.devtools.artifactregistry.v1.AptArtifact.PackageType|null} [packageType] AptArtifact packageType + * @property {string|null} [architecture] AptArtifact architecture + * @property {string|null} [component] AptArtifact component + * @property {Uint8Array|null} [controlFile] AptArtifact controlFile + */ + + /** + * Constructs a new AptArtifact. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an AptArtifact. + * @implements IAptArtifact + * @constructor + * @param {google.devtools.artifactregistry.v1.IAptArtifact=} [properties] Properties to set + */ + function AptArtifact(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]]; + } + + /** + * AptArtifact name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @instance + */ + AptArtifact.prototype.name = ""; + + /** + * AptArtifact packageName. + * @member {string} packageName + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @instance + */ + AptArtifact.prototype.packageName = ""; + + /** + * AptArtifact packageType. + * @member {google.devtools.artifactregistry.v1.AptArtifact.PackageType} packageType + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @instance + */ + AptArtifact.prototype.packageType = 0; + + /** + * AptArtifact architecture. + * @member {string} architecture + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @instance + */ + AptArtifact.prototype.architecture = ""; + + /** + * AptArtifact component. + * @member {string} component + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @instance + */ + AptArtifact.prototype.component = ""; + + /** + * AptArtifact controlFile. + * @member {Uint8Array} controlFile + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @instance + */ + AptArtifact.prototype.controlFile = $util.newBuffer([]); + + /** + * Creates a new AptArtifact instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IAptArtifact=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.AptArtifact} AptArtifact instance + */ + AptArtifact.create = function create(properties) { + return new AptArtifact(properties); + }; + + /** + * Encodes the specified AptArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.AptArtifact.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IAptArtifact} message AptArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AptArtifact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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 AptArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.AptArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IAptArtifact} message AptArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AptArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AptArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.AptArtifact} AptArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptArtifact.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.AptArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + case 5: { + message.component = reader.string(); + break; + } + case 6: { + message.controlFile = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AptArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.AptArtifact} AptArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AptArtifact message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AptArtifact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + if (message.packageType != null && message.hasOwnProperty("packageType")) + switch (message.packageType) { + default: + return "packageType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.architecture != null && message.hasOwnProperty("architecture")) + if (!$util.isString(message.architecture)) + return "architecture: string expected"; + if (message.component != null && message.hasOwnProperty("component")) + if (!$util.isString(message.component)) + return "component: string expected"; + if (message.controlFile != null && message.hasOwnProperty("controlFile")) + if (!(message.controlFile && typeof message.controlFile.length === "number" || $util.isString(message.controlFile))) + return "controlFile: buffer expected"; + return null; + }; + + /** + * Creates an AptArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.AptArtifact} AptArtifact + */ + AptArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.AptArtifact) + return object; + var message = new $root.google.devtools.artifactregistry.v1.AptArtifact(); + if (object.name != null) + message.name = String(object.name); + if (object.packageName != null) + message.packageName = String(object.packageName); + switch (object.packageType) { + default: + if (typeof object.packageType === "number") { + message.packageType = object.packageType; + break; + } + break; + case "PACKAGE_TYPE_UNSPECIFIED": + case 0: + message.packageType = 0; + break; + case "BINARY": + case 1: + message.packageType = 1; + break; + case "SOURCE": + case 2: + message.packageType = 2; + break; + } + if (object.architecture != null) + message.architecture = String(object.architecture); + if (object.component != null) + message.component = String(object.component); + if (object.controlFile != null) + if (typeof object.controlFile === "string") + $util.base64.decode(object.controlFile, message.controlFile = $util.newBuffer($util.base64.length(object.controlFile)), 0); + else if (object.controlFile.length >= 0) + message.controlFile = object.controlFile; + return message; + }; + + /** + * Creates a plain object from an AptArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @static + * @param {google.devtools.artifactregistry.v1.AptArtifact} message AptArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AptArtifact.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 = ""; + object.component = ""; + if (options.bytes === String) + object.controlFile = ""; + else { + object.controlFile = []; + if (options.bytes !== Array) + object.controlFile = $util.newBuffer(object.controlFile); + } + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; + if (message.packageType != null && message.hasOwnProperty("packageType")) + object.packageType = options.enums === String ? $root.google.devtools.artifactregistry.v1.AptArtifact.PackageType[message.packageType] === undefined ? message.packageType : $root.google.devtools.artifactregistry.v1.AptArtifact.PackageType[message.packageType] : message.packageType; + if (message.architecture != null && message.hasOwnProperty("architecture")) + object.architecture = message.architecture; + if (message.component != null && message.hasOwnProperty("component")) + object.component = message.component; + if (message.controlFile != null && message.hasOwnProperty("controlFile")) + object.controlFile = options.bytes === String ? $util.base64.encode(message.controlFile, 0, message.controlFile.length) : options.bytes === Array ? Array.prototype.slice.call(message.controlFile) : message.controlFile; + return object; + }; + + /** + * Converts this AptArtifact to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @instance + * @returns {Object.} JSON object + */ + AptArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AptArtifact + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.AptArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AptArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.AptArtifact"; + }; + + /** + * PackageType enum. + * @name google.devtools.artifactregistry.v1.AptArtifact.PackageType + * @enum {number} + * @property {number} PACKAGE_TYPE_UNSPECIFIED=0 PACKAGE_TYPE_UNSPECIFIED value + * @property {number} BINARY=1 BINARY value + * @property {number} SOURCE=2 SOURCE value + */ + AptArtifact.PackageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PACKAGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BINARY"] = 1; + values[valuesById[2] = "SOURCE"] = 2; + return values; + })(); + + return AptArtifact; + })(); + + v1.ImportAptArtifactsGcsSource = (function() { + + /** + * Properties of an ImportAptArtifactsGcsSource. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImportAptArtifactsGcsSource + * @property {Array.|null} [uris] ImportAptArtifactsGcsSource uris + * @property {boolean|null} [useWildcards] ImportAptArtifactsGcsSource useWildcards + */ + + /** + * Constructs a new ImportAptArtifactsGcsSource. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportAptArtifactsGcsSource. + * @implements IImportAptArtifactsGcsSource + * @constructor + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource=} [properties] Properties to set + */ + function ImportAptArtifactsGcsSource(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]]; + } + + /** + * ImportAptArtifactsGcsSource uris. + * @member {Array.} uris + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource + * @instance + */ + ImportAptArtifactsGcsSource.prototype.uris = $util.emptyArray; + + /** + * ImportAptArtifactsGcsSource useWildcards. + * @member {boolean} useWildcards + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource + * @instance + */ + ImportAptArtifactsGcsSource.prototype.useWildcards = false; + + /** + * Creates a new ImportAptArtifactsGcsSource instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource instance + */ + ImportAptArtifactsGcsSource.create = function create(properties) { + return new ImportAptArtifactsGcsSource(properties); + }; + + /** + * Encodes the specified ImportAptArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource} message ImportAptArtifactsGcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportAptArtifactsGcsSource.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 ImportAptArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource} message ImportAptArtifactsGcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportAptArtifactsGcsSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportAptArtifactsGcsSource message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsGcsSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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 ImportAptArtifactsGcsSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsGcsSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportAptArtifactsGcsSource message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportAptArtifactsGcsSource.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 ImportAptArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource + */ + ImportAptArtifactsGcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource(); + if (object.uris) { + if (!Array.isArray(object.uris)) + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.uris: array expected"); + message.uris = []; + for (var i = 0; i < object.uris.length; ++i) + message.uris[i] = String(object.uris[i]); + } + if (object.useWildcards != null) + message.useWildcards = Boolean(object.useWildcards); + return message; + }; + + /** + * Creates a plain object from an ImportAptArtifactsGcsSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} message ImportAptArtifactsGcsSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportAptArtifactsGcsSource.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 ImportAptArtifactsGcsSource to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource + * @instance + * @returns {Object.} JSON object + */ + ImportAptArtifactsGcsSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportAptArtifactsGcsSource + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportAptArtifactsGcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource"; + }; + + return ImportAptArtifactsGcsSource; + })(); + + v1.ImportAptArtifactsRequest = (function() { + + /** + * Properties of an ImportAptArtifactsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImportAptArtifactsRequest + * @property {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null} [gcsSource] ImportAptArtifactsRequest gcsSource + * @property {string|null} [parent] ImportAptArtifactsRequest parent + */ + + /** + * Constructs a new ImportAptArtifactsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportAptArtifactsRequest. + * @implements IImportAptArtifactsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest=} [properties] Properties to set + */ + function ImportAptArtifactsRequest(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]]; + } + + /** + * ImportAptArtifactsRequest gcsSource. + * @member {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null|undefined} gcsSource + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest + * @instance + */ + ImportAptArtifactsRequest.prototype.gcsSource = null; + + /** + * ImportAptArtifactsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest + * @instance + */ + ImportAptArtifactsRequest.prototype.parent = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportAptArtifactsRequest source. + * @member {"gcsSource"|undefined} source + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest + * @instance + */ + Object.defineProperty(ImportAptArtifactsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportAptArtifactsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} ImportAptArtifactsRequest instance + */ + ImportAptArtifactsRequest.create = function create(properties) { + return new ImportAptArtifactsRequest(properties); + }; + + /** + * Encodes the specified ImportAptArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest} message ImportAptArtifactsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.encode(message.gcsSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportAptArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest} message ImportAptArtifactsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportAptArtifactsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} ImportAptArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.decode(reader, reader.uint32()); + break; + } + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} ImportAptArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportAptArtifactsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + 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.v1.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"; + return null; + }; + + /** + * Creates an ImportAptArtifactsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} ImportAptArtifactsRequest + */ + ImportAptArtifactsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.fromObject(object.gcsSource); + } + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from an ImportAptArtifactsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} message ImportAptArtifactsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportAptArtifactsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + return object; + }; + + /** + * Converts this ImportAptArtifactsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest + * @instance + * @returns {Object.} JSON object + */ + ImportAptArtifactsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportAptArtifactsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportAptArtifactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportAptArtifactsRequest"; + }; + + return ImportAptArtifactsRequest; + })(); + + v1.ImportAptArtifactsErrorInfo = (function() { + + /** + * Properties of an ImportAptArtifactsErrorInfo. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImportAptArtifactsErrorInfo + * @property {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null} [gcsSource] ImportAptArtifactsErrorInfo gcsSource + * @property {google.rpc.IStatus|null} [error] ImportAptArtifactsErrorInfo error + */ + + /** + * Constructs a new ImportAptArtifactsErrorInfo. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportAptArtifactsErrorInfo. + * @implements IImportAptArtifactsErrorInfo + * @constructor + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo=} [properties] Properties to set + */ + function ImportAptArtifactsErrorInfo(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]]; + } + + /** + * ImportAptArtifactsErrorInfo gcsSource. + * @member {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null|undefined} gcsSource + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo + * @instance + */ + ImportAptArtifactsErrorInfo.prototype.gcsSource = null; + + /** + * ImportAptArtifactsErrorInfo error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo + * @instance + */ + ImportAptArtifactsErrorInfo.prototype.error = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportAptArtifactsErrorInfo source. + * @member {"gcsSource"|undefined} source + * @memberof google.devtools.artifactregistry.v1.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.v1.ImportAptArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo instance + */ + ImportAptArtifactsErrorInfo.create = function create(properties) { + return new ImportAptArtifactsErrorInfo(properties); + }; + + /** + * Encodes the specified ImportAptArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo} message ImportAptArtifactsErrorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportAptArtifactsErrorInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportAptArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo} message ImportAptArtifactsErrorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportAptArtifactsErrorInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportAptArtifactsErrorInfo message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsErrorInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.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 ImportAptArtifactsErrorInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsErrorInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportAptArtifactsErrorInfo message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportAptArtifactsErrorInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.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 ImportAptArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo + */ + ImportAptArtifactsErrorInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.gcsSource: object expected"); + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.fromObject(object.gcsSource); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + return message; + }; + + /** + * Creates a plain object from an ImportAptArtifactsErrorInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} message ImportAptArtifactsErrorInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportAptArtifactsErrorInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.error = null; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.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 ImportAptArtifactsErrorInfo to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo + * @instance + * @returns {Object.} JSON object + */ + ImportAptArtifactsErrorInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportAptArtifactsErrorInfo + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportAptArtifactsErrorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo"; + }; + + return ImportAptArtifactsErrorInfo; + })(); + + v1.ImportAptArtifactsResponse = (function() { + + /** + * Properties of an ImportAptArtifactsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImportAptArtifactsResponse + * @property {Array.|null} [aptArtifacts] ImportAptArtifactsResponse aptArtifacts + * @property {Array.|null} [errors] ImportAptArtifactsResponse errors + */ + + /** + * Constructs a new ImportAptArtifactsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportAptArtifactsResponse. + * @implements IImportAptArtifactsResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsResponse=} [properties] Properties to set + */ + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportAptArtifactsResponse aptArtifacts. + * @member {Array.} aptArtifacts + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse + * @instance + */ + ImportAptArtifactsResponse.prototype.aptArtifacts = $util.emptyArray; + + /** + * ImportAptArtifactsResponse errors. + * @member {Array.} errors + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse + * @instance + */ + ImportAptArtifactsResponse.prototype.errors = $util.emptyArray; + + /** + * Creates a new ImportAptArtifactsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} ImportAptArtifactsResponse instance + */ + ImportAptArtifactsResponse.create = function create(properties) { + return new ImportAptArtifactsResponse(properties); + }; + + /** + * Encodes the specified ImportAptArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsResponse} message ImportAptArtifactsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportAptArtifactsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.aptArtifacts != null && message.aptArtifacts.length) + for (var i = 0; i < message.aptArtifacts.length; ++i) + $root.google.devtools.artifactregistry.v1.AptArtifact.encode(message.aptArtifacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportAptArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsResponse} message ImportAptArtifactsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportAptArtifactsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} ImportAptArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.aptArtifacts && message.aptArtifacts.length)) + message.aptArtifacts = []; + message.aptArtifacts.push($root.google.devtools.artifactregistry.v1.AptArtifact.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} ImportAptArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportAptArtifactsResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportAptArtifactsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.aptArtifacts != null && message.hasOwnProperty("aptArtifacts")) { + if (!Array.isArray(message.aptArtifacts)) + return "aptArtifacts: array expected"; + for (var i = 0; i < message.aptArtifacts.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.AptArtifact.verify(message.aptArtifacts[i]); + if (error) + return "aptArtifacts." + error; + } + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + return null; + }; + + /** + * Creates an ImportAptArtifactsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} ImportAptArtifactsResponse + */ + ImportAptArtifactsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsResponse(); + if (object.aptArtifacts) { + if (!Array.isArray(object.aptArtifacts)) + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.aptArtifacts: array expected"); + message.aptArtifacts = []; + for (var i = 0; i < object.aptArtifacts.length; ++i) { + if (typeof object.aptArtifacts[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.aptArtifacts: object expected"); + message.aptArtifacts[i] = $root.google.devtools.artifactregistry.v1.AptArtifact.fromObject(object.aptArtifacts[i]); + } + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.errors: object expected"); + message.errors[i] = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.fromObject(object.errors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ImportAptArtifactsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} message ImportAptArtifactsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportAptArtifactsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.aptArtifacts = []; + object.errors = []; + } + if (message.aptArtifacts && message.aptArtifacts.length) { + object.aptArtifacts = []; + for (var j = 0; j < message.aptArtifacts.length; ++j) + object.aptArtifacts[j] = $root.google.devtools.artifactregistry.v1.AptArtifact.toObject(message.aptArtifacts[j], options); + } + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.toObject(message.errors[j], options); + } + return object; + }; + + /** + * Converts this ImportAptArtifactsResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse + * @instance + * @returns {Object.} JSON object + */ + ImportAptArtifactsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportAptArtifactsResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportAptArtifactsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportAptArtifactsResponse"; + }; + + return ImportAptArtifactsResponse; + })(); + + v1.ImportAptArtifactsMetadata = (function() { + + /** + * Properties of an ImportAptArtifactsMetadata. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImportAptArtifactsMetadata + */ + + /** + * Constructs a new ImportAptArtifactsMetadata. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportAptArtifactsMetadata. + * @implements IImportAptArtifactsMetadata + * @constructor + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata=} [properties] Properties to set + */ + function ImportAptArtifactsMetadata(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 ImportAptArtifactsMetadata instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata instance + */ + ImportAptArtifactsMetadata.create = function create(properties) { + return new ImportAptArtifactsMetadata(properties); + }; + + /** + * Encodes the specified ImportAptArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata} message ImportAptArtifactsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportAptArtifactsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ImportAptArtifactsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata} message ImportAptArtifactsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportAptArtifactsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportAptArtifactsMetadata message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportAptArtifactsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an ImportAptArtifactsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata + */ + ImportAptArtifactsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata) + return object; + return new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata(); + }; + + /** + * Creates a plain object from an ImportAptArtifactsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} message ImportAptArtifactsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportAptArtifactsMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ImportAptArtifactsMetadata to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata + * @instance + * @returns {Object.} JSON object + */ + ImportAptArtifactsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportAptArtifactsMetadata + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportAptArtifactsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata"; + }; + + return ImportAptArtifactsMetadata; + })(); + + v1.DockerImage = (function() { + + /** + * Properties of a DockerImage. + * @memberof google.devtools.artifactregistry.v1 + * @interface IDockerImage + * @property {string|null} [name] DockerImage name + * @property {string|null} [uri] DockerImage uri + * @property {Array.|null} [tags] DockerImage tags + * @property {number|Long|null} [imageSizeBytes] DockerImage imageSizeBytes + * @property {google.protobuf.ITimestamp|null} [uploadTime] DockerImage uploadTime + * @property {string|null} [mediaType] DockerImage mediaType + * @property {google.protobuf.ITimestamp|null} [buildTime] DockerImage buildTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DockerImage updateTime + * @property {string|null} [artifactType] DockerImage artifactType + * @property {Array.|null} [imageManifests] DockerImage imageManifests + */ + + /** + * Constructs a new DockerImage. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a DockerImage. + * @implements IDockerImage + * @constructor + * @param {google.devtools.artifactregistry.v1.IDockerImage=} [properties] Properties to set + */ + function DockerImage(properties) { + this.tags = []; + this.imageManifests = []; + 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]]; + } + + /** + * DockerImage name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.name = ""; + + /** + * DockerImage uri. + * @member {string} uri + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.uri = ""; + + /** + * DockerImage tags. + * @member {Array.} tags + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.tags = $util.emptyArray; + + /** + * DockerImage imageSizeBytes. + * @member {number|Long} imageSizeBytes + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.imageSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DockerImage uploadTime. + * @member {google.protobuf.ITimestamp|null|undefined} uploadTime + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.uploadTime = null; + + /** + * DockerImage mediaType. + * @member {string} mediaType + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.mediaType = ""; + + /** + * DockerImage buildTime. + * @member {google.protobuf.ITimestamp|null|undefined} buildTime + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.buildTime = null; + + /** + * DockerImage updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.updateTime = null; + + /** + * DockerImage artifactType. + * @member {string} artifactType + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.artifactType = ""; + + /** + * DockerImage imageManifests. + * @member {Array.} imageManifests + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.imageManifests = $util.emptyArray; + + /** + * Creates a new DockerImage instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @static + * @param {google.devtools.artifactregistry.v1.IDockerImage=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage instance + */ + DockerImage.create = function create(properties) { + return new DockerImage(properties); + }; + + /** + * Encodes the specified DockerImage message. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @static + * @param {google.devtools.artifactregistry.v1.IDockerImage} message DockerImage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DockerImage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.imageSizeBytes != null && Object.hasOwnProperty.call(message, "imageSizeBytes")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.imageSizeBytes); + if (message.uploadTime != null && Object.hasOwnProperty.call(message, "uploadTime")) + $root.google.protobuf.Timestamp.encode(message.uploadTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.mediaType); + if (message.buildTime != null && Object.hasOwnProperty.call(message, "buildTime")) + $root.google.protobuf.Timestamp.encode(message.buildTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.artifactType != null && Object.hasOwnProperty.call(message, "artifactType")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.artifactType); + if (message.imageManifests != null && message.imageManifests.length) + for (var i = 0; i < message.imageManifests.length; ++i) + $root.google.devtools.artifactregistry.v1.ImageManifest.encode(message.imageManifests[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DockerImage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @static + * @param {google.devtools.artifactregistry.v1.IDockerImage} message DockerImage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DockerImage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DockerImage message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DockerImage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DockerImage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 4: { + message.imageSizeBytes = reader.int64(); + break; + } + case 5: { + message.uploadTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.mediaType = reader.string(); + break; + } + case 7: { + message.buildTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.artifactType = reader.string(); + break; + } + case 11: { + if (!(message.imageManifests && message.imageManifests.length)) + message.imageManifests = []; + message.imageManifests.push($root.google.devtools.artifactregistry.v1.ImageManifest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DockerImage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DockerImage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DockerImage message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DockerImage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.imageSizeBytes != null && message.hasOwnProperty("imageSizeBytes")) + if (!$util.isInteger(message.imageSizeBytes) && !(message.imageSizeBytes && $util.isInteger(message.imageSizeBytes.low) && $util.isInteger(message.imageSizeBytes.high))) + return "imageSizeBytes: integer|Long expected"; + if (message.uploadTime != null && message.hasOwnProperty("uploadTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.uploadTime); + if (error) + return "uploadTime." + error; + } + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + if (!$util.isString(message.mediaType)) + return "mediaType: string expected"; + if (message.buildTime != null && message.hasOwnProperty("buildTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.buildTime); + if (error) + return "buildTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.artifactType != null && message.hasOwnProperty("artifactType")) + if (!$util.isString(message.artifactType)) + return "artifactType: string expected"; + if (message.imageManifests != null && message.hasOwnProperty("imageManifests")) { + if (!Array.isArray(message.imageManifests)) + return "imageManifests: array expected"; + for (var i = 0; i < message.imageManifests.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.ImageManifest.verify(message.imageManifests[i]); + if (error) + return "imageManifests." + error; + } + } + return null; + }; + + /** + * Creates a DockerImage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage + */ + DockerImage.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.DockerImage) + return object; + var message = new $root.google.devtools.artifactregistry.v1.DockerImage(); + if (object.name != null) + message.name = String(object.name); + if (object.uri != null) + message.uri = String(object.uri); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.imageSizeBytes != null) + if ($util.Long) + (message.imageSizeBytes = $util.Long.fromValue(object.imageSizeBytes)).unsigned = false; + else if (typeof object.imageSizeBytes === "string") + message.imageSizeBytes = parseInt(object.imageSizeBytes, 10); + else if (typeof object.imageSizeBytes === "number") + message.imageSizeBytes = object.imageSizeBytes; + else if (typeof object.imageSizeBytes === "object") + message.imageSizeBytes = new $util.LongBits(object.imageSizeBytes.low >>> 0, object.imageSizeBytes.high >>> 0).toNumber(); + if (object.uploadTime != null) { + if (typeof object.uploadTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.uploadTime: object expected"); + message.uploadTime = $root.google.protobuf.Timestamp.fromObject(object.uploadTime); + } + if (object.mediaType != null) + message.mediaType = String(object.mediaType); + if (object.buildTime != null) { + if (typeof object.buildTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.buildTime: object expected"); + message.buildTime = $root.google.protobuf.Timestamp.fromObject(object.buildTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.artifactType != null) + message.artifactType = String(object.artifactType); + if (object.imageManifests) { + if (!Array.isArray(object.imageManifests)) + throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.imageManifests: array expected"); + message.imageManifests = []; + for (var i = 0; i < object.imageManifests.length; ++i) { + if (typeof object.imageManifests[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.imageManifests: object expected"); + message.imageManifests[i] = $root.google.devtools.artifactregistry.v1.ImageManifest.fromObject(object.imageManifests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DockerImage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @static + * @param {google.devtools.artifactregistry.v1.DockerImage} message DockerImage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DockerImage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.tags = []; + object.imageManifests = []; + } + if (options.defaults) { + object.name = ""; + object.uri = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.imageSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.imageSizeBytes = options.longs === String ? "0" : 0; + object.uploadTime = null; + object.mediaType = ""; + object.buildTime = null; + object.updateTime = null; + object.artifactType = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.imageSizeBytes != null && message.hasOwnProperty("imageSizeBytes")) + if (typeof message.imageSizeBytes === "number") + object.imageSizeBytes = options.longs === String ? String(message.imageSizeBytes) : message.imageSizeBytes; + else + object.imageSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.imageSizeBytes) : options.longs === Number ? new $util.LongBits(message.imageSizeBytes.low >>> 0, message.imageSizeBytes.high >>> 0).toNumber() : message.imageSizeBytes; + if (message.uploadTime != null && message.hasOwnProperty("uploadTime")) + object.uploadTime = $root.google.protobuf.Timestamp.toObject(message.uploadTime, options); + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + object.mediaType = message.mediaType; + if (message.buildTime != null && message.hasOwnProperty("buildTime")) + object.buildTime = $root.google.protobuf.Timestamp.toObject(message.buildTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.artifactType != null && message.hasOwnProperty("artifactType")) + object.artifactType = message.artifactType; + if (message.imageManifests && message.imageManifests.length) { + object.imageManifests = []; + for (var j = 0; j < message.imageManifests.length; ++j) + object.imageManifests[j] = $root.google.devtools.artifactregistry.v1.ImageManifest.toObject(message.imageManifests[j], options); + } + return object; + }; + + /** + * Converts this DockerImage to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + * @returns {Object.} JSON object + */ + DockerImage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DockerImage + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DockerImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DockerImage"; + }; + + return DockerImage; + })(); + + v1.ImageManifest = (function() { + + /** + * Properties of an ImageManifest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImageManifest + * @property {string|null} [architecture] ImageManifest architecture + * @property {string|null} [os] ImageManifest os + * @property {string|null} [digest] ImageManifest digest + * @property {string|null} [mediaType] ImageManifest mediaType + * @property {string|null} [osVersion] ImageManifest osVersion + * @property {Array.|null} [osFeatures] ImageManifest osFeatures + * @property {string|null} [variant] ImageManifest variant + */ + + /** + * Constructs a new ImageManifest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImageManifest. + * @implements IImageManifest + * @constructor + * @param {google.devtools.artifactregistry.v1.IImageManifest=} [properties] Properties to set + */ + function ImageManifest(properties) { + this.osFeatures = []; + 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]]; + } + + /** + * ImageManifest architecture. + * @member {string} architecture + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @instance + */ + ImageManifest.prototype.architecture = ""; + + /** + * ImageManifest os. + * @member {string} os + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @instance + */ + ImageManifest.prototype.os = ""; + + /** + * ImageManifest digest. + * @member {string} digest + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @instance + */ + ImageManifest.prototype.digest = ""; + + /** + * ImageManifest mediaType. + * @member {string} mediaType + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @instance + */ + ImageManifest.prototype.mediaType = ""; + + /** + * ImageManifest osVersion. + * @member {string} osVersion + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @instance + */ + ImageManifest.prototype.osVersion = ""; + + /** + * ImageManifest osFeatures. + * @member {Array.} osFeatures + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @instance + */ + ImageManifest.prototype.osFeatures = $util.emptyArray; + + /** + * ImageManifest variant. + * @member {string} variant + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @instance + */ + ImageManifest.prototype.variant = ""; + + /** + * Creates a new ImageManifest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @static + * @param {google.devtools.artifactregistry.v1.IImageManifest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImageManifest} ImageManifest instance + */ + ImageManifest.create = function create(properties) { + return new ImageManifest(properties); + }; + + /** + * Encodes the specified ImageManifest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImageManifest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @static + * @param {google.devtools.artifactregistry.v1.IImageManifest} message ImageManifest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageManifest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.architecture); + if (message.os != null && Object.hasOwnProperty.call(message, "os")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.os); + if (message.digest != null && Object.hasOwnProperty.call(message, "digest")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.digest); + if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.mediaType); + if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.osVersion); + if (message.osFeatures != null && message.osFeatures.length) + for (var i = 0; i < message.osFeatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.osFeatures[i]); + if (message.variant != null && Object.hasOwnProperty.call(message, "variant")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.variant); + return writer; + }; + + /** + * Encodes the specified ImageManifest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImageManifest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @static + * @param {google.devtools.artifactregistry.v1.IImageManifest} message ImageManifest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageManifest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageManifest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImageManifest} ImageManifest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageManifest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImageManifest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.architecture = reader.string(); + break; + } + case 2: { + message.os = reader.string(); + break; + } + case 3: { + message.digest = reader.string(); + break; + } + case 4: { + message.mediaType = reader.string(); + break; + } + case 5: { + message.osVersion = reader.string(); + break; + } + case 6: { + if (!(message.osFeatures && message.osFeatures.length)) + message.osFeatures = []; + message.osFeatures.push(reader.string()); + break; + } + case 7: { + message.variant = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImageManifest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImageManifest} ImageManifest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageManifest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageManifest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageManifest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.architecture != null && message.hasOwnProperty("architecture")) + if (!$util.isString(message.architecture)) + return "architecture: string expected"; + if (message.os != null && message.hasOwnProperty("os")) + if (!$util.isString(message.os)) + return "os: string expected"; + if (message.digest != null && message.hasOwnProperty("digest")) + if (!$util.isString(message.digest)) + return "digest: string expected"; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + if (!$util.isString(message.mediaType)) + return "mediaType: string expected"; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + if (!$util.isString(message.osVersion)) + return "osVersion: string expected"; + if (message.osFeatures != null && message.hasOwnProperty("osFeatures")) { + if (!Array.isArray(message.osFeatures)) + return "osFeatures: array expected"; + for (var i = 0; i < message.osFeatures.length; ++i) + if (!$util.isString(message.osFeatures[i])) + return "osFeatures: string[] expected"; + } + if (message.variant != null && message.hasOwnProperty("variant")) + if (!$util.isString(message.variant)) + return "variant: string expected"; + return null; + }; + + /** + * Creates an ImageManifest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImageManifest} ImageManifest + */ + ImageManifest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImageManifest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ImageManifest(); + if (object.architecture != null) + message.architecture = String(object.architecture); + if (object.os != null) + message.os = String(object.os); + if (object.digest != null) + message.digest = String(object.digest); + if (object.mediaType != null) + message.mediaType = String(object.mediaType); + if (object.osVersion != null) + message.osVersion = String(object.osVersion); + if (object.osFeatures) { + if (!Array.isArray(object.osFeatures)) + throw TypeError(".google.devtools.artifactregistry.v1.ImageManifest.osFeatures: array expected"); + message.osFeatures = []; + for (var i = 0; i < object.osFeatures.length; ++i) + message.osFeatures[i] = String(object.osFeatures[i]); + } + if (object.variant != null) + message.variant = String(object.variant); + return message; + }; + + /** + * Creates a plain object from an ImageManifest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @static + * @param {google.devtools.artifactregistry.v1.ImageManifest} message ImageManifest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageManifest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osFeatures = []; + if (options.defaults) { + object.architecture = ""; + object.os = ""; + object.digest = ""; + object.mediaType = ""; + object.osVersion = ""; + object.variant = ""; + } + if (message.architecture != null && message.hasOwnProperty("architecture")) + object.architecture = message.architecture; + if (message.os != null && message.hasOwnProperty("os")) + object.os = message.os; + if (message.digest != null && message.hasOwnProperty("digest")) + object.digest = message.digest; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + object.mediaType = message.mediaType; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + object.osVersion = message.osVersion; + if (message.osFeatures && message.osFeatures.length) { + object.osFeatures = []; + for (var j = 0; j < message.osFeatures.length; ++j) + object.osFeatures[j] = message.osFeatures[j]; + } + if (message.variant != null && message.hasOwnProperty("variant")) + object.variant = message.variant; + return object; + }; + + /** + * Converts this ImageManifest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @instance + * @returns {Object.} JSON object + */ + ImageManifest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageManifest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ImageManifest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageManifest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImageManifest"; + }; + + return ImageManifest; + })(); + + v1.ListDockerImagesRequest = (function() { + + /** + * Properties of a ListDockerImagesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListDockerImagesRequest + * @property {string|null} [parent] ListDockerImagesRequest parent + * @property {number|null} [pageSize] ListDockerImagesRequest pageSize + * @property {string|null} [pageToken] ListDockerImagesRequest pageToken + * @property {string|null} [orderBy] ListDockerImagesRequest orderBy + */ + + /** + * Constructs a new ListDockerImagesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListDockerImagesRequest. + * @implements IListDockerImagesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest=} [properties] Properties to set + */ + function ListDockerImagesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDockerImagesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @instance + */ + ListDockerImagesRequest.prototype.parent = ""; + + /** + * ListDockerImagesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @instance + */ + ListDockerImagesRequest.prototype.pageSize = 0; + + /** + * ListDockerImagesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @instance + */ + ListDockerImagesRequest.prototype.pageToken = ""; + + /** + * ListDockerImagesRequest orderBy. + * @member {string} orderBy + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @instance + */ + ListDockerImagesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDockerImagesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest instance + */ + ListDockerImagesRequest.create = function create(properties) { + return new ListDockerImagesRequest(properties); + }; + + /** + * Encodes the specified ListDockerImagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} message ListDockerImagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDockerImagesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListDockerImagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} message ListDockerImagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDockerImagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDockerImagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDockerImagesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListDockerImagesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDockerImagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDockerImagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDockerImagesRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDockerImagesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListDockerImagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest + */ + ListDockerImagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListDockerImagesRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListDockerImagesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListDockerImagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListDockerImagesRequest} message ListDockerImagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDockerImagesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + 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.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListDockerImagesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDockerImagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDockerImagesRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDockerImagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListDockerImagesRequest"; + }; + + return ListDockerImagesRequest; + })(); + + v1.ListDockerImagesResponse = (function() { + + /** + * Properties of a ListDockerImagesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListDockerImagesResponse + * @property {Array.|null} [dockerImages] ListDockerImagesResponse dockerImages + * @property {string|null} [nextPageToken] ListDockerImagesResponse nextPageToken + */ + + /** + * Constructs a new ListDockerImagesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListDockerImagesResponse. + * @implements IListDockerImagesResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse=} [properties] Properties to set + */ + function ListDockerImagesResponse(properties) { + this.dockerImages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDockerImagesResponse dockerImages. + * @member {Array.} dockerImages + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @instance + */ + ListDockerImagesResponse.prototype.dockerImages = $util.emptyArray; + + /** + * ListDockerImagesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @instance + */ + ListDockerImagesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDockerImagesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse instance + */ + ListDockerImagesResponse.create = function create(properties) { + return new ListDockerImagesResponse(properties); + }; + + /** + * Encodes the specified ListDockerImagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse} message ListDockerImagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDockerImagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dockerImages != null && message.dockerImages.length) + for (var i = 0; i < message.dockerImages.length; ++i) + $root.google.devtools.artifactregistry.v1.DockerImage.encode(message.dockerImages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListDockerImagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse} message ListDockerImagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDockerImagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDockerImagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDockerImagesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListDockerImagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dockerImages && message.dockerImages.length)) + message.dockerImages = []; + message.dockerImages.push($root.google.devtools.artifactregistry.v1.DockerImage.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDockerImagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDockerImagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDockerImagesResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDockerImagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dockerImages != null && message.hasOwnProperty("dockerImages")) { + if (!Array.isArray(message.dockerImages)) + return "dockerImages: array expected"; + for (var i = 0; i < message.dockerImages.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.DockerImage.verify(message.dockerImages[i]); + if (error) + return "dockerImages." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDockerImagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse + */ + ListDockerImagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListDockerImagesResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListDockerImagesResponse(); + if (object.dockerImages) { + if (!Array.isArray(object.dockerImages)) + throw TypeError(".google.devtools.artifactregistry.v1.ListDockerImagesResponse.dockerImages: array expected"); + message.dockerImages = []; + for (var i = 0; i < object.dockerImages.length; ++i) { + if (typeof object.dockerImages[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListDockerImagesResponse.dockerImages: object expected"); + message.dockerImages[i] = $root.google.devtools.artifactregistry.v1.DockerImage.fromObject(object.dockerImages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDockerImagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListDockerImagesResponse} message ListDockerImagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDockerImagesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dockerImages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.dockerImages && message.dockerImages.length) { + object.dockerImages = []; + for (var j = 0; j < message.dockerImages.length; ++j) + object.dockerImages[j] = $root.google.devtools.artifactregistry.v1.DockerImage.toObject(message.dockerImages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDockerImagesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDockerImagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDockerImagesResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDockerImagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListDockerImagesResponse"; + }; + + return ListDockerImagesResponse; + })(); + + v1.GetDockerImageRequest = (function() { + + /** + * Properties of a GetDockerImageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetDockerImageRequest + * @property {string|null} [name] GetDockerImageRequest name + */ + + /** + * Constructs a new GetDockerImageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetDockerImageRequest. + * @implements IGetDockerImageRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest=} [properties] Properties to set + */ + function GetDockerImageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDockerImageRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @instance + */ + GetDockerImageRequest.prototype.name = ""; + + /** + * Creates a new GetDockerImageRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetDockerImageRequest} GetDockerImageRequest instance + */ + GetDockerImageRequest.create = function create(properties) { + return new GetDockerImageRequest(properties); + }; + + /** + * Encodes the specified GetDockerImageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetDockerImageRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest} message GetDockerImageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDockerImageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetDockerImageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetDockerImageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest} message GetDockerImageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDockerImageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDockerImageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetDockerImageRequest} GetDockerImageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDockerImageRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetDockerImageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDockerImageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetDockerImageRequest} GetDockerImageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDockerImageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDockerImageRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDockerImageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetDockerImageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetDockerImageRequest} GetDockerImageRequest + */ + GetDockerImageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetDockerImageRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetDockerImageRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDockerImageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetDockerImageRequest} message GetDockerImageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDockerImageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetDockerImageRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @instance + * @returns {Object.} JSON object + */ + GetDockerImageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDockerImageRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDockerImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetDockerImageRequest"; + }; + + return GetDockerImageRequest; + })(); + + v1.MavenArtifact = (function() { + + /** + * Properties of a MavenArtifact. + * @memberof google.devtools.artifactregistry.v1 + * @interface IMavenArtifact + * @property {string|null} [name] MavenArtifact name + * @property {string|null} [pomUri] MavenArtifact pomUri + * @property {string|null} [groupId] MavenArtifact groupId + * @property {string|null} [artifactId] MavenArtifact artifactId + * @property {string|null} [version] MavenArtifact version + * @property {google.protobuf.ITimestamp|null} [createTime] MavenArtifact createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] MavenArtifact updateTime + */ + + /** + * Constructs a new MavenArtifact. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a MavenArtifact. + * @implements IMavenArtifact + * @constructor + * @param {google.devtools.artifactregistry.v1.IMavenArtifact=} [properties] Properties to set + */ + function MavenArtifact(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]]; + } + + /** + * MavenArtifact name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @instance + */ + MavenArtifact.prototype.name = ""; + + /** + * MavenArtifact pomUri. + * @member {string} pomUri + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @instance + */ + MavenArtifact.prototype.pomUri = ""; + + /** + * MavenArtifact groupId. + * @member {string} groupId + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @instance + */ + MavenArtifact.prototype.groupId = ""; + + /** + * MavenArtifact artifactId. + * @member {string} artifactId + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @instance + */ + MavenArtifact.prototype.artifactId = ""; + + /** + * MavenArtifact version. + * @member {string} version + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @instance + */ + MavenArtifact.prototype.version = ""; + + /** + * MavenArtifact createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @instance + */ + MavenArtifact.prototype.createTime = null; + + /** + * MavenArtifact updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @instance + */ + MavenArtifact.prototype.updateTime = null; + + /** + * Creates a new MavenArtifact instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IMavenArtifact=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.MavenArtifact} MavenArtifact instance + */ + MavenArtifact.create = function create(properties) { + return new MavenArtifact(properties); + }; + + /** + * Encodes the specified MavenArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.MavenArtifact.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IMavenArtifact} message MavenArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MavenArtifact.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.pomUri != null && Object.hasOwnProperty.call(message, "pomUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pomUri); + if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupId); + if (message.artifactId != null && Object.hasOwnProperty.call(message, "artifactId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.artifactId); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MavenArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.MavenArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IMavenArtifact} message MavenArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MavenArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MavenArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.MavenArtifact} MavenArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MavenArtifact.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.MavenArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pomUri = reader.string(); + break; + } + case 3: { + message.groupId = reader.string(); + break; + } + case 4: { + message.artifactId = reader.string(); + break; + } + case 5: { + message.version = reader.string(); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MavenArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.MavenArtifact} MavenArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MavenArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MavenArtifact message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MavenArtifact.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.pomUri != null && message.hasOwnProperty("pomUri")) + if (!$util.isString(message.pomUri)) + return "pomUri: string expected"; + if (message.groupId != null && message.hasOwnProperty("groupId")) + if (!$util.isString(message.groupId)) + return "groupId: string expected"; + if (message.artifactId != null && message.hasOwnProperty("artifactId")) + if (!$util.isString(message.artifactId)) + return "artifactId: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: 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 MavenArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.MavenArtifact} MavenArtifact + */ + MavenArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.MavenArtifact) + return object; + var message = new $root.google.devtools.artifactregistry.v1.MavenArtifact(); + if (object.name != null) + message.name = String(object.name); + if (object.pomUri != null) + message.pomUri = String(object.pomUri); + if (object.groupId != null) + message.groupId = String(object.groupId); + if (object.artifactId != null) + message.artifactId = String(object.artifactId); + if (object.version != null) + message.version = String(object.version); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.MavenArtifact.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.MavenArtifact.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a MavenArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @static + * @param {google.devtools.artifactregistry.v1.MavenArtifact} message MavenArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MavenArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pomUri = ""; + object.groupId = ""; + object.artifactId = ""; + object.version = ""; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pomUri != null && message.hasOwnProperty("pomUri")) + object.pomUri = message.pomUri; + if (message.groupId != null && message.hasOwnProperty("groupId")) + object.groupId = message.groupId; + if (message.artifactId != null && message.hasOwnProperty("artifactId")) + object.artifactId = message.artifactId; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + 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 MavenArtifact to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @instance + * @returns {Object.} JSON object + */ + MavenArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MavenArtifact + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.MavenArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MavenArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.MavenArtifact"; + }; + + return MavenArtifact; + })(); + + v1.ListMavenArtifactsRequest = (function() { + + /** + * Properties of a ListMavenArtifactsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListMavenArtifactsRequest + * @property {string|null} [parent] ListMavenArtifactsRequest parent + * @property {number|null} [pageSize] ListMavenArtifactsRequest pageSize + * @property {string|null} [pageToken] ListMavenArtifactsRequest pageToken + */ + + /** + * Constructs a new ListMavenArtifactsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListMavenArtifactsRequest. + * @implements IListMavenArtifactsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsRequest=} [properties] Properties to set + */ + function ListMavenArtifactsRequest(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]]; + } + + /** + * ListMavenArtifactsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + * @instance + */ + ListMavenArtifactsRequest.prototype.parent = ""; + + /** + * ListMavenArtifactsRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + * @instance + */ + ListMavenArtifactsRequest.prototype.pageSize = 0; + + /** + * ListMavenArtifactsRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + * @instance + */ + ListMavenArtifactsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMavenArtifactsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsRequest} ListMavenArtifactsRequest instance + */ + ListMavenArtifactsRequest.create = function create(properties) { + return new ListMavenArtifactsRequest(properties); + }; + + /** + * Encodes the specified ListMavenArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsRequest} message ListMavenArtifactsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMavenArtifactsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListMavenArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsRequest} message ListMavenArtifactsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMavenArtifactsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMavenArtifactsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsRequest} ListMavenArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMavenArtifactsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMavenArtifactsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsRequest} ListMavenArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMavenArtifactsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMavenArtifactsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMavenArtifactsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListMavenArtifactsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsRequest} ListMavenArtifactsRequest + */ + ListMavenArtifactsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest(); + 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 ListMavenArtifactsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListMavenArtifactsRequest} message ListMavenArtifactsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMavenArtifactsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListMavenArtifactsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMavenArtifactsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMavenArtifactsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMavenArtifactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListMavenArtifactsRequest"; + }; + + return ListMavenArtifactsRequest; + })(); + + v1.ListMavenArtifactsResponse = (function() { + + /** + * Properties of a ListMavenArtifactsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListMavenArtifactsResponse + * @property {Array.|null} [mavenArtifacts] ListMavenArtifactsResponse mavenArtifacts + * @property {string|null} [nextPageToken] ListMavenArtifactsResponse nextPageToken + */ + + /** + * Constructs a new ListMavenArtifactsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListMavenArtifactsResponse. + * @implements IListMavenArtifactsResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsResponse=} [properties] Properties to set + */ + function ListMavenArtifactsResponse(properties) { + this.mavenArtifacts = []; + 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]]; + } + + /** + * ListMavenArtifactsResponse mavenArtifacts. + * @member {Array.} mavenArtifacts + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + * @instance + */ + ListMavenArtifactsResponse.prototype.mavenArtifacts = $util.emptyArray; + + /** + * ListMavenArtifactsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + * @instance + */ + ListMavenArtifactsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMavenArtifactsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsResponse} ListMavenArtifactsResponse instance + */ + ListMavenArtifactsResponse.create = function create(properties) { + return new ListMavenArtifactsResponse(properties); + }; + + /** + * Encodes the specified ListMavenArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsResponse} message ListMavenArtifactsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMavenArtifactsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mavenArtifacts != null && message.mavenArtifacts.length) + for (var i = 0; i < message.mavenArtifacts.length; ++i) + $root.google.devtools.artifactregistry.v1.MavenArtifact.encode(message.mavenArtifacts[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 ListMavenArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsResponse} message ListMavenArtifactsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMavenArtifactsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMavenArtifactsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsResponse} ListMavenArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMavenArtifactsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.mavenArtifacts && message.mavenArtifacts.length)) + message.mavenArtifacts = []; + message.mavenArtifacts.push($root.google.devtools.artifactregistry.v1.MavenArtifact.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMavenArtifactsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsResponse} ListMavenArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMavenArtifactsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMavenArtifactsResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMavenArtifactsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mavenArtifacts != null && message.hasOwnProperty("mavenArtifacts")) { + if (!Array.isArray(message.mavenArtifacts)) + return "mavenArtifacts: array expected"; + for (var i = 0; i < message.mavenArtifacts.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.MavenArtifact.verify(message.mavenArtifacts[i]); + if (error) + return "mavenArtifacts." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListMavenArtifactsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsResponse} ListMavenArtifactsResponse + */ + ListMavenArtifactsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse(); + if (object.mavenArtifacts) { + if (!Array.isArray(object.mavenArtifacts)) + throw TypeError(".google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.mavenArtifacts: array expected"); + message.mavenArtifacts = []; + for (var i = 0; i < object.mavenArtifacts.length; ++i) { + if (typeof object.mavenArtifacts[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.mavenArtifacts: object expected"); + message.mavenArtifacts[i] = $root.google.devtools.artifactregistry.v1.MavenArtifact.fromObject(object.mavenArtifacts[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListMavenArtifactsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListMavenArtifactsResponse} message ListMavenArtifactsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMavenArtifactsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mavenArtifacts = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.mavenArtifacts && message.mavenArtifacts.length) { + object.mavenArtifacts = []; + for (var j = 0; j < message.mavenArtifacts.length; ++j) + object.mavenArtifacts[j] = $root.google.devtools.artifactregistry.v1.MavenArtifact.toObject(message.mavenArtifacts[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListMavenArtifactsResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMavenArtifactsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMavenArtifactsResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMavenArtifactsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListMavenArtifactsResponse"; + }; + + return ListMavenArtifactsResponse; + })(); + + v1.GetMavenArtifactRequest = (function() { + + /** + * Properties of a GetMavenArtifactRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetMavenArtifactRequest + * @property {string|null} [name] GetMavenArtifactRequest name + */ + + /** + * Constructs a new GetMavenArtifactRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetMavenArtifactRequest. + * @implements IGetMavenArtifactRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetMavenArtifactRequest=} [properties] Properties to set + */ + function GetMavenArtifactRequest(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]]; + } + + /** + * GetMavenArtifactRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest + * @instance + */ + GetMavenArtifactRequest.prototype.name = ""; + + /** + * Creates a new GetMavenArtifactRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetMavenArtifactRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetMavenArtifactRequest} GetMavenArtifactRequest instance + */ + GetMavenArtifactRequest.create = function create(properties) { + return new GetMavenArtifactRequest(properties); + }; + + /** + * Encodes the specified GetMavenArtifactRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetMavenArtifactRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetMavenArtifactRequest} message GetMavenArtifactRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMavenArtifactRequest.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 GetMavenArtifactRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetMavenArtifactRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetMavenArtifactRequest} message GetMavenArtifactRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMavenArtifactRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMavenArtifactRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetMavenArtifactRequest} GetMavenArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMavenArtifactRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetMavenArtifactRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMavenArtifactRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetMavenArtifactRequest} GetMavenArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMavenArtifactRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMavenArtifactRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMavenArtifactRequest.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 GetMavenArtifactRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetMavenArtifactRequest} GetMavenArtifactRequest + */ + GetMavenArtifactRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetMavenArtifactRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetMavenArtifactRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMavenArtifactRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetMavenArtifactRequest} message GetMavenArtifactRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMavenArtifactRequest.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 GetMavenArtifactRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest + * @instance + * @returns {Object.} JSON object + */ + GetMavenArtifactRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMavenArtifactRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMavenArtifactRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetMavenArtifactRequest"; + }; + + return GetMavenArtifactRequest; + })(); + + v1.NpmPackage = (function() { + + /** + * Properties of a NpmPackage. + * @memberof google.devtools.artifactregistry.v1 + * @interface INpmPackage + * @property {string|null} [name] NpmPackage name + * @property {string|null} [packageName] NpmPackage packageName + * @property {string|null} [version] NpmPackage version + * @property {Array.|null} [tags] NpmPackage tags + * @property {google.protobuf.ITimestamp|null} [createTime] NpmPackage createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] NpmPackage updateTime + */ + + /** + * Constructs a new NpmPackage. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a NpmPackage. + * @implements INpmPackage + * @constructor + * @param {google.devtools.artifactregistry.v1.INpmPackage=} [properties] Properties to set + */ + function NpmPackage(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]]; + } + + /** + * NpmPackage name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @instance + */ + NpmPackage.prototype.name = ""; + + /** + * NpmPackage packageName. + * @member {string} packageName + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @instance + */ + NpmPackage.prototype.packageName = ""; + + /** + * NpmPackage version. + * @member {string} version + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @instance + */ + NpmPackage.prototype.version = ""; + + /** + * NpmPackage tags. + * @member {Array.} tags + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @instance + */ + NpmPackage.prototype.tags = $util.emptyArray; + + /** + * NpmPackage createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @instance + */ + NpmPackage.prototype.createTime = null; + + /** + * NpmPackage updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @instance + */ + NpmPackage.prototype.updateTime = null; + + /** + * Creates a new NpmPackage instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @static + * @param {google.devtools.artifactregistry.v1.INpmPackage=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.NpmPackage} NpmPackage instance + */ + NpmPackage.create = function create(properties) { + return new NpmPackage(properties); + }; + + /** + * Encodes the specified NpmPackage message. Does not implicitly {@link google.devtools.artifactregistry.v1.NpmPackage.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @static + * @param {google.devtools.artifactregistry.v1.INpmPackage} message NpmPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NpmPackage.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 3, wireType 2 =*/26).string(message.packageName); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.version); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.tags[i]); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NpmPackage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.NpmPackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @static + * @param {google.devtools.artifactregistry.v1.INpmPackage} message NpmPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NpmPackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NpmPackage message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.NpmPackage} NpmPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NpmPackage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.NpmPackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.packageName = reader.string(); + break; + } + case 4: { + message.version = reader.string(); + break; + } + case 5: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NpmPackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.NpmPackage} NpmPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NpmPackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NpmPackage message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NpmPackage.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.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.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 NpmPackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.NpmPackage} NpmPackage + */ + NpmPackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.NpmPackage) + return object; + var message = new $root.google.devtools.artifactregistry.v1.NpmPackage(); + if (object.name != null) + message.name = String(object.name); + if (object.packageName != null) + message.packageName = String(object.packageName); + if (object.version != null) + message.version = String(object.version); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.devtools.artifactregistry.v1.NpmPackage.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.NpmPackage.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.NpmPackage.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a NpmPackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @static + * @param {google.devtools.artifactregistry.v1.NpmPackage} message NpmPackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NpmPackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tags = []; + if (options.defaults) { + object.name = ""; + object.packageName = ""; + object.version = ""; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.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 NpmPackage to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @instance + * @returns {Object.} JSON object + */ + NpmPackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NpmPackage + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.NpmPackage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NpmPackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.NpmPackage"; + }; + + return NpmPackage; + })(); + + v1.ListNpmPackagesRequest = (function() { + + /** + * Properties of a ListNpmPackagesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListNpmPackagesRequest + * @property {string|null} [parent] ListNpmPackagesRequest parent + * @property {number|null} [pageSize] ListNpmPackagesRequest pageSize + * @property {string|null} [pageToken] ListNpmPackagesRequest pageToken + */ + + /** + * Constructs a new ListNpmPackagesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListNpmPackagesRequest. + * @implements IListNpmPackagesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListNpmPackagesRequest=} [properties] Properties to set + */ + function ListNpmPackagesRequest(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]]; + } + + /** + * ListNpmPackagesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest + * @instance + */ + ListNpmPackagesRequest.prototype.parent = ""; + + /** + * ListNpmPackagesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest + * @instance + */ + ListNpmPackagesRequest.prototype.pageSize = 0; + + /** + * ListNpmPackagesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest + * @instance + */ + ListNpmPackagesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListNpmPackagesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListNpmPackagesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesRequest} ListNpmPackagesRequest instance + */ + ListNpmPackagesRequest.create = function create(properties) { + return new ListNpmPackagesRequest(properties); + }; + + /** + * Encodes the specified ListNpmPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListNpmPackagesRequest} message ListNpmPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNpmPackagesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListNpmPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListNpmPackagesRequest} message ListNpmPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNpmPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListNpmPackagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesRequest} ListNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNpmPackagesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListNpmPackagesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListNpmPackagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesRequest} ListNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNpmPackagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListNpmPackagesRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNpmPackagesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListNpmPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesRequest} ListNpmPackagesRequest + */ + ListNpmPackagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListNpmPackagesRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListNpmPackagesRequest(); + 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 ListNpmPackagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListNpmPackagesRequest} message ListNpmPackagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListNpmPackagesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListNpmPackagesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest + * @instance + * @returns {Object.} JSON object + */ + ListNpmPackagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListNpmPackagesRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListNpmPackagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListNpmPackagesRequest"; + }; + + return ListNpmPackagesRequest; + })(); + + v1.ListNpmPackagesResponse = (function() { + + /** + * Properties of a ListNpmPackagesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListNpmPackagesResponse + * @property {Array.|null} [npmPackages] ListNpmPackagesResponse npmPackages + * @property {string|null} [nextPageToken] ListNpmPackagesResponse nextPageToken + */ + + /** + * Constructs a new ListNpmPackagesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListNpmPackagesResponse. + * @implements IListNpmPackagesResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListNpmPackagesResponse=} [properties] Properties to set + */ + function ListNpmPackagesResponse(properties) { + this.npmPackages = []; + 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]]; + } + + /** + * ListNpmPackagesResponse npmPackages. + * @member {Array.} npmPackages + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse + * @instance + */ + ListNpmPackagesResponse.prototype.npmPackages = $util.emptyArray; + + /** + * ListNpmPackagesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse + * @instance + */ + ListNpmPackagesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListNpmPackagesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListNpmPackagesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesResponse} ListNpmPackagesResponse instance + */ + ListNpmPackagesResponse.create = function create(properties) { + return new ListNpmPackagesResponse(properties); + }; + + /** + * Encodes the specified ListNpmPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListNpmPackagesResponse} message ListNpmPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNpmPackagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.npmPackages != null && message.npmPackages.length) + for (var i = 0; i < message.npmPackages.length; ++i) + $root.google.devtools.artifactregistry.v1.NpmPackage.encode(message.npmPackages[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 ListNpmPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListNpmPackagesResponse} message ListNpmPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNpmPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListNpmPackagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesResponse} ListNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNpmPackagesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListNpmPackagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.npmPackages && message.npmPackages.length)) + message.npmPackages = []; + message.npmPackages.push($root.google.devtools.artifactregistry.v1.NpmPackage.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListNpmPackagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesResponse} ListNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNpmPackagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListNpmPackagesResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNpmPackagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.npmPackages != null && message.hasOwnProperty("npmPackages")) { + if (!Array.isArray(message.npmPackages)) + return "npmPackages: array expected"; + for (var i = 0; i < message.npmPackages.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.NpmPackage.verify(message.npmPackages[i]); + if (error) + return "npmPackages." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListNpmPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesResponse} ListNpmPackagesResponse + */ + ListNpmPackagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListNpmPackagesResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListNpmPackagesResponse(); + if (object.npmPackages) { + if (!Array.isArray(object.npmPackages)) + throw TypeError(".google.devtools.artifactregistry.v1.ListNpmPackagesResponse.npmPackages: array expected"); + message.npmPackages = []; + for (var i = 0; i < object.npmPackages.length; ++i) { + if (typeof object.npmPackages[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListNpmPackagesResponse.npmPackages: object expected"); + message.npmPackages[i] = $root.google.devtools.artifactregistry.v1.NpmPackage.fromObject(object.npmPackages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListNpmPackagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListNpmPackagesResponse} message ListNpmPackagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListNpmPackagesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.npmPackages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.npmPackages && message.npmPackages.length) { + object.npmPackages = []; + for (var j = 0; j < message.npmPackages.length; ++j) + object.npmPackages[j] = $root.google.devtools.artifactregistry.v1.NpmPackage.toObject(message.npmPackages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListNpmPackagesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse + * @instance + * @returns {Object.} JSON object + */ + ListNpmPackagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListNpmPackagesResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListNpmPackagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListNpmPackagesResponse"; + }; + + return ListNpmPackagesResponse; + })(); + + v1.GetNpmPackageRequest = (function() { + + /** + * Properties of a GetNpmPackageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetNpmPackageRequest + * @property {string|null} [name] GetNpmPackageRequest name + */ + + /** + * Constructs a new GetNpmPackageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetNpmPackageRequest. + * @implements IGetNpmPackageRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetNpmPackageRequest=} [properties] Properties to set + */ + function GetNpmPackageRequest(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]]; + } + + /** + * GetNpmPackageRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest + * @instance + */ + GetNpmPackageRequest.prototype.name = ""; + + /** + * Creates a new GetNpmPackageRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetNpmPackageRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetNpmPackageRequest} GetNpmPackageRequest instance + */ + GetNpmPackageRequest.create = function create(properties) { + return new GetNpmPackageRequest(properties); + }; + + /** + * Encodes the specified GetNpmPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetNpmPackageRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetNpmPackageRequest} message GetNpmPackageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNpmPackageRequest.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 GetNpmPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetNpmPackageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetNpmPackageRequest} message GetNpmPackageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNpmPackageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetNpmPackageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetNpmPackageRequest} GetNpmPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNpmPackageRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetNpmPackageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetNpmPackageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetNpmPackageRequest} GetNpmPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNpmPackageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetNpmPackageRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetNpmPackageRequest.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 GetNpmPackageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetNpmPackageRequest} GetNpmPackageRequest + */ + GetNpmPackageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetNpmPackageRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetNpmPackageRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetNpmPackageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetNpmPackageRequest} message GetNpmPackageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetNpmPackageRequest.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 GetNpmPackageRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest + * @instance + * @returns {Object.} JSON object + */ + GetNpmPackageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetNpmPackageRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetNpmPackageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetNpmPackageRequest"; + }; + + return GetNpmPackageRequest; + })(); + + v1.PythonPackage = (function() { + + /** + * Properties of a PythonPackage. + * @memberof google.devtools.artifactregistry.v1 + * @interface IPythonPackage + * @property {string|null} [name] PythonPackage name + * @property {string|null} [uri] PythonPackage uri + * @property {string|null} [packageName] PythonPackage packageName + * @property {string|null} [version] PythonPackage version + * @property {google.protobuf.ITimestamp|null} [createTime] PythonPackage createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PythonPackage updateTime + */ + + /** + * Constructs a new PythonPackage. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a PythonPackage. + * @implements IPythonPackage + * @constructor + * @param {google.devtools.artifactregistry.v1.IPythonPackage=} [properties] Properties to set + */ + function PythonPackage(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]]; + } + + /** + * PythonPackage name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @instance + */ + PythonPackage.prototype.name = ""; + + /** + * PythonPackage uri. + * @member {string} uri + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @instance + */ + PythonPackage.prototype.uri = ""; + + /** + * PythonPackage packageName. + * @member {string} packageName + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @instance + */ + PythonPackage.prototype.packageName = ""; + + /** + * PythonPackage version. + * @member {string} version + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @instance + */ + PythonPackage.prototype.version = ""; + + /** + * PythonPackage createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @instance + */ + PythonPackage.prototype.createTime = null; + + /** + * PythonPackage updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @instance + */ + PythonPackage.prototype.updateTime = null; + + /** + * Creates a new PythonPackage instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @static + * @param {google.devtools.artifactregistry.v1.IPythonPackage=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.PythonPackage} PythonPackage instance + */ + PythonPackage.create = function create(properties) { + return new PythonPackage(properties); + }; + + /** + * Encodes the specified PythonPackage message. Does not implicitly {@link google.devtools.artifactregistry.v1.PythonPackage.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @static + * @param {google.devtools.artifactregistry.v1.IPythonPackage} message PythonPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonPackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.packageName); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.version); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonPackage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.PythonPackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @static + * @param {google.devtools.artifactregistry.v1.IPythonPackage} message PythonPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonPackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonPackage message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.PythonPackage} PythonPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonPackage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.PythonPackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.packageName = reader.string(); + break; + } + case 4: { + message.version = reader.string(); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonPackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.PythonPackage} PythonPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonPackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonPackage message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonPackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: 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 PythonPackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.PythonPackage} PythonPackage + */ + PythonPackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.PythonPackage) + return object; + var message = new $root.google.devtools.artifactregistry.v1.PythonPackage(); + if (object.name != null) + message.name = String(object.name); + if (object.uri != null) + message.uri = String(object.uri); + if (object.packageName != null) + message.packageName = String(object.packageName); + if (object.version != null) + message.version = String(object.version); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.PythonPackage.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.PythonPackage.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a PythonPackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @static + * @param {google.devtools.artifactregistry.v1.PythonPackage} message PythonPackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonPackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.uri = ""; + object.packageName = ""; + object.version = ""; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + 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 PythonPackage to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @instance + * @returns {Object.} JSON object + */ + PythonPackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonPackage + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.PythonPackage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonPackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.PythonPackage"; + }; + + return PythonPackage; + })(); + + v1.ListPythonPackagesRequest = (function() { + + /** + * Properties of a ListPythonPackagesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListPythonPackagesRequest + * @property {string|null} [parent] ListPythonPackagesRequest parent + * @property {number|null} [pageSize] ListPythonPackagesRequest pageSize + * @property {string|null} [pageToken] ListPythonPackagesRequest pageToken + */ + + /** + * Constructs a new ListPythonPackagesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListPythonPackagesRequest. + * @implements IListPythonPackagesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListPythonPackagesRequest=} [properties] Properties to set + */ + function ListPythonPackagesRequest(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]]; + } + + /** + * ListPythonPackagesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest + * @instance + */ + ListPythonPackagesRequest.prototype.parent = ""; + + /** + * ListPythonPackagesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest + * @instance + */ + ListPythonPackagesRequest.prototype.pageSize = 0; + + /** + * ListPythonPackagesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest + * @instance + */ + ListPythonPackagesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListPythonPackagesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListPythonPackagesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesRequest} ListPythonPackagesRequest instance + */ + ListPythonPackagesRequest.create = function create(properties) { + return new ListPythonPackagesRequest(properties); + }; + + /** + * Encodes the specified ListPythonPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListPythonPackagesRequest} message ListPythonPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPythonPackagesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListPythonPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListPythonPackagesRequest} message ListPythonPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPythonPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPythonPackagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesRequest} ListPythonPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPythonPackagesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListPythonPackagesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPythonPackagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesRequest} ListPythonPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPythonPackagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPythonPackagesRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPythonPackagesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListPythonPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesRequest} ListPythonPackagesRequest + */ + ListPythonPackagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListPythonPackagesRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListPythonPackagesRequest(); + 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 ListPythonPackagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListPythonPackagesRequest} message ListPythonPackagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPythonPackagesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListPythonPackagesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest + * @instance + * @returns {Object.} JSON object + */ + ListPythonPackagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPythonPackagesRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPythonPackagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListPythonPackagesRequest"; + }; + + return ListPythonPackagesRequest; + })(); + + v1.ListPythonPackagesResponse = (function() { + + /** + * Properties of a ListPythonPackagesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListPythonPackagesResponse + * @property {Array.|null} [pythonPackages] ListPythonPackagesResponse pythonPackages + * @property {string|null} [nextPageToken] ListPythonPackagesResponse nextPageToken + */ + + /** + * Constructs a new ListPythonPackagesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListPythonPackagesResponse. + * @implements IListPythonPackagesResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListPythonPackagesResponse=} [properties] Properties to set + */ + function ListPythonPackagesResponse(properties) { + this.pythonPackages = []; + 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]]; + } + + /** + * ListPythonPackagesResponse pythonPackages. + * @member {Array.} pythonPackages + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse + * @instance + */ + ListPythonPackagesResponse.prototype.pythonPackages = $util.emptyArray; + + /** + * ListPythonPackagesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse + * @instance + */ + ListPythonPackagesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPythonPackagesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListPythonPackagesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesResponse} ListPythonPackagesResponse instance + */ + ListPythonPackagesResponse.create = function create(properties) { + return new ListPythonPackagesResponse(properties); + }; + + /** + * Encodes the specified ListPythonPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListPythonPackagesResponse} message ListPythonPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPythonPackagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pythonPackages != null && message.pythonPackages.length) + for (var i = 0; i < message.pythonPackages.length; ++i) + $root.google.devtools.artifactregistry.v1.PythonPackage.encode(message.pythonPackages[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 ListPythonPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListPythonPackagesResponse} message ListPythonPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPythonPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPythonPackagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesResponse} ListPythonPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPythonPackagesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListPythonPackagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.pythonPackages && message.pythonPackages.length)) + message.pythonPackages = []; + message.pythonPackages.push($root.google.devtools.artifactregistry.v1.PythonPackage.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPythonPackagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesResponse} ListPythonPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPythonPackagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPythonPackagesResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPythonPackagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { + if (!Array.isArray(message.pythonPackages)) + return "pythonPackages: array expected"; + for (var i = 0; i < message.pythonPackages.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.PythonPackage.verify(message.pythonPackages[i]); + if (error) + return "pythonPackages." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPythonPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesResponse} ListPythonPackagesResponse + */ + ListPythonPackagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListPythonPackagesResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListPythonPackagesResponse(); + if (object.pythonPackages) { + if (!Array.isArray(object.pythonPackages)) + throw TypeError(".google.devtools.artifactregistry.v1.ListPythonPackagesResponse.pythonPackages: array expected"); + message.pythonPackages = []; + for (var i = 0; i < object.pythonPackages.length; ++i) { + if (typeof object.pythonPackages[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListPythonPackagesResponse.pythonPackages: object expected"); + message.pythonPackages[i] = $root.google.devtools.artifactregistry.v1.PythonPackage.fromObject(object.pythonPackages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPythonPackagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListPythonPackagesResponse} message ListPythonPackagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPythonPackagesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pythonPackages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.pythonPackages && message.pythonPackages.length) { + object.pythonPackages = []; + for (var j = 0; j < message.pythonPackages.length; ++j) + object.pythonPackages[j] = $root.google.devtools.artifactregistry.v1.PythonPackage.toObject(message.pythonPackages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPythonPackagesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse + * @instance + * @returns {Object.} JSON object + */ + ListPythonPackagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPythonPackagesResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPythonPackagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListPythonPackagesResponse"; + }; + + return ListPythonPackagesResponse; + })(); + + v1.GetPythonPackageRequest = (function() { + + /** + * Properties of a GetPythonPackageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetPythonPackageRequest + * @property {string|null} [name] GetPythonPackageRequest name + */ + + /** + * Constructs a new GetPythonPackageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetPythonPackageRequest. + * @implements IGetPythonPackageRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetPythonPackageRequest=} [properties] Properties to set + */ + function GetPythonPackageRequest(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]]; + } + + /** + * GetPythonPackageRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest + * @instance + */ + GetPythonPackageRequest.prototype.name = ""; + + /** + * Creates a new GetPythonPackageRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetPythonPackageRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetPythonPackageRequest} GetPythonPackageRequest instance + */ + GetPythonPackageRequest.create = function create(properties) { + return new GetPythonPackageRequest(properties); + }; + + /** + * Encodes the specified GetPythonPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPythonPackageRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetPythonPackageRequest} message GetPythonPackageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPythonPackageRequest.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 GetPythonPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPythonPackageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetPythonPackageRequest} message GetPythonPackageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPythonPackageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPythonPackageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetPythonPackageRequest} GetPythonPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPythonPackageRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetPythonPackageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPythonPackageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetPythonPackageRequest} GetPythonPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPythonPackageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPythonPackageRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPythonPackageRequest.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 GetPythonPackageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetPythonPackageRequest} GetPythonPackageRequest + */ + GetPythonPackageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetPythonPackageRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetPythonPackageRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPythonPackageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetPythonPackageRequest} message GetPythonPackageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPythonPackageRequest.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 GetPythonPackageRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest + * @instance + * @returns {Object.} JSON object + */ + GetPythonPackageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPythonPackageRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPythonPackageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetPythonPackageRequest"; + }; + + return GetPythonPackageRequest; + })(); + + v1.Attachment = (function() { + + /** + * Properties of an Attachment. + * @memberof google.devtools.artifactregistry.v1 + * @interface IAttachment + * @property {string|null} [name] Attachment name + * @property {string|null} [target] Attachment target + * @property {string|null} [type] Attachment type + * @property {string|null} [attachmentNamespace] Attachment attachmentNamespace + * @property {Object.|null} [annotations] Attachment annotations + * @property {google.protobuf.ITimestamp|null} [createTime] Attachment createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Attachment updateTime + * @property {Array.|null} [files] Attachment files + * @property {string|null} [ociVersionName] Attachment ociVersionName + */ + + /** + * Constructs a new Attachment. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an Attachment. + * @implements IAttachment + * @constructor + * @param {google.devtools.artifactregistry.v1.IAttachment=} [properties] Properties to set + */ + function Attachment(properties) { + this.annotations = {}; + this.files = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Attachment name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.Attachment + * @instance + */ + Attachment.prototype.name = ""; + + /** + * Attachment target. + * @member {string} target + * @memberof google.devtools.artifactregistry.v1.Attachment + * @instance + */ + Attachment.prototype.target = ""; + + /** + * Attachment type. + * @member {string} type + * @memberof google.devtools.artifactregistry.v1.Attachment + * @instance + */ + Attachment.prototype.type = ""; + + /** + * Attachment attachmentNamespace. + * @member {string} attachmentNamespace + * @memberof google.devtools.artifactregistry.v1.Attachment + * @instance + */ + Attachment.prototype.attachmentNamespace = ""; + + /** + * Attachment annotations. + * @member {Object.} annotations + * @memberof google.devtools.artifactregistry.v1.Attachment + * @instance + */ + Attachment.prototype.annotations = $util.emptyObject; + + /** + * Attachment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1.Attachment + * @instance + */ + Attachment.prototype.createTime = null; + + /** + * Attachment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.Attachment + * @instance + */ + Attachment.prototype.updateTime = null; + + /** + * Attachment files. + * @member {Array.} files + * @memberof google.devtools.artifactregistry.v1.Attachment + * @instance + */ + Attachment.prototype.files = $util.emptyArray; + + /** + * Attachment ociVersionName. + * @member {string} ociVersionName + * @memberof google.devtools.artifactregistry.v1.Attachment + * @instance + */ + Attachment.prototype.ociVersionName = ""; + + /** + * Creates a new Attachment instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Attachment + * @static + * @param {google.devtools.artifactregistry.v1.IAttachment=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Attachment} Attachment instance + */ + Attachment.create = function create(properties) { + return new Attachment(properties); + }; + + /** + * Encodes the specified Attachment message. Does not implicitly {@link google.devtools.artifactregistry.v1.Attachment.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Attachment + * @static + * @param {google.devtools.artifactregistry.v1.IAttachment} message Attachment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Attachment.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.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.target); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.attachmentNamespace != null && Object.hasOwnProperty.call(message, "attachmentNamespace")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.attachmentNamespace); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.files != null && message.files.length) + for (var i = 0; i < message.files.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.files[i]); + if (message.ociVersionName != null && Object.hasOwnProperty.call(message, "ociVersionName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.ociVersionName); + return writer; + }; + + /** + * Encodes the specified Attachment message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Attachment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Attachment + * @static + * @param {google.devtools.artifactregistry.v1.IAttachment} message Attachment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Attachment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Attachment message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Attachment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Attachment} Attachment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Attachment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Attachment(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.target = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 4: { + message.attachmentNamespace = reader.string(); + break; + } + case 5: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + 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.annotations[key] = value; + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + if (!(message.files && message.files.length)) + message.files = []; + message.files.push(reader.string()); + break; + } + case 9: { + message.ociVersionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Attachment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Attachment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Attachment} Attachment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Attachment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Attachment message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Attachment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Attachment.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.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.attachmentNamespace != null && message.hasOwnProperty("attachmentNamespace")) + if (!$util.isString(message.attachmentNamespace)) + return "attachmentNamespace: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: 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.files != null && message.hasOwnProperty("files")) { + if (!Array.isArray(message.files)) + return "files: array expected"; + for (var i = 0; i < message.files.length; ++i) + if (!$util.isString(message.files[i])) + return "files: string[] expected"; + } + if (message.ociVersionName != null && message.hasOwnProperty("ociVersionName")) + if (!$util.isString(message.ociVersionName)) + return "ociVersionName: string expected"; + return null; + }; + + /** + * Creates an Attachment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Attachment + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Attachment} Attachment + */ + Attachment.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Attachment) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Attachment(); + if (object.name != null) + message.name = String(object.name); + if (object.target != null) + message.target = String(object.target); + if (object.type != null) + message.type = String(object.type); + if (object.attachmentNamespace != null) + message.attachmentNamespace = String(object.attachmentNamespace); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Attachment.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Attachment.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Attachment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.files) { + if (!Array.isArray(object.files)) + throw TypeError(".google.devtools.artifactregistry.v1.Attachment.files: array expected"); + message.files = []; + for (var i = 0; i < object.files.length; ++i) + message.files[i] = String(object.files[i]); + } + if (object.ociVersionName != null) + message.ociVersionName = String(object.ociVersionName); + return message; + }; + + /** + * Creates a plain object from an Attachment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Attachment + * @static + * @param {google.devtools.artifactregistry.v1.Attachment} message Attachment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Attachment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.files = []; + if (options.objects || options.defaults) + object.annotations = {}; + if (options.defaults) { + object.name = ""; + object.target = ""; + object.type = ""; + object.attachmentNamespace = ""; + object.createTime = null; + object.updateTime = null; + object.ociVersionName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.attachmentNamespace != null && message.hasOwnProperty("attachmentNamespace")) + object.attachmentNamespace = message.attachmentNamespace; + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[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.files && message.files.length) { + object.files = []; + for (var j = 0; j < message.files.length; ++j) + object.files[j] = message.files[j]; + } + if (message.ociVersionName != null && message.hasOwnProperty("ociVersionName")) + object.ociVersionName = message.ociVersionName; + return object; + }; + + /** + * Converts this Attachment to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Attachment + * @instance + * @returns {Object.} JSON object + */ + Attachment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Attachment + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.Attachment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Attachment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Attachment"; + }; + + return Attachment; + })(); + + v1.ListAttachmentsRequest = (function() { + + /** + * Properties of a ListAttachmentsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListAttachmentsRequest + * @property {string|null} [parent] ListAttachmentsRequest parent + * @property {string|null} [filter] ListAttachmentsRequest filter + * @property {number|null} [pageSize] ListAttachmentsRequest pageSize + * @property {string|null} [pageToken] ListAttachmentsRequest pageToken + */ + + /** + * Constructs a new ListAttachmentsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListAttachmentsRequest. + * @implements IListAttachmentsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListAttachmentsRequest=} [properties] Properties to set + */ + function ListAttachmentsRequest(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]]; + } + + /** + * ListAttachmentsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest + * @instance + */ + ListAttachmentsRequest.prototype.parent = ""; + + /** + * ListAttachmentsRequest filter. + * @member {string} filter + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest + * @instance + */ + ListAttachmentsRequest.prototype.filter = ""; + + /** + * ListAttachmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest + * @instance + */ + ListAttachmentsRequest.prototype.pageSize = 0; + + /** + * ListAttachmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest + * @instance + */ + ListAttachmentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAttachmentsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListAttachmentsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListAttachmentsRequest} ListAttachmentsRequest instance + */ + ListAttachmentsRequest.create = function create(properties) { + return new ListAttachmentsRequest(properties); + }; + + /** + * Encodes the specified ListAttachmentsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListAttachmentsRequest} message ListAttachmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAttachmentsRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListAttachmentsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListAttachmentsRequest} message ListAttachmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAttachmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAttachmentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListAttachmentsRequest} ListAttachmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAttachmentsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListAttachmentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAttachmentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListAttachmentsRequest} ListAttachmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAttachmentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAttachmentsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAttachmentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListAttachmentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListAttachmentsRequest} ListAttachmentsRequest + */ + ListAttachmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListAttachmentsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListAttachmentsRequest(); + 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 ListAttachmentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListAttachmentsRequest} message ListAttachmentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAttachmentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + 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 ListAttachmentsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAttachmentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAttachmentsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAttachmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListAttachmentsRequest"; + }; + + return ListAttachmentsRequest; + })(); + + v1.ListAttachmentsResponse = (function() { + + /** + * Properties of a ListAttachmentsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListAttachmentsResponse + * @property {Array.|null} [attachments] ListAttachmentsResponse attachments + * @property {string|null} [nextPageToken] ListAttachmentsResponse nextPageToken + */ + + /** + * Constructs a new ListAttachmentsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListAttachmentsResponse. + * @implements IListAttachmentsResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListAttachmentsResponse=} [properties] Properties to set + */ + function ListAttachmentsResponse(properties) { + this.attachments = []; + 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]]; + } + + /** + * ListAttachmentsResponse attachments. + * @member {Array.} attachments + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse + * @instance + */ + ListAttachmentsResponse.prototype.attachments = $util.emptyArray; + + /** + * ListAttachmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse + * @instance + */ + ListAttachmentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAttachmentsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListAttachmentsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListAttachmentsResponse} ListAttachmentsResponse instance + */ + ListAttachmentsResponse.create = function create(properties) { + return new ListAttachmentsResponse(properties); + }; + + /** + * Encodes the specified ListAttachmentsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListAttachmentsResponse} message ListAttachmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAttachmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attachments != null && message.attachments.length) + for (var i = 0; i < message.attachments.length; ++i) + $root.google.devtools.artifactregistry.v1.Attachment.encode(message.attachments[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 ListAttachmentsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListAttachmentsResponse} message ListAttachmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAttachmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAttachmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListAttachmentsResponse} ListAttachmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAttachmentsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListAttachmentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.attachments && message.attachments.length)) + message.attachments = []; + message.attachments.push($root.google.devtools.artifactregistry.v1.Attachment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAttachmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListAttachmentsResponse} ListAttachmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAttachmentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAttachmentsResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAttachmentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attachments != null && message.hasOwnProperty("attachments")) { + if (!Array.isArray(message.attachments)) + return "attachments: array expected"; + for (var i = 0; i < message.attachments.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Attachment.verify(message.attachments[i]); + if (error) + return "attachments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAttachmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListAttachmentsResponse} ListAttachmentsResponse + */ + ListAttachmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListAttachmentsResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListAttachmentsResponse(); + if (object.attachments) { + if (!Array.isArray(object.attachments)) + throw TypeError(".google.devtools.artifactregistry.v1.ListAttachmentsResponse.attachments: array expected"); + message.attachments = []; + for (var i = 0; i < object.attachments.length; ++i) { + if (typeof object.attachments[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListAttachmentsResponse.attachments: object expected"); + message.attachments[i] = $root.google.devtools.artifactregistry.v1.Attachment.fromObject(object.attachments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAttachmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListAttachmentsResponse} message ListAttachmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAttachmentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attachments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.attachments && message.attachments.length) { + object.attachments = []; + for (var j = 0; j < message.attachments.length; ++j) + object.attachments[j] = $root.google.devtools.artifactregistry.v1.Attachment.toObject(message.attachments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAttachmentsResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAttachmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAttachmentsResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAttachmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListAttachmentsResponse"; + }; + + return ListAttachmentsResponse; + })(); + + v1.GetAttachmentRequest = (function() { + + /** + * Properties of a GetAttachmentRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetAttachmentRequest + * @property {string|null} [name] GetAttachmentRequest name + */ + + /** + * Constructs a new GetAttachmentRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetAttachmentRequest. + * @implements IGetAttachmentRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetAttachmentRequest=} [properties] Properties to set + */ + function GetAttachmentRequest(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]]; + } + + /** + * GetAttachmentRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest + * @instance + */ + GetAttachmentRequest.prototype.name = ""; + + /** + * Creates a new GetAttachmentRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetAttachmentRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetAttachmentRequest} GetAttachmentRequest instance + */ + GetAttachmentRequest.create = function create(properties) { + return new GetAttachmentRequest(properties); + }; + + /** + * Encodes the specified GetAttachmentRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetAttachmentRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetAttachmentRequest} message GetAttachmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAttachmentRequest.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 GetAttachmentRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetAttachmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetAttachmentRequest} message GetAttachmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAttachmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAttachmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetAttachmentRequest} GetAttachmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAttachmentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetAttachmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAttachmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetAttachmentRequest} GetAttachmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAttachmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAttachmentRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAttachmentRequest.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 GetAttachmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetAttachmentRequest} GetAttachmentRequest + */ + GetAttachmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetAttachmentRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetAttachmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAttachmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetAttachmentRequest} message GetAttachmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAttachmentRequest.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 GetAttachmentRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest + * @instance + * @returns {Object.} JSON object + */ + GetAttachmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAttachmentRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAttachmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetAttachmentRequest"; + }; + + return GetAttachmentRequest; + })(); + + v1.CreateAttachmentRequest = (function() { + + /** + * Properties of a CreateAttachmentRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface ICreateAttachmentRequest + * @property {string|null} [parent] CreateAttachmentRequest parent + * @property {string|null} [attachmentId] CreateAttachmentRequest attachmentId + * @property {google.devtools.artifactregistry.v1.IAttachment|null} [attachment] CreateAttachmentRequest attachment + */ + + /** + * Constructs a new CreateAttachmentRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a CreateAttachmentRequest. + * @implements ICreateAttachmentRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.ICreateAttachmentRequest=} [properties] Properties to set + */ + function CreateAttachmentRequest(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]]; + } + + /** + * CreateAttachmentRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest + * @instance + */ + CreateAttachmentRequest.prototype.parent = ""; + + /** + * CreateAttachmentRequest attachmentId. + * @member {string} attachmentId + * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest + * @instance + */ + CreateAttachmentRequest.prototype.attachmentId = ""; + + /** + * CreateAttachmentRequest attachment. + * @member {google.devtools.artifactregistry.v1.IAttachment|null|undefined} attachment + * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest + * @instance + */ + CreateAttachmentRequest.prototype.attachment = null; + + /** + * Creates a new CreateAttachmentRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateAttachmentRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.CreateAttachmentRequest} CreateAttachmentRequest instance + */ + CreateAttachmentRequest.create = function create(properties) { + return new CreateAttachmentRequest(properties); + }; + + /** + * Encodes the specified CreateAttachmentRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateAttachmentRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateAttachmentRequest} message CreateAttachmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAttachmentRequest.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.attachmentId != null && Object.hasOwnProperty.call(message, "attachmentId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.attachmentId); + if (message.attachment != null && Object.hasOwnProperty.call(message, "attachment")) + $root.google.devtools.artifactregistry.v1.Attachment.encode(message.attachment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateAttachmentRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateAttachmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateAttachmentRequest} message CreateAttachmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAttachmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAttachmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.CreateAttachmentRequest} CreateAttachmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAttachmentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.CreateAttachmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.attachmentId = reader.string(); + break; + } + case 3: { + message.attachment = $root.google.devtools.artifactregistry.v1.Attachment.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAttachmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.CreateAttachmentRequest} CreateAttachmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAttachmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAttachmentRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAttachmentRequest.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.attachmentId != null && message.hasOwnProperty("attachmentId")) + if (!$util.isString(message.attachmentId)) + return "attachmentId: string expected"; + if (message.attachment != null && message.hasOwnProperty("attachment")) { + var error = $root.google.devtools.artifactregistry.v1.Attachment.verify(message.attachment); + if (error) + return "attachment." + error; + } + return null; + }; + + /** + * Creates a CreateAttachmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.CreateAttachmentRequest} CreateAttachmentRequest + */ + CreateAttachmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.CreateAttachmentRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.CreateAttachmentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.attachmentId != null) + message.attachmentId = String(object.attachmentId); + if (object.attachment != null) { + if (typeof object.attachment !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.CreateAttachmentRequest.attachment: object expected"); + message.attachment = $root.google.devtools.artifactregistry.v1.Attachment.fromObject(object.attachment); + } + return message; + }; + + /** + * Creates a plain object from a CreateAttachmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest + * @static + * @param {google.devtools.artifactregistry.v1.CreateAttachmentRequest} message CreateAttachmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAttachmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.attachmentId = ""; + object.attachment = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.attachmentId != null && message.hasOwnProperty("attachmentId")) + object.attachmentId = message.attachmentId; + if (message.attachment != null && message.hasOwnProperty("attachment")) + object.attachment = $root.google.devtools.artifactregistry.v1.Attachment.toObject(message.attachment, options); + return object; + }; + + /** + * Converts this CreateAttachmentRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAttachmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAttachmentRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAttachmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.CreateAttachmentRequest"; + }; + + return CreateAttachmentRequest; + })(); + + v1.DeleteAttachmentRequest = (function() { + + /** + * Properties of a DeleteAttachmentRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IDeleteAttachmentRequest + * @property {string|null} [name] DeleteAttachmentRequest name + */ + + /** + * Constructs a new DeleteAttachmentRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a DeleteAttachmentRequest. + * @implements IDeleteAttachmentRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IDeleteAttachmentRequest=} [properties] Properties to set + */ + function DeleteAttachmentRequest(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]]; + } + + /** + * DeleteAttachmentRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest + * @instance + */ + DeleteAttachmentRequest.prototype.name = ""; + + /** + * Creates a new DeleteAttachmentRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteAttachmentRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.DeleteAttachmentRequest} DeleteAttachmentRequest instance + */ + DeleteAttachmentRequest.create = function create(properties) { + return new DeleteAttachmentRequest(properties); + }; + + /** + * Encodes the specified DeleteAttachmentRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteAttachmentRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteAttachmentRequest} message DeleteAttachmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAttachmentRequest.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 DeleteAttachmentRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteAttachmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteAttachmentRequest} message DeleteAttachmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAttachmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteAttachmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.DeleteAttachmentRequest} DeleteAttachmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAttachmentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DeleteAttachmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteAttachmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.DeleteAttachmentRequest} DeleteAttachmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAttachmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAttachmentRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAttachmentRequest.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 DeleteAttachmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.DeleteAttachmentRequest} DeleteAttachmentRequest + */ + DeleteAttachmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteAttachmentRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.DeleteAttachmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteAttachmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest + * @static + * @param {google.devtools.artifactregistry.v1.DeleteAttachmentRequest} message DeleteAttachmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAttachmentRequest.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 DeleteAttachmentRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAttachmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteAttachmentRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAttachmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DeleteAttachmentRequest"; + }; + + return DeleteAttachmentRequest; + })(); + + v1.ExportArtifactRequest = (function() { + + /** + * Properties of an ExportArtifactRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IExportArtifactRequest + * @property {string|null} [sourceVersion] ExportArtifactRequest sourceVersion + * @property {string|null} [sourceTag] ExportArtifactRequest sourceTag + * @property {string|null} [gcsPath] ExportArtifactRequest gcsPath + * @property {string|null} [repository] ExportArtifactRequest repository + */ + + /** + * Constructs a new ExportArtifactRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ExportArtifactRequest. + * @implements IExportArtifactRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IExportArtifactRequest=} [properties] Properties to set + */ + function ExportArtifactRequest(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]]; + } + + /** + * ExportArtifactRequest sourceVersion. + * @member {string|null|undefined} sourceVersion + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @instance + */ + ExportArtifactRequest.prototype.sourceVersion = null; + + /** + * ExportArtifactRequest sourceTag. + * @member {string|null|undefined} sourceTag + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @instance + */ + ExportArtifactRequest.prototype.sourceTag = null; + + /** + * ExportArtifactRequest gcsPath. + * @member {string|null|undefined} gcsPath + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @instance + */ + ExportArtifactRequest.prototype.gcsPath = null; + + /** + * ExportArtifactRequest repository. + * @member {string} repository + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @instance + */ + ExportArtifactRequest.prototype.repository = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExportArtifactRequest sourceArtifact. + * @member {"sourceVersion"|"sourceTag"|undefined} sourceArtifact + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @instance + */ + Object.defineProperty(ExportArtifactRequest.prototype, "sourceArtifact", { + get: $util.oneOfGetter($oneOfFields = ["sourceVersion", "sourceTag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ExportArtifactRequest destination. + * @member {"gcsPath"|undefined} destination + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @instance + */ + Object.defineProperty(ExportArtifactRequest.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportArtifactRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @static + * @param {google.devtools.artifactregistry.v1.IExportArtifactRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ExportArtifactRequest} ExportArtifactRequest instance + */ + ExportArtifactRequest.create = function create(properties) { + return new ExportArtifactRequest(properties); + }; + + /** + * Encodes the specified ExportArtifactRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @static + * @param {google.devtools.artifactregistry.v1.IExportArtifactRequest} message ExportArtifactRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportArtifactRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.repository); + if (message.sourceVersion != null && Object.hasOwnProperty.call(message, "sourceVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceVersion); + if (message.gcsPath != null && Object.hasOwnProperty.call(message, "gcsPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.gcsPath); + if (message.sourceTag != null && Object.hasOwnProperty.call(message, "sourceTag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sourceTag); + return writer; + }; + + /** + * Encodes the specified ExportArtifactRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @static + * @param {google.devtools.artifactregistry.v1.IExportArtifactRequest} message ExportArtifactRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportArtifactRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportArtifactRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ExportArtifactRequest} ExportArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportArtifactRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ExportArtifactRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.sourceVersion = reader.string(); + break; + } + case 4: { + message.sourceTag = reader.string(); + break; + } + case 3: { + message.gcsPath = reader.string(); + break; + } + case 1: { + message.repository = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportArtifactRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ExportArtifactRequest} ExportArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportArtifactRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportArtifactRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportArtifactRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sourceVersion != null && message.hasOwnProperty("sourceVersion")) { + properties.sourceArtifact = 1; + if (!$util.isString(message.sourceVersion)) + return "sourceVersion: string expected"; + } + if (message.sourceTag != null && message.hasOwnProperty("sourceTag")) { + if (properties.sourceArtifact === 1) + return "sourceArtifact: multiple values"; + properties.sourceArtifact = 1; + if (!$util.isString(message.sourceTag)) + return "sourceTag: string expected"; + } + if (message.gcsPath != null && message.hasOwnProperty("gcsPath")) { + properties.destination = 1; + if (!$util.isString(message.gcsPath)) + return "gcsPath: string expected"; + } + if (message.repository != null && message.hasOwnProperty("repository")) + if (!$util.isString(message.repository)) + return "repository: string expected"; + return null; + }; + + /** + * Creates an ExportArtifactRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ExportArtifactRequest} ExportArtifactRequest + */ + ExportArtifactRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ExportArtifactRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ExportArtifactRequest(); + if (object.sourceVersion != null) + message.sourceVersion = String(object.sourceVersion); + if (object.sourceTag != null) + message.sourceTag = String(object.sourceTag); + if (object.gcsPath != null) + message.gcsPath = String(object.gcsPath); + if (object.repository != null) + message.repository = String(object.repository); + return message; + }; + + /** + * Creates a plain object from an ExportArtifactRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @static + * @param {google.devtools.artifactregistry.v1.ExportArtifactRequest} message ExportArtifactRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportArtifactRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.repository = ""; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = message.repository; + if (message.sourceVersion != null && message.hasOwnProperty("sourceVersion")) { + object.sourceVersion = message.sourceVersion; + if (options.oneofs) + object.sourceArtifact = "sourceVersion"; + } + if (message.gcsPath != null && message.hasOwnProperty("gcsPath")) { + object.gcsPath = message.gcsPath; + if (options.oneofs) + object.destination = "gcsPath"; + } + if (message.sourceTag != null && message.hasOwnProperty("sourceTag")) { + object.sourceTag = message.sourceTag; + if (options.oneofs) + object.sourceArtifact = "sourceTag"; + } + return object; + }; + + /** + * Converts this ExportArtifactRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @instance + * @returns {Object.} JSON object + */ + ExportArtifactRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportArtifactRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportArtifactRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ExportArtifactRequest"; + }; + + return ExportArtifactRequest; + })(); + + v1.ExportArtifactResponse = (function() { + + /** + * Properties of an ExportArtifactResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IExportArtifactResponse + * @property {google.devtools.artifactregistry.v1.IVersion|null} [exportedVersion] ExportArtifactResponse exportedVersion + */ + + /** + * Constructs a new ExportArtifactResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ExportArtifactResponse. + * @implements IExportArtifactResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IExportArtifactResponse=} [properties] Properties to set + */ + function ExportArtifactResponse(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]]; + } + + /** + * ExportArtifactResponse exportedVersion. + * @member {google.devtools.artifactregistry.v1.IVersion|null|undefined} exportedVersion + * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse + * @instance + */ + ExportArtifactResponse.prototype.exportedVersion = null; + + /** + * Creates a new ExportArtifactResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse + * @static + * @param {google.devtools.artifactregistry.v1.IExportArtifactResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ExportArtifactResponse} ExportArtifactResponse instance + */ + ExportArtifactResponse.create = function create(properties) { + return new ExportArtifactResponse(properties); + }; + + /** + * Encodes the specified ExportArtifactResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse + * @static + * @param {google.devtools.artifactregistry.v1.IExportArtifactResponse} message ExportArtifactResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportArtifactResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exportedVersion != null && Object.hasOwnProperty.call(message, "exportedVersion")) + $root.google.devtools.artifactregistry.v1.Version.encode(message.exportedVersion, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExportArtifactResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse + * @static + * @param {google.devtools.artifactregistry.v1.IExportArtifactResponse} message ExportArtifactResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportArtifactResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportArtifactResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ExportArtifactResponse} ExportArtifactResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportArtifactResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ExportArtifactResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.exportedVersion = $root.google.devtools.artifactregistry.v1.Version.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportArtifactResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ExportArtifactResponse} ExportArtifactResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportArtifactResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportArtifactResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportArtifactResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.exportedVersion != null && message.hasOwnProperty("exportedVersion")) { + var error = $root.google.devtools.artifactregistry.v1.Version.verify(message.exportedVersion); + if (error) + return "exportedVersion." + error; + } + return null; + }; + + /** + * Creates an ExportArtifactResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ExportArtifactResponse} ExportArtifactResponse + */ + ExportArtifactResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ExportArtifactResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ExportArtifactResponse(); + if (object.exportedVersion != null) { + if (typeof object.exportedVersion !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ExportArtifactResponse.exportedVersion: object expected"); + message.exportedVersion = $root.google.devtools.artifactregistry.v1.Version.fromObject(object.exportedVersion); + } + return message; + }; + + /** + * Creates a plain object from an ExportArtifactResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse + * @static + * @param {google.devtools.artifactregistry.v1.ExportArtifactResponse} message ExportArtifactResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportArtifactResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.exportedVersion = null; + if (message.exportedVersion != null && message.hasOwnProperty("exportedVersion")) + object.exportedVersion = $root.google.devtools.artifactregistry.v1.Version.toObject(message.exportedVersion, options); + return object; + }; + + /** + * Converts this ExportArtifactResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse + * @instance + * @returns {Object.} JSON object + */ + ExportArtifactResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportArtifactResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportArtifactResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ExportArtifactResponse"; + }; + + return ExportArtifactResponse; + })(); + + v1.ExportArtifactMetadata = (function() { + + /** + * Properties of an ExportArtifactMetadata. + * @memberof google.devtools.artifactregistry.v1 + * @interface IExportArtifactMetadata + * @property {Array.|null} [exportedFiles] ExportArtifactMetadata exportedFiles + */ + + /** + * Constructs a new ExportArtifactMetadata. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ExportArtifactMetadata. + * @implements IExportArtifactMetadata + * @constructor + * @param {google.devtools.artifactregistry.v1.IExportArtifactMetadata=} [properties] Properties to set + */ + function ExportArtifactMetadata(properties) { + this.exportedFiles = []; + 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]]; + } + + /** + * ExportArtifactMetadata exportedFiles. + * @member {Array.} exportedFiles + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata + * @instance + */ + ExportArtifactMetadata.prototype.exportedFiles = $util.emptyArray; + + /** + * Creates a new ExportArtifactMetadata instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IExportArtifactMetadata=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata} ExportArtifactMetadata instance + */ + ExportArtifactMetadata.create = function create(properties) { + return new ExportArtifactMetadata(properties); + }; + + /** + * Encodes the specified ExportArtifactMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IExportArtifactMetadata} message ExportArtifactMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportArtifactMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exportedFiles != null && message.exportedFiles.length) + for (var i = 0; i < message.exportedFiles.length; ++i) + $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.encode(message.exportedFiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExportArtifactMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IExportArtifactMetadata} message ExportArtifactMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportArtifactMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportArtifactMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata} ExportArtifactMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportArtifactMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.exportedFiles && message.exportedFiles.length)) + message.exportedFiles = []; + message.exportedFiles.push($root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportArtifactMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata} ExportArtifactMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportArtifactMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportArtifactMetadata message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportArtifactMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.exportedFiles != null && message.hasOwnProperty("exportedFiles")) { + if (!Array.isArray(message.exportedFiles)) + return "exportedFiles: array expected"; + for (var i = 0; i < message.exportedFiles.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.verify(message.exportedFiles[i]); + if (error) + return "exportedFiles." + error; + } + } + return null; + }; + + /** + * Creates an ExportArtifactMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata} ExportArtifactMetadata + */ + ExportArtifactMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata(); + if (object.exportedFiles) { + if (!Array.isArray(object.exportedFiles)) + throw TypeError(".google.devtools.artifactregistry.v1.ExportArtifactMetadata.exportedFiles: array expected"); + message.exportedFiles = []; + for (var i = 0; i < object.exportedFiles.length; ++i) { + if (typeof object.exportedFiles[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ExportArtifactMetadata.exportedFiles: object expected"); + message.exportedFiles[i] = $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.fromObject(object.exportedFiles[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExportArtifactMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata + * @static + * @param {google.devtools.artifactregistry.v1.ExportArtifactMetadata} message ExportArtifactMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportArtifactMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exportedFiles = []; + if (message.exportedFiles && message.exportedFiles.length) { + object.exportedFiles = []; + for (var j = 0; j < message.exportedFiles.length; ++j) + object.exportedFiles[j] = $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.toObject(message.exportedFiles[j], options); + } + return object; + }; + + /** + * Converts this ExportArtifactMetadata to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata + * @instance + * @returns {Object.} JSON object + */ + ExportArtifactMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportArtifactMetadata + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportArtifactMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ExportArtifactMetadata"; + }; + + ExportArtifactMetadata.ExportedFile = (function() { + + /** + * Properties of an ExportedFile. + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata + * @interface IExportedFile + * @property {string|null} [gcsObjectPath] ExportedFile gcsObjectPath + * @property {string|null} [name] ExportedFile name + * @property {Array.|null} [hashes] ExportedFile hashes + */ + + /** + * Constructs a new ExportedFile. + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata + * @classdesc Represents an ExportedFile. + * @implements IExportedFile + * @constructor + * @param {google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile=} [properties] Properties to set + */ + function ExportedFile(properties) { + this.hashes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportedFile gcsObjectPath. + * @member {string|null|undefined} gcsObjectPath + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile + * @instance + */ + ExportedFile.prototype.gcsObjectPath = null; + + /** + * ExportedFile name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile + * @instance + */ + ExportedFile.prototype.name = ""; + + /** + * ExportedFile hashes. + * @member {Array.} hashes + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile + * @instance + */ + ExportedFile.prototype.hashes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExportedFile destination. + * @member {"gcsObjectPath"|undefined} destination + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile + * @instance + */ + Object.defineProperty(ExportedFile.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsObjectPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportedFile instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile + * @static + * @param {google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile} ExportedFile instance + */ + ExportedFile.create = function create(properties) { + return new ExportedFile(properties); + }; + + /** + * Encodes the specified ExportedFile message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile + * @static + * @param {google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile} message ExportedFile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportedFile.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.gcsObjectPath != null && Object.hasOwnProperty.call(message, "gcsObjectPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsObjectPath); + if (message.hashes != null && message.hashes.length) + for (var i = 0; i < message.hashes.length; ++i) + $root.google.devtools.artifactregistry.v1.Hash.encode(message.hashes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExportedFile message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile + * @static + * @param {google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile} message ExportedFile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportedFile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportedFile message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile} ExportedFile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportedFile.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.gcsObjectPath = reader.string(); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.hashes && message.hashes.length)) + message.hashes = []; + message.hashes.push($root.google.devtools.artifactregistry.v1.Hash.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportedFile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile} ExportedFile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportedFile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportedFile message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportedFile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsObjectPath != null && message.hasOwnProperty("gcsObjectPath")) { + properties.destination = 1; + if (!$util.isString(message.gcsObjectPath)) + return "gcsObjectPath: string expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.hashes != null && message.hasOwnProperty("hashes")) { + if (!Array.isArray(message.hashes)) + return "hashes: array expected"; + for (var i = 0; i < message.hashes.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Hash.verify(message.hashes[i]); + if (error) + return "hashes." + error; + } + } + return null; + }; + + /** + * Creates an ExportedFile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile} ExportedFile + */ + ExportedFile.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile(); + if (object.gcsObjectPath != null) + message.gcsObjectPath = String(object.gcsObjectPath); + if (object.name != null) + message.name = String(object.name); + if (object.hashes) { + if (!Array.isArray(object.hashes)) + throw TypeError(".google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.hashes: array expected"); + message.hashes = []; + for (var i = 0; i < object.hashes.length; ++i) { + if (typeof object.hashes[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.hashes: object expected"); + message.hashes[i] = $root.google.devtools.artifactregistry.v1.Hash.fromObject(object.hashes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExportedFile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile + * @static + * @param {google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile} message ExportedFile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportedFile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.hashes = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.gcsObjectPath != null && message.hasOwnProperty("gcsObjectPath")) { + object.gcsObjectPath = message.gcsObjectPath; + if (options.oneofs) + object.destination = "gcsObjectPath"; + } + if (message.hashes && message.hashes.length) { + object.hashes = []; + for (var j = 0; j < message.hashes.length; ++j) + object.hashes[j] = $root.google.devtools.artifactregistry.v1.Hash.toObject(message.hashes[j], options); + } + return object; + }; + + /** + * Converts this ExportedFile to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile + * @instance + * @returns {Object.} JSON object + */ + ExportedFile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportedFile + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportedFile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile"; + }; + + return ExportedFile; + })(); + + return ExportArtifactMetadata; + })(); + + v1.Hash = (function() { + + /** + * Properties of a Hash. + * @memberof google.devtools.artifactregistry.v1 + * @interface IHash + * @property {google.devtools.artifactregistry.v1.Hash.HashType|null} [type] Hash type + * @property {Uint8Array|null} [value] Hash value + */ + + /** + * Constructs a new Hash. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a Hash. + * @implements IHash + * @constructor + * @param {google.devtools.artifactregistry.v1.IHash=} [properties] Properties to set + */ + function Hash(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Hash type. + * @member {google.devtools.artifactregistry.v1.Hash.HashType} type + * @memberof google.devtools.artifactregistry.v1.Hash + * @instance + */ + Hash.prototype.type = 0; + + /** + * Hash value. + * @member {Uint8Array} value + * @memberof google.devtools.artifactregistry.v1.Hash + * @instance + */ + Hash.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Hash instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {google.devtools.artifactregistry.v1.IHash=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Hash} Hash instance + */ + Hash.create = function create(properties) { + return new Hash(properties); + }; + + /** + * Encodes the specified Hash message. Does not implicitly {@link google.devtools.artifactregistry.v1.Hash.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {google.devtools.artifactregistry.v1.IHash} message Hash message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Hash.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Hash message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Hash.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {google.devtools.artifactregistry.v1.IHash} message Hash message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Hash.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Hash message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Hash} Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Hash.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Hash(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Hash message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Hash} Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Hash.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Hash message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Hash.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a Hash message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Hash} Hash + */ + Hash.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Hash) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Hash(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + 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 >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a Hash message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {google.devtools.artifactregistry.v1.Hash} message Hash + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Hash.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "HASH_TYPE_UNSPECIFIED" : 0; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.devtools.artifactregistry.v1.Hash.HashType[message.type] === undefined ? message.type : $root.google.devtools.artifactregistry.v1.Hash.HashType[message.type] : message.type; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Hash to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Hash + * @instance + * @returns {Object.} JSON object + */ + Hash.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Hash + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Hash.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Hash"; + }; + + /** + * HashType enum. + * @name google.devtools.artifactregistry.v1.Hash.HashType + * @enum {number} + * @property {number} HASH_TYPE_UNSPECIFIED=0 HASH_TYPE_UNSPECIFIED value + * @property {number} SHA256=1 SHA256 value + * @property {number} MD5=2 MD5 value + */ + Hash.HashType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HASH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SHA256"] = 1; + values[valuesById[2] = "MD5"] = 2; + return values; + })(); + + return Hash; + })(); + + v1.File = (function() { + + /** + * Properties of a File. + * @memberof google.devtools.artifactregistry.v1 + * @interface IFile + * @property {string|null} [name] File name + * @property {number|Long|null} [sizeBytes] File sizeBytes + * @property {Array.|null} [hashes] File hashes + * @property {google.protobuf.ITimestamp|null} [createTime] File createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] File updateTime + * @property {string|null} [owner] File owner + * @property {google.protobuf.ITimestamp|null} [fetchTime] File fetchTime + * @property {Object.|null} [annotations] File annotations + */ + + /** + * Constructs a new File. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a File. + * @implements IFile + * @constructor + * @param {google.devtools.artifactregistry.v1.IFile=} [properties] Properties to set + */ + function File(properties) { + this.hashes = []; + this.annotations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * File name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.File + * @instance + */ + File.prototype.name = ""; + + /** + * File sizeBytes. + * @member {number|Long} sizeBytes + * @memberof google.devtools.artifactregistry.v1.File + * @instance + */ + File.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * File hashes. + * @member {Array.} hashes + * @memberof google.devtools.artifactregistry.v1.File + * @instance + */ + File.prototype.hashes = $util.emptyArray; + + /** + * File createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1.File + * @instance + */ + File.prototype.createTime = null; + + /** + * File updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.File + * @instance + */ + File.prototype.updateTime = null; + + /** + * File owner. + * @member {string} owner + * @memberof google.devtools.artifactregistry.v1.File + * @instance + */ + File.prototype.owner = ""; + + /** + * File fetchTime. + * @member {google.protobuf.ITimestamp|null|undefined} fetchTime + * @memberof google.devtools.artifactregistry.v1.File + * @instance + */ + File.prototype.fetchTime = null; + + /** + * File annotations. + * @member {Object.} annotations + * @memberof google.devtools.artifactregistry.v1.File + * @instance + */ + File.prototype.annotations = $util.emptyObject; + + /** + * Creates a new File instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {google.devtools.artifactregistry.v1.IFile=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.File} File instance + */ + File.create = function create(properties) { + return new File(properties); + }; + + /** + * Encodes the specified File message. Does not implicitly {@link google.devtools.artifactregistry.v1.File.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {google.devtools.artifactregistry.v1.IFile} message File message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + File.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.sizeBytes); + if (message.hashes != null && message.hashes.length) + for (var i = 0; i < message.hashes.length; ++i) + $root.google.devtools.artifactregistry.v1.Hash.encode(message.hashes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.owner); + if (message.fetchTime != null && Object.hasOwnProperty.call(message, "fetchTime")) + $root.google.protobuf.Timestamp.encode(message.fetchTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified File message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.File.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {google.devtools.artifactregistry.v1.IFile} message File message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + File.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a File message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.File} File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + File.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.File(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.sizeBytes = reader.int64(); + break; + } + case 4: { + if (!(message.hashes && message.hashes.length)) + message.hashes = []; + message.hashes.push($root.google.devtools.artifactregistry.v1.Hash.decode(reader, reader.uint32())); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.owner = reader.string(); + break; + } + case 8: { + message.fetchTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + 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.annotations[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a File message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.File} File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + File.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a File message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + File.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high))) + return "sizeBytes: integer|Long expected"; + if (message.hashes != null && message.hasOwnProperty("hashes")) { + if (!Array.isArray(message.hashes)) + return "hashes: array expected"; + for (var i = 0; i < message.hashes.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Hash.verify(message.hashes[i]); + if (error) + return "hashes." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.owner != null && message.hasOwnProperty("owner")) + if (!$util.isString(message.owner)) + return "owner: string expected"; + if (message.fetchTime != null && message.hasOwnProperty("fetchTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.fetchTime); + if (error) + return "fetchTime." + error; + } + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a File message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.File} File + */ + File.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.File) + return object; + var message = new $root.google.devtools.artifactregistry.v1.File(); + if (object.name != null) + message.name = String(object.name); + if (object.sizeBytes != null) + if ($util.Long) + (message.sizeBytes = $util.Long.fromValue(object.sizeBytes)).unsigned = false; + else if (typeof object.sizeBytes === "string") + message.sizeBytes = parseInt(object.sizeBytes, 10); + else if (typeof object.sizeBytes === "number") + message.sizeBytes = object.sizeBytes; + else if (typeof object.sizeBytes === "object") + message.sizeBytes = new $util.LongBits(object.sizeBytes.low >>> 0, object.sizeBytes.high >>> 0).toNumber(); + if (object.hashes) { + if (!Array.isArray(object.hashes)) + throw TypeError(".google.devtools.artifactregistry.v1.File.hashes: array expected"); + message.hashes = []; + for (var i = 0; i < object.hashes.length; ++i) { + if (typeof object.hashes[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.File.hashes: object expected"); + message.hashes[i] = $root.google.devtools.artifactregistry.v1.Hash.fromObject(object.hashes[i]); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.File.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.File.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.owner != null) + message.owner = String(object.owner); + if (object.fetchTime != null) { + if (typeof object.fetchTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.File.fetchTime: object expected"); + message.fetchTime = $root.google.protobuf.Timestamp.fromObject(object.fetchTime); + } + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.File.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a File message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {google.devtools.artifactregistry.v1.File} message File + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + File.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.hashes = []; + if (options.objects || options.defaults) + object.annotations = {}; + 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 = ""; + object.fetchTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + if (typeof message.sizeBytes === "number") + object.sizeBytes = options.longs === String ? String(message.sizeBytes) : message.sizeBytes; + else + object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; + if (message.hashes && message.hashes.length) { + object.hashes = []; + for (var j = 0; j < message.hashes.length; ++j) + object.hashes[j] = $root.google.devtools.artifactregistry.v1.Hash.toObject(message.hashes[j], options); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.owner != null && message.hasOwnProperty("owner")) + object.owner = message.owner; + if (message.fetchTime != null && message.hasOwnProperty("fetchTime")) + object.fetchTime = $root.google.protobuf.Timestamp.toObject(message.fetchTime, options); + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + return object; + }; + + /** + * Converts this File to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.File + * @instance + * @returns {Object.} JSON object + */ + File.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for File + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + File.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.File"; + }; + + return File; + })(); + + v1.ListFilesRequest = (function() { + + /** + * Properties of a ListFilesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListFilesRequest + * @property {string|null} [parent] ListFilesRequest parent + * @property {string|null} [filter] ListFilesRequest filter + * @property {number|null} [pageSize] ListFilesRequest pageSize + * @property {string|null} [pageToken] ListFilesRequest pageToken + * @property {string|null} [orderBy] ListFilesRequest orderBy + */ + + /** + * Constructs a new ListFilesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListFilesRequest. + * @implements IListFilesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListFilesRequest=} [properties] Properties to set + */ + function ListFilesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFilesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @instance + */ + ListFilesRequest.prototype.parent = ""; + + /** + * ListFilesRequest filter. + * @member {string} filter + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @instance + */ + ListFilesRequest.prototype.filter = ""; + + /** + * ListFilesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @instance + */ + ListFilesRequest.prototype.pageSize = 0; + + /** + * ListFilesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @instance + */ + ListFilesRequest.prototype.pageToken = ""; + + /** + * ListFilesRequest orderBy. + * @member {string} orderBy + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @instance + */ + ListFilesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListFilesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListFilesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListFilesRequest} ListFilesRequest instance + */ + ListFilesRequest.create = function create(properties) { + return new ListFilesRequest(properties); + }; + + /** + * Encodes the specified ListFilesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListFilesRequest} message ListFilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFilesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListFilesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListFilesRequest} message ListFilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFilesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFilesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListFilesRequest} ListFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFilesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListFilesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFilesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListFilesRequest} ListFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFilesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFilesRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFilesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListFilesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListFilesRequest} ListFilesRequest + */ + ListFilesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListFilesRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListFilesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListFilesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListFilesRequest} message ListFilesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFilesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListFilesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @instance + * @returns {Object.} JSON object + */ + ListFilesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFilesRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListFilesRequest"; + }; + + return ListFilesRequest; + })(); + + v1.ListFilesResponse = (function() { + + /** + * Properties of a ListFilesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListFilesResponse + * @property {Array.|null} [files] ListFilesResponse files + * @property {string|null} [nextPageToken] ListFilesResponse nextPageToken + */ + + /** + * Constructs a new ListFilesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListFilesResponse. + * @implements IListFilesResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListFilesResponse=} [properties] Properties to set + */ + function ListFilesResponse(properties) { + this.files = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFilesResponse files. + * @member {Array.} files + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @instance + */ + ListFilesResponse.prototype.files = $util.emptyArray; + + /** + * ListFilesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @instance + */ + ListFilesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListFilesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListFilesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListFilesResponse} ListFilesResponse instance + */ + ListFilesResponse.create = function create(properties) { + return new ListFilesResponse(properties); + }; + + /** + * Encodes the specified ListFilesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListFilesResponse} message ListFilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFilesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.files != null && message.files.length) + for (var i = 0; i < message.files.length; ++i) + $root.google.devtools.artifactregistry.v1.File.encode(message.files[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListFilesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListFilesResponse} message ListFilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFilesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFilesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListFilesResponse} ListFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFilesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListFilesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.files && message.files.length)) + message.files = []; + message.files.push($root.google.devtools.artifactregistry.v1.File.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFilesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListFilesResponse} ListFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFilesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFilesResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFilesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.files != null && message.hasOwnProperty("files")) { + if (!Array.isArray(message.files)) + return "files: array expected"; + for (var i = 0; i < message.files.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.File.verify(message.files[i]); + if (error) + return "files." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListFilesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListFilesResponse} ListFilesResponse + */ + ListFilesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListFilesResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListFilesResponse(); + if (object.files) { + if (!Array.isArray(object.files)) + throw TypeError(".google.devtools.artifactregistry.v1.ListFilesResponse.files: array expected"); + message.files = []; + for (var i = 0; i < object.files.length; ++i) { + if (typeof object.files[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListFilesResponse.files: object expected"); + message.files[i] = $root.google.devtools.artifactregistry.v1.File.fromObject(object.files[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListFilesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListFilesResponse} message ListFilesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFilesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.files = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.files && message.files.length) { + object.files = []; + for (var j = 0; j < message.files.length; ++j) + object.files[j] = $root.google.devtools.artifactregistry.v1.File.toObject(message.files[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListFilesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @instance + * @returns {Object.} JSON object + */ + ListFilesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFilesResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListFilesResponse"; + }; + + return ListFilesResponse; + })(); + + v1.GetFileRequest = (function() { + + /** + * Properties of a GetFileRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetFileRequest + * @property {string|null} [name] GetFileRequest name + */ + + /** + * Constructs a new GetFileRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetFileRequest. + * @implements IGetFileRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetFileRequest=} [properties] Properties to set + */ + function GetFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetFileRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @instance + */ + GetFileRequest.prototype.name = ""; + + /** + * Creates a new GetFileRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetFileRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetFileRequest} GetFileRequest instance + */ + GetFileRequest.create = function create(properties) { + return new GetFileRequest(properties); + }; + + /** + * Encodes the specified GetFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetFileRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetFileRequest} message GetFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetFileRequest} message GetFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetFileRequest} GetFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFileRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetFileRequest} GetFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetFileRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetFileRequest} GetFileRequest + */ + GetFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetFileRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetFileRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetFileRequest} message GetFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetFileRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @instance + * @returns {Object.} JSON object + */ + GetFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetFileRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetFileRequest"; + }; + + return GetFileRequest; + })(); + + v1.DeleteFileRequest = (function() { + + /** + * Properties of a DeleteFileRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IDeleteFileRequest + * @property {string|null} [name] DeleteFileRequest name + */ + + /** + * Constructs a new DeleteFileRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a DeleteFileRequest. + * @implements IDeleteFileRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IDeleteFileRequest=} [properties] Properties to set + */ + function DeleteFileRequest(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]]; + } + + /** + * DeleteFileRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest + * @instance + */ + DeleteFileRequest.prototype.name = ""; + + /** + * Creates a new DeleteFileRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteFileRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.DeleteFileRequest} DeleteFileRequest instance + */ + DeleteFileRequest.create = function create(properties) { + return new DeleteFileRequest(properties); + }; + + /** + * Encodes the specified DeleteFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteFileRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteFileRequest} message DeleteFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFileRequest.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 DeleteFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteFileRequest} message DeleteFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.DeleteFileRequest} DeleteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFileRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DeleteFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.DeleteFileRequest} DeleteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFileRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFileRequest.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 DeleteFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.DeleteFileRequest} DeleteFileRequest + */ + DeleteFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteFileRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.DeleteFileRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.DeleteFileRequest} message DeleteFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFileRequest.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 DeleteFileRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFileRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DeleteFileRequest"; + }; + + return DeleteFileRequest; + })(); + + v1.UpdateFileRequest = (function() { + + /** + * Properties of an UpdateFileRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IUpdateFileRequest + * @property {google.devtools.artifactregistry.v1.IFile|null} [file] UpdateFileRequest file + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFileRequest updateMask + */ + + /** + * Constructs a new UpdateFileRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an UpdateFileRequest. + * @implements IUpdateFileRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IUpdateFileRequest=} [properties] Properties to set + */ + function UpdateFileRequest(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]]; + } + + /** + * UpdateFileRequest file. + * @member {google.devtools.artifactregistry.v1.IFile|null|undefined} file + * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest + * @instance + */ + UpdateFileRequest.prototype.file = null; + + /** + * UpdateFileRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest + * @instance + */ + UpdateFileRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateFileRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateFileRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.UpdateFileRequest} UpdateFileRequest instance + */ + UpdateFileRequest.create = function create(properties) { + return new UpdateFileRequest(properties); + }; + + /** + * Encodes the specified UpdateFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateFileRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateFileRequest} message UpdateFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + $root.google.devtools.artifactregistry.v1.File.encode(message.file, 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 UpdateFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateFileRequest} message UpdateFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.UpdateFileRequest} UpdateFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFileRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdateFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.file = $root.google.devtools.artifactregistry.v1.File.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 UpdateFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.UpdateFileRequest} UpdateFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateFileRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + var error = $root.google.devtools.artifactregistry.v1.File.verify(message.file); + if (error) + return "file." + 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 UpdateFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.UpdateFileRequest} UpdateFileRequest + */ + UpdateFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateFileRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.UpdateFileRequest(); + if (object.file != null) { + if (typeof object.file !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateFileRequest.file: object expected"); + message.file = $root.google.devtools.artifactregistry.v1.File.fromObject(object.file); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateFileRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.UpdateFileRequest} message UpdateFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.file = null; + object.updateMask = null; + } + if (message.file != null && message.hasOwnProperty("file")) + object.file = $root.google.devtools.artifactregistry.v1.File.toObject(message.file, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateFileRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateFileRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdateFileRequest"; + }; + + return UpdateFileRequest; + })(); + + /** + * VersionView enum. + * @name google.devtools.artifactregistry.v1.VersionView + * @enum {number} + * @property {number} VERSION_VIEW_UNSPECIFIED=0 VERSION_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=2 FULL value + */ + v1.VersionView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERSION_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; + })(); + + v1.Version = (function() { + + /** + * Properties of a Version. + * @memberof google.devtools.artifactregistry.v1 + * @interface IVersion + * @property {string|null} [name] Version name + * @property {string|null} [description] Version description + * @property {google.protobuf.ITimestamp|null} [createTime] Version createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Version updateTime + * @property {Array.|null} [relatedTags] Version relatedTags + * @property {google.protobuf.IStruct|null} [metadata] Version metadata + * @property {Object.|null} [annotations] Version annotations + * @property {Array.|null} [fingerprints] Version fingerprints + */ + + /** + * Constructs a new Version. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a Version. + * @implements IVersion + * @constructor + * @param {google.devtools.artifactregistry.v1.IVersion=} [properties] Properties to set + */ + function Version(properties) { + this.relatedTags = []; + this.annotations = {}; + this.fingerprints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Version name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.name = ""; + + /** + * Version description. + * @member {string} description + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.description = ""; + + /** + * Version createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.createTime = null; + + /** + * Version updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.updateTime = null; + + /** + * Version relatedTags. + * @member {Array.} relatedTags + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.relatedTags = $util.emptyArray; + + /** + * Version metadata. + * @member {google.protobuf.IStruct|null|undefined} metadata + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.metadata = null; + + /** + * Version annotations. + * @member {Object.} annotations + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.annotations = $util.emptyObject; + + /** + * Version fingerprints. + * @member {Array.} fingerprints + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.fingerprints = $util.emptyArray; + + /** + * Creates a new Version instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {google.devtools.artifactregistry.v1.IVersion=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Version} Version instance + */ + Version.create = function create(properties) { + return new Version(properties); + }; + + /** + * Encodes the specified Version message. Does not implicitly {@link google.devtools.artifactregistry.v1.Version.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {google.devtools.artifactregistry.v1.IVersion} message Version message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Version.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.relatedTags != null && message.relatedTags.length) + for (var i = 0; i < message.relatedTags.length; ++i) + $root.google.devtools.artifactregistry.v1.Tag.encode(message.relatedTags[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.fingerprints != null && message.fingerprints.length) + for (var i = 0; i < message.fingerprints.length; ++i) + $root.google.devtools.artifactregistry.v1.Hash.encode(message.fingerprints[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Version message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Version.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {google.devtools.artifactregistry.v1.IVersion} message Version message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Version.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Version message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Version} Version + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Version.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Version(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.relatedTags && message.relatedTags.length)) + message.relatedTags = []; + message.relatedTags.push($root.google.devtools.artifactregistry.v1.Tag.decode(reader, reader.uint32())); + break; + } + case 8: { + message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 9: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + 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.annotations[key] = value; + break; + } + case 10: { + if (!(message.fingerprints && message.fingerprints.length)) + message.fingerprints = []; + message.fingerprints.push($root.google.devtools.artifactregistry.v1.Hash.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Version message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Version} Version + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Version.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Version message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Version.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.relatedTags != null && message.hasOwnProperty("relatedTags")) { + if (!Array.isArray(message.relatedTags)) + return "relatedTags: array expected"; + for (var i = 0; i < message.relatedTags.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Tag.verify(message.relatedTags[i]); + if (error) + return "relatedTags." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Struct.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.fingerprints != null && message.hasOwnProperty("fingerprints")) { + if (!Array.isArray(message.fingerprints)) + return "fingerprints: array expected"; + for (var i = 0; i < message.fingerprints.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Hash.verify(message.fingerprints[i]); + if (error) + return "fingerprints." + error; + } + } + return null; + }; + + /** + * Creates a Version message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Version} Version + */ + Version.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Version) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Version(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Version.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Version.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.relatedTags) { + if (!Array.isArray(object.relatedTags)) + throw TypeError(".google.devtools.artifactregistry.v1.Version.relatedTags: array expected"); + message.relatedTags = []; + for (var i = 0; i < object.relatedTags.length; ++i) { + if (typeof object.relatedTags[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Version.relatedTags: object expected"); + message.relatedTags[i] = $root.google.devtools.artifactregistry.v1.Tag.fromObject(object.relatedTags[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Version.metadata: object expected"); + message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + } + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Version.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.fingerprints) { + if (!Array.isArray(object.fingerprints)) + throw TypeError(".google.devtools.artifactregistry.v1.Version.fingerprints: array expected"); + message.fingerprints = []; + for (var i = 0; i < object.fingerprints.length; ++i) { + if (typeof object.fingerprints[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Version.fingerprints: object expected"); + message.fingerprints[i] = $root.google.devtools.artifactregistry.v1.Hash.fromObject(object.fingerprints[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Version message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {google.devtools.artifactregistry.v1.Version} message Version + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Version.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.relatedTags = []; + object.fingerprints = []; + } + if (options.objects || options.defaults) + object.annotations = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.metadata = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.relatedTags && message.relatedTags.length) { + object.relatedTags = []; + for (var j = 0; j < message.relatedTags.length; ++j) + object.relatedTags[j] = $root.google.devtools.artifactregistry.v1.Tag.toObject(message.relatedTags[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.fingerprints && message.fingerprints.length) { + object.fingerprints = []; + for (var j = 0; j < message.fingerprints.length; ++j) + object.fingerprints[j] = $root.google.devtools.artifactregistry.v1.Hash.toObject(message.fingerprints[j], options); + } + return object; + }; + + /** + * Converts this Version to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + * @returns {Object.} JSON object + */ + Version.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Version + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Version.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Version"; + }; + + return Version; + })(); + + v1.ListVersionsRequest = (function() { + + /** + * Properties of a ListVersionsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListVersionsRequest + * @property {string|null} [parent] ListVersionsRequest parent + * @property {number|null} [pageSize] ListVersionsRequest pageSize + * @property {string|null} [pageToken] ListVersionsRequest pageToken + * @property {google.devtools.artifactregistry.v1.VersionView|null} [view] ListVersionsRequest view + * @property {string|null} [orderBy] ListVersionsRequest orderBy + * @property {string|null} [filter] ListVersionsRequest filter + */ + + /** + * Constructs a new ListVersionsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListVersionsRequest. + * @implements IListVersionsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListVersionsRequest=} [properties] Properties to set + */ + function ListVersionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVersionsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.parent = ""; + + /** + * ListVersionsRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.pageSize = 0; + + /** + * ListVersionsRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.pageToken = ""; + + /** + * ListVersionsRequest view. + * @member {google.devtools.artifactregistry.v1.VersionView} view + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.view = 0; + + /** + * ListVersionsRequest orderBy. + * @member {string} orderBy + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.orderBy = ""; + + /** + * ListVersionsRequest filter. + * @member {string} filter + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.filter = ""; + + /** + * Creates a new ListVersionsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListVersionsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListVersionsRequest} ListVersionsRequest instance + */ + ListVersionsRequest.create = function create(properties) { + return new ListVersionsRequest(properties); + }; + + /** + * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListVersionsRequest} message ListVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVersionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.view); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListVersionsRequest} message ListVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListVersionsRequest} ListVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVersionsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListVersionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + case 6: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListVersionsRequest} ListVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVersionsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVersionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListVersionsRequest} ListVersionsRequest + */ + ListVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListVersionsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListVersionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + 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); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListVersionsRequest} message ListVersionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVersionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.view = options.enums === String ? "VERSION_VIEW_UNSPECIFIED" : 0; + object.orderBy = ""; + 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.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.devtools.artifactregistry.v1.VersionView[message.view] === undefined ? message.view : $root.google.devtools.artifactregistry.v1.VersionView[message.view] : message.view; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListVersionsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVersionsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListVersionsRequest"; + }; + + return ListVersionsRequest; + })(); + + v1.ListVersionsResponse = (function() { + + /** + * Properties of a ListVersionsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListVersionsResponse + * @property {Array.|null} [versions] ListVersionsResponse versions + * @property {string|null} [nextPageToken] ListVersionsResponse nextPageToken + */ + + /** + * Constructs a new ListVersionsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListVersionsResponse. + * @implements IListVersionsResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListVersionsResponse=} [properties] Properties to set + */ + function ListVersionsResponse(properties) { + this.versions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVersionsResponse versions. + * @member {Array.} versions + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @instance + */ + ListVersionsResponse.prototype.versions = $util.emptyArray; + + /** + * ListVersionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @instance + */ + ListVersionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListVersionsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListVersionsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListVersionsResponse} ListVersionsResponse instance + */ + ListVersionsResponse.create = function create(properties) { + return new ListVersionsResponse(properties); + }; + + /** + * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListVersionsResponse} message ListVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVersionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.versions != null && message.versions.length) + for (var i = 0; i < message.versions.length; ++i) + $root.google.devtools.artifactregistry.v1.Version.encode(message.versions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListVersionsResponse} message ListVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVersionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListVersionsResponse} ListVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVersionsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListVersionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.versions && message.versions.length)) + message.versions = []; + message.versions.push($root.google.devtools.artifactregistry.v1.Version.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListVersionsResponse} ListVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVersionsResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVersionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.versions != null && message.hasOwnProperty("versions")) { + if (!Array.isArray(message.versions)) + return "versions: array expected"; + for (var i = 0; i < message.versions.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Version.verify(message.versions[i]); + if (error) + return "versions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListVersionsResponse} ListVersionsResponse + */ + ListVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListVersionsResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListVersionsResponse(); + if (object.versions) { + if (!Array.isArray(object.versions)) + throw TypeError(".google.devtools.artifactregistry.v1.ListVersionsResponse.versions: array expected"); + message.versions = []; + for (var i = 0; i < object.versions.length; ++i) { + if (typeof object.versions[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListVersionsResponse.versions: object expected"); + message.versions[i] = $root.google.devtools.artifactregistry.v1.Version.fromObject(object.versions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListVersionsResponse} message ListVersionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVersionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.versions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.versions && message.versions.length) { + object.versions = []; + for (var j = 0; j < message.versions.length; ++j) + object.versions[j] = $root.google.devtools.artifactregistry.v1.Version.toObject(message.versions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListVersionsResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListVersionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVersionsResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListVersionsResponse"; + }; + + return ListVersionsResponse; + })(); + + v1.GetVersionRequest = (function() { + + /** + * Properties of a GetVersionRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetVersionRequest + * @property {string|null} [name] GetVersionRequest name + * @property {google.devtools.artifactregistry.v1.VersionView|null} [view] GetVersionRequest view + */ + + /** + * Constructs a new GetVersionRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetVersionRequest. + * @implements IGetVersionRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetVersionRequest=} [properties] Properties to set + */ + function GetVersionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetVersionRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @instance + */ + GetVersionRequest.prototype.name = ""; + + /** + * GetVersionRequest view. + * @member {google.devtools.artifactregistry.v1.VersionView} view + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @instance + */ + GetVersionRequest.prototype.view = 0; + + /** + * Creates a new GetVersionRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetVersionRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetVersionRequest} GetVersionRequest instance + */ + GetVersionRequest.create = function create(properties) { + return new GetVersionRequest(properties); + }; + + /** + * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetVersionRequest} message GetVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVersionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetVersionRequest} message GetVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetVersionRequest} GetVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVersionRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetVersionRequest} GetVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetVersionRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetVersionRequest} GetVersionRequest + */ + GetVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetVersionRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetVersionRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "VERSION_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetVersionRequest} message GetVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "VERSION_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.devtools.artifactregistry.v1.VersionView[message.view] === undefined ? message.view : $root.google.devtools.artifactregistry.v1.VersionView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetVersionRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @instance + * @returns {Object.} JSON object + */ + GetVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetVersionRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetVersionRequest"; + }; + + return GetVersionRequest; + })(); + + v1.DeleteVersionRequest = (function() { + + /** + * Properties of a DeleteVersionRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IDeleteVersionRequest + * @property {string|null} [name] DeleteVersionRequest name + * @property {boolean|null} [force] DeleteVersionRequest force + */ + + /** + * Constructs a new DeleteVersionRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a DeleteVersionRequest. + * @implements IDeleteVersionRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest=} [properties] Properties to set + */ + function DeleteVersionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteVersionRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @instance + */ + DeleteVersionRequest.prototype.name = ""; + + /** + * DeleteVersionRequest force. + * @member {boolean} force + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @instance + */ + DeleteVersionRequest.prototype.force = false; + + /** + * Creates a new DeleteVersionRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.DeleteVersionRequest} DeleteVersionRequest instance + */ + DeleteVersionRequest.create = function create(properties) { + return new DeleteVersionRequest(properties); + }; + + /** + * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVersionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.DeleteVersionRequest} DeleteVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVersionRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DeleteVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.DeleteVersionRequest} DeleteVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteVersionRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.DeleteVersionRequest} DeleteVersionRequest + */ + DeleteVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteVersionRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.DeleteVersionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.DeleteVersionRequest} message DeleteVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteVersionRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteVersionRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DeleteVersionRequest"; + }; + + return DeleteVersionRequest; + })(); + + v1.BatchDeleteVersionsRequest = (function() { + + /** + * Properties of a BatchDeleteVersionsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IBatchDeleteVersionsRequest + * @property {string|null} [parent] BatchDeleteVersionsRequest parent + * @property {Array.|null} [names] BatchDeleteVersionsRequest names + * @property {boolean|null} [validateOnly] BatchDeleteVersionsRequest validateOnly + */ + + /** + * Constructs a new BatchDeleteVersionsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a BatchDeleteVersionsRequest. + * @implements IBatchDeleteVersionsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest=} [properties] Properties to set + */ + function BatchDeleteVersionsRequest(properties) { + this.names = []; + 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]]; + } + + /** + * BatchDeleteVersionsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + * @instance + */ + BatchDeleteVersionsRequest.prototype.parent = ""; + + /** + * BatchDeleteVersionsRequest names. + * @member {Array.} names + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + * @instance + */ + BatchDeleteVersionsRequest.prototype.names = $util.emptyArray; + + /** + * BatchDeleteVersionsRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + * @instance + */ + BatchDeleteVersionsRequest.prototype.validateOnly = false; + + /** + * Creates a new BatchDeleteVersionsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest} BatchDeleteVersionsRequest instance + */ + BatchDeleteVersionsRequest.create = function create(properties) { + return new BatchDeleteVersionsRequest(properties); + }; + + /** + * Encodes the specified BatchDeleteVersionsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest} message BatchDeleteVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchDeleteVersionsRequest.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.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.names[i]); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified BatchDeleteVersionsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest} message BatchDeleteVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchDeleteVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchDeleteVersionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest} BatchDeleteVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchDeleteVersionsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchDeleteVersionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest} BatchDeleteVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchDeleteVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchDeleteVersionsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchDeleteVersionsRequest.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.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a BatchDeleteVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest} BatchDeleteVersionsRequest + */ + BatchDeleteVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a BatchDeleteVersionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest} message BatchDeleteVersionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchDeleteVersionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.names = []; + if (options.defaults) { + object.parent = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this BatchDeleteVersionsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchDeleteVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchDeleteVersionsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchDeleteVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest"; + }; + + return BatchDeleteVersionsRequest; + })(); + + v1.BatchDeleteVersionsMetadata = (function() { + + /** + * Properties of a BatchDeleteVersionsMetadata. + * @memberof google.devtools.artifactregistry.v1 + * @interface IBatchDeleteVersionsMetadata + * @property {Array.|null} [failedVersions] BatchDeleteVersionsMetadata failedVersions + */ + + /** + * Constructs a new BatchDeleteVersionsMetadata. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a BatchDeleteVersionsMetadata. + * @implements IBatchDeleteVersionsMetadata + * @constructor + * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata=} [properties] Properties to set + */ + function BatchDeleteVersionsMetadata(properties) { + this.failedVersions = []; + 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]]; + } + + /** + * BatchDeleteVersionsMetadata failedVersions. + * @member {Array.} failedVersions + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + * @instance + */ + BatchDeleteVersionsMetadata.prototype.failedVersions = $util.emptyArray; + + /** + * Creates a new BatchDeleteVersionsMetadata instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata} BatchDeleteVersionsMetadata instance + */ + BatchDeleteVersionsMetadata.create = function create(properties) { + return new BatchDeleteVersionsMetadata(properties); + }; + + /** + * Encodes the specified BatchDeleteVersionsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata} message BatchDeleteVersionsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchDeleteVersionsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.failedVersions != null && message.failedVersions.length) + for (var i = 0; i < message.failedVersions.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.failedVersions[i]); + return writer; + }; + + /** + * Encodes the specified BatchDeleteVersionsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata} message BatchDeleteVersionsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchDeleteVersionsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchDeleteVersionsMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata} BatchDeleteVersionsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchDeleteVersionsMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.failedVersions && message.failedVersions.length)) + message.failedVersions = []; + message.failedVersions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchDeleteVersionsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata} BatchDeleteVersionsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchDeleteVersionsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchDeleteVersionsMetadata message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchDeleteVersionsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.failedVersions != null && message.hasOwnProperty("failedVersions")) { + if (!Array.isArray(message.failedVersions)) + return "failedVersions: array expected"; + for (var i = 0; i < message.failedVersions.length; ++i) + if (!$util.isString(message.failedVersions[i])) + return "failedVersions: string[] expected"; + } + return null; + }; + + /** + * Creates a BatchDeleteVersionsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata} BatchDeleteVersionsMetadata + */ + BatchDeleteVersionsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata) + return object; + var message = new $root.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata(); + if (object.failedVersions) { + if (!Array.isArray(object.failedVersions)) + throw TypeError(".google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.failedVersions: array expected"); + message.failedVersions = []; + for (var i = 0; i < object.failedVersions.length; ++i) + message.failedVersions[i] = String(object.failedVersions[i]); + } + return message; + }; + + /** + * Creates a plain object from a BatchDeleteVersionsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata} message BatchDeleteVersionsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchDeleteVersionsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.failedVersions = []; + if (message.failedVersions && message.failedVersions.length) { + object.failedVersions = []; + for (var j = 0; j < message.failedVersions.length; ++j) + object.failedVersions[j] = message.failedVersions[j]; + } + return object; + }; + + /** + * Converts this BatchDeleteVersionsMetadata to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + * @instance + * @returns {Object.} JSON object + */ + BatchDeleteVersionsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchDeleteVersionsMetadata + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchDeleteVersionsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata"; + }; + + return BatchDeleteVersionsMetadata; + })(); + + v1.UpdateVersionRequest = (function() { + + /** + * Properties of an UpdateVersionRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IUpdateVersionRequest + * @property {google.devtools.artifactregistry.v1.IVersion|null} [version] UpdateVersionRequest version + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVersionRequest updateMask + */ + + /** + * Constructs a new UpdateVersionRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an UpdateVersionRequest. + * @implements IUpdateVersionRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IUpdateVersionRequest=} [properties] Properties to set + */ + function UpdateVersionRequest(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]]; + } + + /** + * UpdateVersionRequest version. + * @member {google.devtools.artifactregistry.v1.IVersion|null|undefined} version + * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest + * @instance + */ + UpdateVersionRequest.prototype.version = null; + + /** + * UpdateVersionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest + * @instance + */ + UpdateVersionRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateVersionRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateVersionRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.UpdateVersionRequest} UpdateVersionRequest instance + */ + UpdateVersionRequest.create = function create(properties) { + return new UpdateVersionRequest(properties); + }; + + /** + * Encodes the specified UpdateVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateVersionRequest} message UpdateVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVersionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.google.devtools.artifactregistry.v1.Version.encode(message.version, 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 UpdateVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateVersionRequest} message UpdateVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.UpdateVersionRequest} UpdateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateVersionRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdateVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = $root.google.devtools.artifactregistry.v1.Version.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 UpdateVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.UpdateVersionRequest} UpdateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateVersionRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.google.devtools.artifactregistry.v1.Version.verify(message.version); + if (error) + return "version." + 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 UpdateVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.UpdateVersionRequest} UpdateVersionRequest + */ + UpdateVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateVersionRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.UpdateVersionRequest(); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateVersionRequest.version: object expected"); + message.version = $root.google.devtools.artifactregistry.v1.Version.fromObject(object.version); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateVersionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.UpdateVersionRequest} message UpdateVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = null; + object.updateMask = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.google.devtools.artifactregistry.v1.Version.toObject(message.version, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateVersionRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateVersionRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdateVersionRequest"; + }; + + return UpdateVersionRequest; + })(); + + v1.Tag = (function() { + + /** + * Properties of a Tag. + * @memberof google.devtools.artifactregistry.v1 + * @interface ITag + * @property {string|null} [name] Tag name + * @property {string|null} [version] Tag version + */ + + /** + * Constructs a new Tag. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a Tag. + * @implements ITag + * @constructor + * @param {google.devtools.artifactregistry.v1.ITag=} [properties] Properties to set + */ + function Tag(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Tag name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.Tag + * @instance + */ + Tag.prototype.name = ""; + + /** + * Tag version. + * @member {string} version + * @memberof google.devtools.artifactregistry.v1.Tag + * @instance + */ + Tag.prototype.version = ""; + + /** + * Creates a new Tag instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {google.devtools.artifactregistry.v1.ITag=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Tag} Tag instance + */ + Tag.create = function create(properties) { + return new Tag(properties); + }; + + /** + * Encodes the specified Tag message. Does not implicitly {@link google.devtools.artifactregistry.v1.Tag.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {google.devtools.artifactregistry.v1.ITag} message Tag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tag.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + return writer; + }; + + /** + * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Tag.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {google.devtools.artifactregistry.v1.ITag} message Tag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tag.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tag message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Tag} Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tag.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Tag(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Tag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Tag} Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tag.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tag message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tag.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a Tag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Tag} Tag + */ + Tag.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Tag) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Tag(); + if (object.name != null) + message.name = String(object.name); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a Tag message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {google.devtools.artifactregistry.v1.Tag} message Tag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tag.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.version = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this Tag to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Tag + * @instance + * @returns {Object.} JSON object + */ + Tag.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Tag + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Tag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Tag"; + }; + + return Tag; + })(); + + v1.ListTagsRequest = (function() { + + /** + * Properties of a ListTagsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListTagsRequest + * @property {string|null} [parent] ListTagsRequest parent + * @property {string|null} [filter] ListTagsRequest filter + * @property {number|null} [pageSize] ListTagsRequest pageSize + * @property {string|null} [pageToken] ListTagsRequest pageToken + */ + + /** + * Constructs a new ListTagsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListTagsRequest. + * @implements IListTagsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListTagsRequest=} [properties] Properties to set + */ + function ListTagsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTagsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @instance + */ + ListTagsRequest.prototype.parent = ""; + + /** + * ListTagsRequest filter. + * @member {string} filter + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @instance + */ + ListTagsRequest.prototype.filter = ""; + + /** + * ListTagsRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @instance + */ + ListTagsRequest.prototype.pageSize = 0; + + /** + * ListTagsRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @instance + */ + ListTagsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListTagsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListTagsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListTagsRequest} ListTagsRequest instance + */ + ListTagsRequest.create = function create(properties) { + return new ListTagsRequest(properties); + }; + + /** + * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListTagsRequest} message ListTagsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTagsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListTagsRequest} message ListTagsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTagsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListTagsRequest} ListTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTagsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListTagsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListTagsRequest} ListTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTagsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTagsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTagsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListTagsRequest} ListTagsRequest + */ + ListTagsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListTagsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListTagsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListTagsRequest} message ListTagsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTagsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListTagsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @instance + * @returns {Object.} JSON object + */ + ListTagsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTagsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTagsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListTagsRequest"; + }; + + return ListTagsRequest; + })(); + + v1.ListTagsResponse = (function() { + + /** + * Properties of a ListTagsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListTagsResponse + * @property {Array.|null} [tags] ListTagsResponse tags + * @property {string|null} [nextPageToken] ListTagsResponse nextPageToken + */ + + /** + * Constructs a new ListTagsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListTagsResponse. + * @implements IListTagsResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListTagsResponse=} [properties] Properties to set + */ + function ListTagsResponse(properties) { + this.tags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTagsResponse tags. + * @member {Array.} tags + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @instance + */ + ListTagsResponse.prototype.tags = $util.emptyArray; + + /** + * ListTagsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @instance + */ + ListTagsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTagsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListTagsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListTagsResponse} ListTagsResponse instance + */ + ListTagsResponse.create = function create(properties) { + return new ListTagsResponse(properties); + }; + + /** + * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListTagsResponse} message ListTagsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTagsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + $root.google.devtools.artifactregistry.v1.Tag.encode(message.tags[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListTagsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListTagsResponse} message ListTagsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTagsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListTagsResponse} ListTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTagsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListTagsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push($root.google.devtools.artifactregistry.v1.Tag.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListTagsResponse} ListTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTagsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTagsResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTagsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Tag.verify(message.tags[i]); + if (error) + return "tags." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListTagsResponse} ListTagsResponse + */ + ListTagsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListTagsResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListTagsResponse(); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.devtools.artifactregistry.v1.ListTagsResponse.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) { + if (typeof object.tags[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListTagsResponse.tags: object expected"); + message.tags[i] = $root.google.devtools.artifactregistry.v1.Tag.fromObject(object.tags[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListTagsResponse} message ListTagsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTagsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tags = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = $root.google.devtools.artifactregistry.v1.Tag.toObject(message.tags[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListTagsResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @instance + * @returns {Object.} JSON object + */ + ListTagsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTagsResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTagsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListTagsResponse"; + }; + + return ListTagsResponse; + })(); + + v1.GetTagRequest = (function() { + + /** + * Properties of a GetTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetTagRequest + * @property {string|null} [name] GetTagRequest name + */ + + /** + * Constructs a new GetTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetTagRequest. + * @implements IGetTagRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetTagRequest=} [properties] Properties to set + */ + function GetTagRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTagRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @instance + */ + GetTagRequest.prototype.name = ""; + + /** + * Creates a new GetTagRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetTagRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetTagRequest} GetTagRequest instance + */ + GetTagRequest.create = function create(properties) { + return new GetTagRequest(properties); + }; + + /** + * Encodes the specified GetTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetTagRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetTagRequest} message GetTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTagRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetTagRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetTagRequest} message GetTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTagRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetTagRequest} GetTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTagRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetTagRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTagRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetTagRequest} GetTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTagRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTagRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTagRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetTagRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetTagRequest} GetTagRequest + */ + GetTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetTagRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetTagRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetTagRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetTagRequest} message GetTagRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTagRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetTagRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @instance + * @returns {Object.} JSON object + */ + GetTagRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetTagRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetTagRequest"; + }; + + return GetTagRequest; + })(); + + v1.CreateTagRequest = (function() { + + /** + * Properties of a CreateTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface ICreateTagRequest + * @property {string|null} [parent] CreateTagRequest parent + * @property {string|null} [tagId] CreateTagRequest tagId + * @property {google.devtools.artifactregistry.v1.ITag|null} [tag] CreateTagRequest tag + */ + + /** + * Constructs a new CreateTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a CreateTagRequest. + * @implements ICreateTagRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.ICreateTagRequest=} [properties] Properties to set + */ + function CreateTagRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTagRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @instance + */ + CreateTagRequest.prototype.parent = ""; + + /** + * CreateTagRequest tagId. + * @member {string} tagId + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @instance + */ + CreateTagRequest.prototype.tagId = ""; + + /** + * CreateTagRequest tag. + * @member {google.devtools.artifactregistry.v1.ITag|null|undefined} tag + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @instance + */ + CreateTagRequest.prototype.tag = null; + + /** + * Creates a new CreateTagRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateTagRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.CreateTagRequest} CreateTagRequest instance + */ + CreateTagRequest.create = function create(properties) { + return new CreateTagRequest(properties); + }; + + /** + * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateTagRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateTagRequest} message CreateTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTagRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.tagId != null && Object.hasOwnProperty.call(message, "tagId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tagId); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + $root.google.devtools.artifactregistry.v1.Tag.encode(message.tag, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateTagRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateTagRequest} message CreateTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTagRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.CreateTagRequest} CreateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTagRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.CreateTagRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.tagId = reader.string(); + break; + } + case 3: { + message.tag = $root.google.devtools.artifactregistry.v1.Tag.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.CreateTagRequest} CreateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTagRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTagRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTagRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.tagId != null && message.hasOwnProperty("tagId")) + if (!$util.isString(message.tagId)) + return "tagId: string expected"; + if (message.tag != null && message.hasOwnProperty("tag")) { + var error = $root.google.devtools.artifactregistry.v1.Tag.verify(message.tag); + if (error) + return "tag." + error; + } + return null; + }; + + /** + * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.CreateTagRequest} CreateTagRequest + */ + CreateTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.CreateTagRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.CreateTagRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.tagId != null) + message.tagId = String(object.tagId); + if (object.tag != null) { + if (typeof object.tag !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.CreateTagRequest.tag: object expected"); + message.tag = $root.google.devtools.artifactregistry.v1.Tag.fromObject(object.tag); + } + return message; + }; + + /** + * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.CreateTagRequest} message CreateTagRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTagRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.tagId = ""; + object.tag = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.tagId != null && message.hasOwnProperty("tagId")) + object.tagId = message.tagId; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = $root.google.devtools.artifactregistry.v1.Tag.toObject(message.tag, options); + return object; + }; + + /** + * Converts this CreateTagRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTagRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateTagRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.CreateTagRequest"; + }; + + return CreateTagRequest; + })(); + + v1.UpdateTagRequest = (function() { + + /** + * Properties of an UpdateTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IUpdateTagRequest + * @property {google.devtools.artifactregistry.v1.ITag|null} [tag] UpdateTagRequest tag + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagRequest updateMask + */ + + /** + * Constructs a new UpdateTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an UpdateTagRequest. + * @implements IUpdateTagRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest=} [properties] Properties to set + */ + function UpdateTagRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateTagRequest tag. + * @member {google.devtools.artifactregistry.v1.ITag|null|undefined} tag + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @instance + */ + UpdateTagRequest.prototype.tag = null; + + /** + * UpdateTagRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @instance + */ + UpdateTagRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateTagRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.UpdateTagRequest} UpdateTagRequest instance + */ + UpdateTagRequest.create = function create(properties) { + return new UpdateTagRequest(properties); + }; + + /** + * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateTagRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTagRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + $root.google.devtools.artifactregistry.v1.Tag.encode(message.tag, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateTagRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateTagRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.UpdateTagRequest} UpdateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTagRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdateTagRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tag = $root.google.devtools.artifactregistry.v1.Tag.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.UpdateTagRequest} UpdateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTagRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateTagRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateTagRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tag != null && message.hasOwnProperty("tag")) { + var error = $root.google.devtools.artifactregistry.v1.Tag.verify(message.tag); + if (error) + return "tag." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateTagRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.UpdateTagRequest} UpdateTagRequest + */ + UpdateTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateTagRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.UpdateTagRequest(); + if (object.tag != null) { + if (typeof object.tag !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateTagRequest.tag: object expected"); + message.tag = $root.google.devtools.artifactregistry.v1.Tag.fromObject(object.tag); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateTagRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.UpdateTagRequest} message UpdateTagRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateTagRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tag = null; + object.updateMask = null; + } + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = $root.google.devtools.artifactregistry.v1.Tag.toObject(message.tag, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateTagRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateTagRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateTagRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdateTagRequest"; + }; + + return UpdateTagRequest; + })(); + + v1.DeleteTagRequest = (function() { + + /** + * Properties of a DeleteTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IDeleteTagRequest + * @property {string|null} [name] DeleteTagRequest name + */ + + /** + * Constructs a new DeleteTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a DeleteTagRequest. + * @implements IDeleteTagRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest=} [properties] Properties to set + */ + function DeleteTagRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteTagRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @instance + */ + DeleteTagRequest.prototype.name = ""; + + /** + * Creates a new DeleteTagRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.DeleteTagRequest} DeleteTagRequest instance + */ + DeleteTagRequest.create = function create(properties) { + return new DeleteTagRequest(properties); + }; + + /** + * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteTagRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTagRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteTagRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTagRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.DeleteTagRequest} DeleteTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTagRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DeleteTagRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.DeleteTagRequest} DeleteTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTagRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTagRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTagRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteTagRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.DeleteTagRequest} DeleteTagRequest + */ + DeleteTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteTagRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.DeleteTagRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.DeleteTagRequest} message DeleteTagRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTagRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteTagRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTagRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteTagRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DeleteTagRequest"; + }; + + return DeleteTagRequest; + })(); + + v1.GenericArtifact = (function() { + + /** + * Properties of a GenericArtifact. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGenericArtifact + * @property {string|null} [name] GenericArtifact name + * @property {string|null} [version] GenericArtifact version + * @property {google.protobuf.ITimestamp|null} [createTime] GenericArtifact createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] GenericArtifact updateTime + */ + + /** + * Constructs a new GenericArtifact. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GenericArtifact. + * @implements IGenericArtifact + * @constructor + * @param {google.devtools.artifactregistry.v1.IGenericArtifact=} [properties] Properties to set + */ + function GenericArtifact(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]]; + } + + /** + * GenericArtifact name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GenericArtifact + * @instance + */ + GenericArtifact.prototype.name = ""; + + /** + * GenericArtifact version. + * @member {string} version + * @memberof google.devtools.artifactregistry.v1.GenericArtifact + * @instance + */ + GenericArtifact.prototype.version = ""; + + /** + * GenericArtifact createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1.GenericArtifact + * @instance + */ + GenericArtifact.prototype.createTime = null; + + /** + * GenericArtifact updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.GenericArtifact + * @instance + */ + GenericArtifact.prototype.updateTime = null; + + /** + * Creates a new GenericArtifact instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GenericArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IGenericArtifact=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GenericArtifact} GenericArtifact instance + */ + GenericArtifact.create = function create(properties) { + return new GenericArtifact(properties); + }; + + /** + * Encodes the specified GenericArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.GenericArtifact.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GenericArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IGenericArtifact} message GenericArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenericArtifact.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenericArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GenericArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GenericArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IGenericArtifact} message GenericArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenericArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenericArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GenericArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GenericArtifact} GenericArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenericArtifact.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GenericArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.version = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenericArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GenericArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GenericArtifact} GenericArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenericArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenericArtifact message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GenericArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenericArtifact.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.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 GenericArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GenericArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GenericArtifact} GenericArtifact + */ + GenericArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GenericArtifact) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GenericArtifact(); + if (object.name != null) + message.name = String(object.name); + if (object.version != null) + message.version = String(object.version); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.GenericArtifact.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.GenericArtifact.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a GenericArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GenericArtifact + * @static + * @param {google.devtools.artifactregistry.v1.GenericArtifact} message GenericArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenericArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.version = ""; + object.createTime = null; + object.updateTime = 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.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 GenericArtifact to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GenericArtifact + * @instance + * @returns {Object.} JSON object + */ + GenericArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenericArtifact + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GenericArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenericArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GenericArtifact"; + }; + + return GenericArtifact; + })(); + + v1.GoModule = (function() { + + /** + * Properties of a GoModule. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGoModule + * @property {string|null} [name] GoModule name + * @property {string|null} [version] GoModule version + * @property {google.protobuf.ITimestamp|null} [createTime] GoModule createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] GoModule updateTime + */ + + /** + * Constructs a new GoModule. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GoModule. + * @implements IGoModule + * @constructor + * @param {google.devtools.artifactregistry.v1.IGoModule=} [properties] Properties to set + */ + function GoModule(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]]; + } + + /** + * GoModule name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GoModule + * @instance + */ + GoModule.prototype.name = ""; + + /** + * GoModule version. + * @member {string} version + * @memberof google.devtools.artifactregistry.v1.GoModule + * @instance + */ + GoModule.prototype.version = ""; + + /** + * GoModule createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1.GoModule + * @instance + */ + GoModule.prototype.createTime = null; + + /** + * GoModule updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.GoModule + * @instance + */ + GoModule.prototype.updateTime = null; + + /** + * Creates a new GoModule instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GoModule + * @static + * @param {google.devtools.artifactregistry.v1.IGoModule=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GoModule} GoModule instance + */ + GoModule.create = function create(properties) { + return new GoModule(properties); + }; + + /** + * Encodes the specified GoModule message. Does not implicitly {@link google.devtools.artifactregistry.v1.GoModule.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GoModule + * @static + * @param {google.devtools.artifactregistry.v1.IGoModule} message GoModule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoModule.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoModule message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GoModule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GoModule + * @static + * @param {google.devtools.artifactregistry.v1.IGoModule} message GoModule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoModule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoModule message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GoModule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GoModule} GoModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoModule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GoModule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.version = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoModule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GoModule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GoModule} GoModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoModule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoModule message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GoModule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoModule.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.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 GoModule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GoModule + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GoModule} GoModule + */ + GoModule.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GoModule) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GoModule(); + if (object.name != null) + message.name = String(object.name); + if (object.version != null) + message.version = String(object.version); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.GoModule.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.GoModule.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a GoModule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GoModule + * @static + * @param {google.devtools.artifactregistry.v1.GoModule} message GoModule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoModule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.version = ""; + object.createTime = null; + object.updateTime = 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.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 GoModule to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GoModule + * @instance + * @returns {Object.} JSON object + */ + GoModule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoModule + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GoModule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GoModule"; + }; + + return GoModule; + })(); + + v1.KfpArtifact = (function() { + + /** + * Properties of a KfpArtifact. + * @memberof google.devtools.artifactregistry.v1 + * @interface IKfpArtifact + * @property {string|null} [name] KfpArtifact name + * @property {string|null} [version] KfpArtifact version + */ + + /** + * Constructs a new KfpArtifact. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a KfpArtifact. + * @implements IKfpArtifact + * @constructor + * @param {google.devtools.artifactregistry.v1.IKfpArtifact=} [properties] Properties to set + */ + function KfpArtifact(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]]; + } + + /** + * KfpArtifact name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.KfpArtifact + * @instance + */ + KfpArtifact.prototype.name = ""; + + /** + * KfpArtifact version. + * @member {string} version + * @memberof google.devtools.artifactregistry.v1.KfpArtifact + * @instance + */ + KfpArtifact.prototype.version = ""; + + /** + * Creates a new KfpArtifact instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.KfpArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IKfpArtifact=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.KfpArtifact} KfpArtifact instance + */ + KfpArtifact.create = function create(properties) { + return new KfpArtifact(properties); + }; + + /** + * Encodes the specified KfpArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.KfpArtifact.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.KfpArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IKfpArtifact} message KfpArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KfpArtifact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + return writer; + }; + + /** + * Encodes the specified KfpArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.KfpArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.KfpArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IKfpArtifact} message KfpArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KfpArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KfpArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.KfpArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.KfpArtifact} KfpArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KfpArtifact.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.KfpArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KfpArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.KfpArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.KfpArtifact} KfpArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KfpArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KfpArtifact message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.KfpArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KfpArtifact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a KfpArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.KfpArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.KfpArtifact} KfpArtifact + */ + KfpArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.KfpArtifact) + return object; + var message = new $root.google.devtools.artifactregistry.v1.KfpArtifact(); + if (object.name != null) + message.name = String(object.name); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a KfpArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.KfpArtifact + * @static + * @param {google.devtools.artifactregistry.v1.KfpArtifact} message KfpArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KfpArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.version = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this KfpArtifact to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.KfpArtifact + * @instance + * @returns {Object.} JSON object + */ + KfpArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KfpArtifact + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.KfpArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KfpArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.KfpArtifact"; + }; + + return KfpArtifact; + })(); + + v1.Package = (function() { + + /** + * Properties of a Package. + * @memberof google.devtools.artifactregistry.v1 + * @interface IPackage + * @property {string|null} [name] Package name + * @property {string|null} [displayName] Package displayName + * @property {google.protobuf.ITimestamp|null} [createTime] Package createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Package updateTime + * @property {Object.|null} [annotations] Package annotations + */ + + /** + * Constructs a new Package. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a Package. + * @implements IPackage + * @constructor + * @param {google.devtools.artifactregistry.v1.IPackage=} [properties] Properties to set + */ + function Package(properties) { + this.annotations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Package name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.Package + * @instance + */ + Package.prototype.name = ""; + + /** + * Package displayName. + * @member {string} displayName + * @memberof google.devtools.artifactregistry.v1.Package + * @instance + */ + Package.prototype.displayName = ""; + + /** + * Package createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1.Package + * @instance + */ + Package.prototype.createTime = null; + + /** + * Package updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.Package + * @instance + */ + Package.prototype.updateTime = null; + + /** + * Package annotations. + * @member {Object.} annotations + * @memberof google.devtools.artifactregistry.v1.Package + * @instance + */ + Package.prototype.annotations = $util.emptyObject; + + /** + * Creates a new Package instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {google.devtools.artifactregistry.v1.IPackage=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Package} Package instance + */ + Package.create = function create(properties) { + return new Package(properties); + }; + + /** + * Encodes the specified Package message. Does not implicitly {@link google.devtools.artifactregistry.v1.Package.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {google.devtools.artifactregistry.v1.IPackage} message Package message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Package.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Package message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Package.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {google.devtools.artifactregistry.v1.IPackage} message Package message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Package.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Package message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Package} Package + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Package.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Package(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + case 7: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + 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.annotations[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Package message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Package} Package + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Package.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Package message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Package.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Package message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Package} Package + */ + Package.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Package) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Package(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Package.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Package.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Package.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a Package message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {google.devtools.artifactregistry.v1.Package} message Package + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Package.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.annotations = {}; + 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); + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + return object; + }; + + /** + * Converts this Package to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Package + * @instance + * @returns {Object.} JSON object + */ + Package.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Package + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Package.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Package"; + }; + + return Package; + })(); + + v1.ListPackagesRequest = (function() { + + /** + * Properties of a ListPackagesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListPackagesRequest + * @property {string|null} [parent] ListPackagesRequest parent + * @property {number|null} [pageSize] ListPackagesRequest pageSize + * @property {string|null} [pageToken] ListPackagesRequest pageToken + * @property {string|null} [filter] ListPackagesRequest filter + * @property {string|null} [orderBy] ListPackagesRequest orderBy + */ + + /** + * Constructs a new ListPackagesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListPackagesRequest. + * @implements IListPackagesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListPackagesRequest=} [properties] Properties to set + */ + function ListPackagesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPackagesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @instance + */ + ListPackagesRequest.prototype.parent = ""; + + /** + * ListPackagesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @instance + */ + ListPackagesRequest.prototype.pageSize = 0; + + /** + * ListPackagesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @instance + */ + ListPackagesRequest.prototype.pageToken = ""; + + /** + * ListPackagesRequest filter. + * @member {string} filter + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @instance + */ + ListPackagesRequest.prototype.filter = ""; + + /** + * ListPackagesRequest orderBy. + * @member {string} orderBy + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @instance + */ + ListPackagesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListPackagesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListPackagesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListPackagesRequest} ListPackagesRequest instance + */ + ListPackagesRequest.create = function create(properties) { + return new ListPackagesRequest(properties); + }; + + /** + * Encodes the specified ListPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListPackagesRequest} message ListPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPackagesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListPackagesRequest} message ListPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPackagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListPackagesRequest} ListPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPackagesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListPackagesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPackagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListPackagesRequest} ListPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPackagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPackagesRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPackagesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListPackagesRequest} ListPackagesRequest + */ + ListPackagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListPackagesRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListPackagesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListPackagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListPackagesRequest} message ListPackagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPackagesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListPackagesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @instance + * @returns {Object.} JSON object + */ + ListPackagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPackagesRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPackagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListPackagesRequest"; + }; + + return ListPackagesRequest; + })(); + + v1.ListPackagesResponse = (function() { + + /** + * Properties of a ListPackagesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListPackagesResponse + * @property {Array.|null} [packages] ListPackagesResponse packages + * @property {string|null} [nextPageToken] ListPackagesResponse nextPageToken + */ + + /** + * Constructs a new ListPackagesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListPackagesResponse. + * @implements IListPackagesResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListPackagesResponse=} [properties] Properties to set + */ + function ListPackagesResponse(properties) { + this.packages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPackagesResponse packages. + * @member {Array.} packages + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @instance + */ + ListPackagesResponse.prototype.packages = $util.emptyArray; + + /** + * ListPackagesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @instance + */ + ListPackagesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPackagesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListPackagesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListPackagesResponse} ListPackagesResponse instance + */ + ListPackagesResponse.create = function create(properties) { + return new ListPackagesResponse(properties); + }; + + /** + * Encodes the specified ListPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListPackagesResponse} message ListPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPackagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.packages != null && message.packages.length) + for (var i = 0; i < message.packages.length; ++i) + $root.google.devtools.artifactregistry.v1.Package.encode(message.packages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListPackagesResponse} message ListPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPackagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListPackagesResponse} ListPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPackagesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListPackagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.packages && message.packages.length)) + message.packages = []; + message.packages.push($root.google.devtools.artifactregistry.v1.Package.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPackagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListPackagesResponse} ListPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPackagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPackagesResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPackagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packages != null && message.hasOwnProperty("packages")) { + if (!Array.isArray(message.packages)) + return "packages: array expected"; + for (var i = 0; i < message.packages.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Package.verify(message.packages[i]); + if (error) + return "packages." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListPackagesResponse} ListPackagesResponse + */ + ListPackagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListPackagesResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListPackagesResponse(); + if (object.packages) { + if (!Array.isArray(object.packages)) + throw TypeError(".google.devtools.artifactregistry.v1.ListPackagesResponse.packages: array expected"); + message.packages = []; + for (var i = 0; i < object.packages.length; ++i) { + if (typeof object.packages[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListPackagesResponse.packages: object expected"); + message.packages[i] = $root.google.devtools.artifactregistry.v1.Package.fromObject(object.packages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPackagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListPackagesResponse} message ListPackagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPackagesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.packages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.packages && message.packages.length) { + object.packages = []; + for (var j = 0; j < message.packages.length; ++j) + object.packages[j] = $root.google.devtools.artifactregistry.v1.Package.toObject(message.packages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPackagesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @instance + * @returns {Object.} JSON object + */ + ListPackagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPackagesResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPackagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListPackagesResponse"; + }; + + return ListPackagesResponse; + })(); + + v1.GetPackageRequest = (function() { + + /** + * Properties of a GetPackageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetPackageRequest + * @property {string|null} [name] GetPackageRequest name + */ + + /** + * Constructs a new GetPackageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetPackageRequest. + * @implements IGetPackageRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetPackageRequest=} [properties] Properties to set + */ + function GetPackageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPackageRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @instance + */ + GetPackageRequest.prototype.name = ""; + + /** + * Creates a new GetPackageRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetPackageRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetPackageRequest} GetPackageRequest instance + */ + GetPackageRequest.create = function create(properties) { + return new GetPackageRequest(properties); + }; + + /** + * Encodes the specified GetPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPackageRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetPackageRequest} message GetPackageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPackageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPackageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetPackageRequest} message GetPackageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPackageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPackageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetPackageRequest} GetPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPackageRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetPackageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPackageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetPackageRequest} GetPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPackageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPackageRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPackageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetPackageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetPackageRequest} GetPackageRequest + */ + GetPackageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetPackageRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetPackageRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPackageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetPackageRequest} message GetPackageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPackageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetPackageRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @instance + * @returns {Object.} JSON object + */ + GetPackageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPackageRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPackageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetPackageRequest"; + }; + + return GetPackageRequest; + })(); + + v1.DeletePackageRequest = (function() { + + /** + * Properties of a DeletePackageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IDeletePackageRequest + * @property {string|null} [name] DeletePackageRequest name + */ + + /** + * Constructs a new DeletePackageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a DeletePackageRequest. + * @implements IDeletePackageRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest=} [properties] Properties to set + */ + function DeletePackageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeletePackageRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @instance + */ + DeletePackageRequest.prototype.name = ""; + + /** + * Creates a new DeletePackageRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.DeletePackageRequest} DeletePackageRequest instance + */ + DeletePackageRequest.create = function create(properties) { + return new DeletePackageRequest(properties); + }; + + /** + * Encodes the specified DeletePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeletePackageRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest} message DeletePackageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePackageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeletePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeletePackageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest} message DeletePackageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePackageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePackageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.DeletePackageRequest} DeletePackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePackageRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DeletePackageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeletePackageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.DeletePackageRequest} DeletePackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePackageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePackageRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePackageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeletePackageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.DeletePackageRequest} DeletePackageRequest + */ + DeletePackageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.DeletePackageRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.DeletePackageRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeletePackageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.DeletePackageRequest} message DeletePackageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePackageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeletePackageRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePackageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeletePackageRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePackageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DeletePackageRequest"; + }; + + return DeletePackageRequest; + })(); + + v1.UpdatePackageRequest = (function() { + + /** + * Properties of an UpdatePackageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IUpdatePackageRequest + * @property {google.devtools.artifactregistry.v1.IPackage|null} ["package"] UpdatePackageRequest package + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePackageRequest updateMask + */ + + /** + * Constructs a new UpdatePackageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an UpdatePackageRequest. + * @implements IUpdatePackageRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IUpdatePackageRequest=} [properties] Properties to set + */ + function UpdatePackageRequest(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]]; + } + + /** + * UpdatePackageRequest package. + * @member {google.devtools.artifactregistry.v1.IPackage|null|undefined} package + * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest + * @instance + */ + UpdatePackageRequest.prototype["package"] = null; + + /** + * UpdatePackageRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest + * @instance + */ + UpdatePackageRequest.prototype.updateMask = null; + + /** + * Creates a new UpdatePackageRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdatePackageRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.UpdatePackageRequest} UpdatePackageRequest instance + */ + UpdatePackageRequest.create = function create(properties) { + return new UpdatePackageRequest(properties); + }; + + /** + * Encodes the specified UpdatePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdatePackageRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdatePackageRequest} message UpdatePackageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePackageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + $root.google.devtools.artifactregistry.v1.Package.encode(message["package"], 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 UpdatePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdatePackageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdatePackageRequest} message UpdatePackageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePackageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdatePackageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.UpdatePackageRequest} UpdatePackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePackageRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdatePackageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message["package"] = $root.google.devtools.artifactregistry.v1.Package.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 UpdatePackageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.UpdatePackageRequest} UpdatePackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePackageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdatePackageRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePackageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message["package"] != null && message.hasOwnProperty("package")) { + var error = $root.google.devtools.artifactregistry.v1.Package.verify(message["package"]); + if (error) + return "package." + 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 UpdatePackageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.UpdatePackageRequest} UpdatePackageRequest + */ + UpdatePackageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.UpdatePackageRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.UpdatePackageRequest(); + if (object["package"] != null) { + if (typeof object["package"] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdatePackageRequest.package: object expected"); + message["package"] = $root.google.devtools.artifactregistry.v1.Package.fromObject(object["package"]); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdatePackageRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdatePackageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.UpdatePackageRequest} message UpdatePackageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePackageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object["package"] = null; + object.updateMask = null; + } + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = $root.google.devtools.artifactregistry.v1.Package.toObject(message["package"], options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdatePackageRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest + * @instance + * @returns {Object.} JSON object + */ + UpdatePackageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdatePackageRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdatePackageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdatePackageRequest"; + }; + + return UpdatePackageRequest; + })(); + + v1.UpstreamPolicy = (function() { + + /** + * Properties of an UpstreamPolicy. + * @memberof google.devtools.artifactregistry.v1 + * @interface IUpstreamPolicy + * @property {string|null} [id] UpstreamPolicy id + * @property {string|null} [repository] UpstreamPolicy repository + * @property {number|null} [priority] UpstreamPolicy priority + */ + + /** + * Constructs a new UpstreamPolicy. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an UpstreamPolicy. + * @implements IUpstreamPolicy + * @constructor + * @param {google.devtools.artifactregistry.v1.IUpstreamPolicy=} [properties] Properties to set + */ + function UpstreamPolicy(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]]; + } + + /** + * UpstreamPolicy id. + * @member {string} id + * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy + * @instance + */ + UpstreamPolicy.prototype.id = ""; + + /** + * UpstreamPolicy repository. + * @member {string} repository + * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy + * @instance + */ + UpstreamPolicy.prototype.repository = ""; + + /** + * UpstreamPolicy priority. + * @member {number} priority + * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy + * @instance + */ + UpstreamPolicy.prototype.priority = 0; + + /** + * Creates a new UpstreamPolicy instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy + * @static + * @param {google.devtools.artifactregistry.v1.IUpstreamPolicy=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.UpstreamPolicy} UpstreamPolicy instance + */ + UpstreamPolicy.create = function create(properties) { + return new UpstreamPolicy(properties); + }; + + /** + * Encodes the specified UpstreamPolicy message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpstreamPolicy.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy + * @static + * @param {google.devtools.artifactregistry.v1.IUpstreamPolicy} message UpstreamPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpstreamPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.repository); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.priority); + return writer; + }; + + /** + * Encodes the specified UpstreamPolicy message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpstreamPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy + * @static + * @param {google.devtools.artifactregistry.v1.IUpstreamPolicy} message UpstreamPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpstreamPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpstreamPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.UpstreamPolicy} UpstreamPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpstreamPolicy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpstreamPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.repository = reader.string(); + break; + } + case 3: { + message.priority = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpstreamPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.UpstreamPolicy} UpstreamPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpstreamPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpstreamPolicy message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpstreamPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.repository != null && message.hasOwnProperty("repository")) + if (!$util.isString(message.repository)) + return "repository: string expected"; + if (message.priority != null && message.hasOwnProperty("priority")) + if (!$util.isInteger(message.priority)) + return "priority: integer expected"; + return null; + }; + + /** + * Creates an UpstreamPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.UpstreamPolicy} UpstreamPolicy + */ + UpstreamPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.UpstreamPolicy) + return object; + var message = new $root.google.devtools.artifactregistry.v1.UpstreamPolicy(); + if (object.id != null) + message.id = String(object.id); + if (object.repository != null) + message.repository = String(object.repository); + if (object.priority != null) + message.priority = object.priority | 0; + return message; + }; + + /** + * Creates a plain object from an UpstreamPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy + * @static + * @param {google.devtools.artifactregistry.v1.UpstreamPolicy} message UpstreamPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpstreamPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.repository = ""; + object.priority = 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = message.repository; + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = message.priority; + return object; + }; + + /** + * Converts this UpstreamPolicy to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy + * @instance + * @returns {Object.} JSON object + */ + UpstreamPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpstreamPolicy + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpstreamPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpstreamPolicy"; + }; + + return UpstreamPolicy; + })(); + + v1.CleanupPolicyCondition = (function() { + + /** + * Properties of a CleanupPolicyCondition. + * @memberof google.devtools.artifactregistry.v1 + * @interface ICleanupPolicyCondition + * @property {google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState|null} [tagState] CleanupPolicyCondition tagState + * @property {Array.|null} [tagPrefixes] CleanupPolicyCondition tagPrefixes + * @property {Array.|null} [versionNamePrefixes] CleanupPolicyCondition versionNamePrefixes + * @property {Array.|null} [packageNamePrefixes] CleanupPolicyCondition packageNamePrefixes + * @property {google.protobuf.IDuration|null} [olderThan] CleanupPolicyCondition olderThan + * @property {google.protobuf.IDuration|null} [newerThan] CleanupPolicyCondition newerThan + */ + + /** + * Constructs a new CleanupPolicyCondition. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a CleanupPolicyCondition. + * @implements ICleanupPolicyCondition + * @constructor + * @param {google.devtools.artifactregistry.v1.ICleanupPolicyCondition=} [properties] Properties to set + */ + function CleanupPolicyCondition(properties) { + this.tagPrefixes = []; + this.versionNamePrefixes = []; + this.packageNamePrefixes = []; + 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]]; + } + + /** + * CleanupPolicyCondition tagState. + * @member {google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState|null|undefined} tagState + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @instance + */ + CleanupPolicyCondition.prototype.tagState = null; + + /** + * CleanupPolicyCondition tagPrefixes. + * @member {Array.} tagPrefixes + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @instance + */ + CleanupPolicyCondition.prototype.tagPrefixes = $util.emptyArray; + + /** + * CleanupPolicyCondition versionNamePrefixes. + * @member {Array.} versionNamePrefixes + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @instance + */ + CleanupPolicyCondition.prototype.versionNamePrefixes = $util.emptyArray; + + /** + * CleanupPolicyCondition packageNamePrefixes. + * @member {Array.} packageNamePrefixes + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @instance + */ + CleanupPolicyCondition.prototype.packageNamePrefixes = $util.emptyArray; + + /** + * CleanupPolicyCondition olderThan. + * @member {google.protobuf.IDuration|null|undefined} olderThan + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @instance + */ + CleanupPolicyCondition.prototype.olderThan = null; + + /** + * CleanupPolicyCondition newerThan. + * @member {google.protobuf.IDuration|null|undefined} newerThan + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @instance + */ + CleanupPolicyCondition.prototype.newerThan = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CleanupPolicyCondition.prototype, "_tagState", { + get: $util.oneOfGetter($oneOfFields = ["tagState"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CleanupPolicyCondition.prototype, "_olderThan", { + get: $util.oneOfGetter($oneOfFields = ["olderThan"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CleanupPolicyCondition.prototype, "_newerThan", { + get: $util.oneOfGetter($oneOfFields = ["newerThan"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CleanupPolicyCondition instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @static + * @param {google.devtools.artifactregistry.v1.ICleanupPolicyCondition=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.CleanupPolicyCondition} CleanupPolicyCondition instance + */ + CleanupPolicyCondition.create = function create(properties) { + return new CleanupPolicyCondition(properties); + }; + + /** + * Encodes the specified CleanupPolicyCondition message. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyCondition.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @static + * @param {google.devtools.artifactregistry.v1.ICleanupPolicyCondition} message CleanupPolicyCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CleanupPolicyCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tagState != null && Object.hasOwnProperty.call(message, "tagState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.tagState); + if (message.tagPrefixes != null && message.tagPrefixes.length) + for (var i = 0; i < message.tagPrefixes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tagPrefixes[i]); + if (message.versionNamePrefixes != null && message.versionNamePrefixes.length) + for (var i = 0; i < message.versionNamePrefixes.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.versionNamePrefixes[i]); + if (message.packageNamePrefixes != null && message.packageNamePrefixes.length) + for (var i = 0; i < message.packageNamePrefixes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.packageNamePrefixes[i]); + if (message.olderThan != null && Object.hasOwnProperty.call(message, "olderThan")) + $root.google.protobuf.Duration.encode(message.olderThan, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.newerThan != null && Object.hasOwnProperty.call(message, "newerThan")) + $root.google.protobuf.Duration.encode(message.newerThan, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CleanupPolicyCondition message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @static + * @param {google.devtools.artifactregistry.v1.ICleanupPolicyCondition} message CleanupPolicyCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CleanupPolicyCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CleanupPolicyCondition message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.CleanupPolicyCondition} CleanupPolicyCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CleanupPolicyCondition.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.tagState = reader.int32(); + break; + } + case 3: { + if (!(message.tagPrefixes && message.tagPrefixes.length)) + message.tagPrefixes = []; + message.tagPrefixes.push(reader.string()); + break; + } + case 4: { + if (!(message.versionNamePrefixes && message.versionNamePrefixes.length)) + message.versionNamePrefixes = []; + message.versionNamePrefixes.push(reader.string()); + break; + } + case 5: { + if (!(message.packageNamePrefixes && message.packageNamePrefixes.length)) + message.packageNamePrefixes = []; + message.packageNamePrefixes.push(reader.string()); + break; + } + case 6: { + message.olderThan = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 7: { + message.newerThan = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CleanupPolicyCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.CleanupPolicyCondition} CleanupPolicyCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CleanupPolicyCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CleanupPolicyCondition message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CleanupPolicyCondition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.tagState != null && message.hasOwnProperty("tagState")) { + properties._tagState = 1; + switch (message.tagState) { + default: + return "tagState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.tagPrefixes != null && message.hasOwnProperty("tagPrefixes")) { + if (!Array.isArray(message.tagPrefixes)) + return "tagPrefixes: array expected"; + for (var i = 0; i < message.tagPrefixes.length; ++i) + if (!$util.isString(message.tagPrefixes[i])) + return "tagPrefixes: string[] expected"; + } + if (message.versionNamePrefixes != null && message.hasOwnProperty("versionNamePrefixes")) { + if (!Array.isArray(message.versionNamePrefixes)) + return "versionNamePrefixes: array expected"; + for (var i = 0; i < message.versionNamePrefixes.length; ++i) + if (!$util.isString(message.versionNamePrefixes[i])) + return "versionNamePrefixes: string[] expected"; + } + if (message.packageNamePrefixes != null && message.hasOwnProperty("packageNamePrefixes")) { + if (!Array.isArray(message.packageNamePrefixes)) + return "packageNamePrefixes: array expected"; + for (var i = 0; i < message.packageNamePrefixes.length; ++i) + if (!$util.isString(message.packageNamePrefixes[i])) + return "packageNamePrefixes: string[] expected"; + } + if (message.olderThan != null && message.hasOwnProperty("olderThan")) { + properties._olderThan = 1; + { + var error = $root.google.protobuf.Duration.verify(message.olderThan); + if (error) + return "olderThan." + error; + } + } + if (message.newerThan != null && message.hasOwnProperty("newerThan")) { + properties._newerThan = 1; + { + var error = $root.google.protobuf.Duration.verify(message.newerThan); + if (error) + return "newerThan." + error; + } + } + return null; + }; + + /** + * Creates a CleanupPolicyCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.CleanupPolicyCondition} CleanupPolicyCondition + */ + CleanupPolicyCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition) + return object; + var message = new $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition(); + switch (object.tagState) { + default: + if (typeof object.tagState === "number") { + message.tagState = object.tagState; + break; + } + break; + case "TAG_STATE_UNSPECIFIED": + case 0: + message.tagState = 0; + break; + case "TAGGED": + case 1: + message.tagState = 1; + break; + case "UNTAGGED": + case 2: + message.tagState = 2; + break; + case "ANY": + case 3: + message.tagState = 3; + break; + } + if (object.tagPrefixes) { + if (!Array.isArray(object.tagPrefixes)) + throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicyCondition.tagPrefixes: array expected"); + message.tagPrefixes = []; + for (var i = 0; i < object.tagPrefixes.length; ++i) + message.tagPrefixes[i] = String(object.tagPrefixes[i]); + } + if (object.versionNamePrefixes) { + if (!Array.isArray(object.versionNamePrefixes)) + throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicyCondition.versionNamePrefixes: array expected"); + message.versionNamePrefixes = []; + for (var i = 0; i < object.versionNamePrefixes.length; ++i) + message.versionNamePrefixes[i] = String(object.versionNamePrefixes[i]); + } + if (object.packageNamePrefixes) { + if (!Array.isArray(object.packageNamePrefixes)) + throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicyCondition.packageNamePrefixes: array expected"); + message.packageNamePrefixes = []; + for (var i = 0; i < object.packageNamePrefixes.length; ++i) + message.packageNamePrefixes[i] = String(object.packageNamePrefixes[i]); + } + if (object.olderThan != null) { + if (typeof object.olderThan !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicyCondition.olderThan: object expected"); + message.olderThan = $root.google.protobuf.Duration.fromObject(object.olderThan); + } + if (object.newerThan != null) { + if (typeof object.newerThan !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicyCondition.newerThan: object expected"); + message.newerThan = $root.google.protobuf.Duration.fromObject(object.newerThan); + } + return message; + }; + + /** + * Creates a plain object from a CleanupPolicyCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @static + * @param {google.devtools.artifactregistry.v1.CleanupPolicyCondition} message CleanupPolicyCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CleanupPolicyCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.tagPrefixes = []; + object.versionNamePrefixes = []; + object.packageNamePrefixes = []; + } + if (message.tagState != null && message.hasOwnProperty("tagState")) { + object.tagState = options.enums === String ? $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState[message.tagState] === undefined ? message.tagState : $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState[message.tagState] : message.tagState; + if (options.oneofs) + object._tagState = "tagState"; + } + if (message.tagPrefixes && message.tagPrefixes.length) { + object.tagPrefixes = []; + for (var j = 0; j < message.tagPrefixes.length; ++j) + object.tagPrefixes[j] = message.tagPrefixes[j]; + } + if (message.versionNamePrefixes && message.versionNamePrefixes.length) { + object.versionNamePrefixes = []; + for (var j = 0; j < message.versionNamePrefixes.length; ++j) + object.versionNamePrefixes[j] = message.versionNamePrefixes[j]; + } + if (message.packageNamePrefixes && message.packageNamePrefixes.length) { + object.packageNamePrefixes = []; + for (var j = 0; j < message.packageNamePrefixes.length; ++j) + object.packageNamePrefixes[j] = message.packageNamePrefixes[j]; + } + if (message.olderThan != null && message.hasOwnProperty("olderThan")) { + object.olderThan = $root.google.protobuf.Duration.toObject(message.olderThan, options); + if (options.oneofs) + object._olderThan = "olderThan"; + } + if (message.newerThan != null && message.hasOwnProperty("newerThan")) { + object.newerThan = $root.google.protobuf.Duration.toObject(message.newerThan, options); + if (options.oneofs) + object._newerThan = "newerThan"; + } + return object; + }; + + /** + * Converts this CleanupPolicyCondition to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @instance + * @returns {Object.} JSON object + */ + CleanupPolicyCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CleanupPolicyCondition + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CleanupPolicyCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.CleanupPolicyCondition"; + }; + + /** + * TagState enum. + * @name google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState + * @enum {number} + * @property {number} TAG_STATE_UNSPECIFIED=0 TAG_STATE_UNSPECIFIED value + * @property {number} TAGGED=1 TAGGED value + * @property {number} UNTAGGED=2 UNTAGGED value + * @property {number} ANY=3 ANY value + */ + CleanupPolicyCondition.TagState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TAG_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TAGGED"] = 1; + values[valuesById[2] = "UNTAGGED"] = 2; + values[valuesById[3] = "ANY"] = 3; + return values; + })(); + + return CleanupPolicyCondition; + })(); + + v1.CleanupPolicyMostRecentVersions = (function() { + + /** + * Properties of a CleanupPolicyMostRecentVersions. + * @memberof google.devtools.artifactregistry.v1 + * @interface ICleanupPolicyMostRecentVersions + * @property {Array.|null} [packageNamePrefixes] CleanupPolicyMostRecentVersions packageNamePrefixes + * @property {number|null} [keepCount] CleanupPolicyMostRecentVersions keepCount + */ + + /** + * Constructs a new CleanupPolicyMostRecentVersions. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a CleanupPolicyMostRecentVersions. + * @implements ICleanupPolicyMostRecentVersions + * @constructor + * @param {google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions=} [properties] Properties to set + */ + function CleanupPolicyMostRecentVersions(properties) { + this.packageNamePrefixes = []; + 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]]; + } + + /** + * CleanupPolicyMostRecentVersions packageNamePrefixes. + * @member {Array.} packageNamePrefixes + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + * @instance + */ + CleanupPolicyMostRecentVersions.prototype.packageNamePrefixes = $util.emptyArray; + + /** + * CleanupPolicyMostRecentVersions keepCount. + * @member {number|null|undefined} keepCount + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + * @instance + */ + CleanupPolicyMostRecentVersions.prototype.keepCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CleanupPolicyMostRecentVersions.prototype, "_keepCount", { + get: $util.oneOfGetter($oneOfFields = ["keepCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CleanupPolicyMostRecentVersions instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + * @static + * @param {google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions} CleanupPolicyMostRecentVersions instance + */ + CleanupPolicyMostRecentVersions.create = function create(properties) { + return new CleanupPolicyMostRecentVersions(properties); + }; + + /** + * Encodes the specified CleanupPolicyMostRecentVersions message. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + * @static + * @param {google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions} message CleanupPolicyMostRecentVersions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CleanupPolicyMostRecentVersions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.packageNamePrefixes != null && message.packageNamePrefixes.length) + for (var i = 0; i < message.packageNamePrefixes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.packageNamePrefixes[i]); + if (message.keepCount != null && Object.hasOwnProperty.call(message, "keepCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.keepCount); + return writer; + }; + + /** + * Encodes the specified CleanupPolicyMostRecentVersions message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + * @static + * @param {google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions} message CleanupPolicyMostRecentVersions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CleanupPolicyMostRecentVersions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CleanupPolicyMostRecentVersions message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions} CleanupPolicyMostRecentVersions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CleanupPolicyMostRecentVersions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.packageNamePrefixes && message.packageNamePrefixes.length)) + message.packageNamePrefixes = []; + message.packageNamePrefixes.push(reader.string()); + break; + } + case 2: { + message.keepCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CleanupPolicyMostRecentVersions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions} CleanupPolicyMostRecentVersions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CleanupPolicyMostRecentVersions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CleanupPolicyMostRecentVersions message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CleanupPolicyMostRecentVersions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.packageNamePrefixes != null && message.hasOwnProperty("packageNamePrefixes")) { + if (!Array.isArray(message.packageNamePrefixes)) + return "packageNamePrefixes: array expected"; + for (var i = 0; i < message.packageNamePrefixes.length; ++i) + if (!$util.isString(message.packageNamePrefixes[i])) + return "packageNamePrefixes: string[] expected"; + } + if (message.keepCount != null && message.hasOwnProperty("keepCount")) { + properties._keepCount = 1; + if (!$util.isInteger(message.keepCount)) + return "keepCount: integer expected"; + } + return null; + }; + + /** + * Creates a CleanupPolicyMostRecentVersions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions} CleanupPolicyMostRecentVersions + */ + CleanupPolicyMostRecentVersions.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) + return object; + var message = new $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions(); + if (object.packageNamePrefixes) { + if (!Array.isArray(object.packageNamePrefixes)) + throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.packageNamePrefixes: array expected"); + message.packageNamePrefixes = []; + for (var i = 0; i < object.packageNamePrefixes.length; ++i) + message.packageNamePrefixes[i] = String(object.packageNamePrefixes[i]); + } + if (object.keepCount != null) + message.keepCount = object.keepCount | 0; + return message; + }; + + /** + * Creates a plain object from a CleanupPolicyMostRecentVersions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + * @static + * @param {google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions} message CleanupPolicyMostRecentVersions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CleanupPolicyMostRecentVersions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.packageNamePrefixes = []; + if (message.packageNamePrefixes && message.packageNamePrefixes.length) { + object.packageNamePrefixes = []; + for (var j = 0; j < message.packageNamePrefixes.length; ++j) + object.packageNamePrefixes[j] = message.packageNamePrefixes[j]; + } + if (message.keepCount != null && message.hasOwnProperty("keepCount")) { + object.keepCount = message.keepCount; + if (options.oneofs) + object._keepCount = "keepCount"; + } + return object; + }; + + /** + * Converts this CleanupPolicyMostRecentVersions to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + * @instance + * @returns {Object.} JSON object + */ + CleanupPolicyMostRecentVersions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CleanupPolicyMostRecentVersions + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CleanupPolicyMostRecentVersions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions"; + }; + + return CleanupPolicyMostRecentVersions; + })(); + + v1.CleanupPolicy = (function() { + + /** + * Properties of a CleanupPolicy. + * @memberof google.devtools.artifactregistry.v1 + * @interface ICleanupPolicy + * @property {google.devtools.artifactregistry.v1.ICleanupPolicyCondition|null} [condition] CleanupPolicy condition + * @property {google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions|null} [mostRecentVersions] CleanupPolicy mostRecentVersions + * @property {string|null} [id] CleanupPolicy id + * @property {google.devtools.artifactregistry.v1.CleanupPolicy.Action|null} [action] CleanupPolicy action + */ + + /** + * Constructs a new CleanupPolicy. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a CleanupPolicy. + * @implements ICleanupPolicy + * @constructor + * @param {google.devtools.artifactregistry.v1.ICleanupPolicy=} [properties] Properties to set + */ + function CleanupPolicy(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]]; + } + + /** + * CleanupPolicy condition. + * @member {google.devtools.artifactregistry.v1.ICleanupPolicyCondition|null|undefined} condition + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @instance + */ + CleanupPolicy.prototype.condition = null; + + /** + * CleanupPolicy mostRecentVersions. + * @member {google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions|null|undefined} mostRecentVersions + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @instance + */ + CleanupPolicy.prototype.mostRecentVersions = null; + + /** + * CleanupPolicy id. + * @member {string} id + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @instance + */ + CleanupPolicy.prototype.id = ""; + + /** + * CleanupPolicy action. + * @member {google.devtools.artifactregistry.v1.CleanupPolicy.Action} action + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @instance + */ + CleanupPolicy.prototype.action = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CleanupPolicy conditionType. + * @member {"condition"|"mostRecentVersions"|undefined} conditionType + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @instance + */ + Object.defineProperty(CleanupPolicy.prototype, "conditionType", { + get: $util.oneOfGetter($oneOfFields = ["condition", "mostRecentVersions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CleanupPolicy instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @static + * @param {google.devtools.artifactregistry.v1.ICleanupPolicy=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.CleanupPolicy} CleanupPolicy instance + */ + CleanupPolicy.create = function create(properties) { + return new CleanupPolicy(properties); + }; + + /** + * Encodes the specified CleanupPolicy message. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicy.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @static + * @param {google.devtools.artifactregistry.v1.ICleanupPolicy} message CleanupPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CleanupPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition.encode(message.condition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.action); + if (message.mostRecentVersions != null && Object.hasOwnProperty.call(message, "mostRecentVersions")) + $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.encode(message.mostRecentVersions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CleanupPolicy message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @static + * @param {google.devtools.artifactregistry.v1.ICleanupPolicy} message CleanupPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CleanupPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CleanupPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.CleanupPolicy} CleanupPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CleanupPolicy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.CleanupPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.condition = $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition.decode(reader, reader.uint32()); + break; + } + case 4: { + message.mostRecentVersions = $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.decode(reader, reader.uint32()); + break; + } + case 1: { + message.id = reader.string(); + break; + } + case 3: { + message.action = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CleanupPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.CleanupPolicy} CleanupPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CleanupPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CleanupPolicy message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CleanupPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.condition != null && message.hasOwnProperty("condition")) { + properties.conditionType = 1; + { + var error = $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition.verify(message.condition); + if (error) + return "condition." + error; + } + } + if (message.mostRecentVersions != null && message.hasOwnProperty("mostRecentVersions")) { + if (properties.conditionType === 1) + return "conditionType: multiple values"; + properties.conditionType = 1; + { + var error = $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.verify(message.mostRecentVersions); + if (error) + return "mostRecentVersions." + error; + } + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a CleanupPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.CleanupPolicy} CleanupPolicy + */ + CleanupPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.CleanupPolicy) + return object; + var message = new $root.google.devtools.artifactregistry.v1.CleanupPolicy(); + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicy.condition: object expected"); + message.condition = $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition.fromObject(object.condition); + } + if (object.mostRecentVersions != null) { + if (typeof object.mostRecentVersions !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicy.mostRecentVersions: object expected"); + message.mostRecentVersions = $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.fromObject(object.mostRecentVersions); + } + if (object.id != null) + message.id = String(object.id); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "DELETE": + case 1: + message.action = 1; + break; + case "KEEP": + case 2: + message.action = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a CleanupPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @static + * @param {google.devtools.artifactregistry.v1.CleanupPolicy} message CleanupPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CleanupPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.condition != null && message.hasOwnProperty("condition")) { + object.condition = $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition.toObject(message.condition, options); + if (options.oneofs) + object.conditionType = "condition"; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.devtools.artifactregistry.v1.CleanupPolicy.Action[message.action] === undefined ? message.action : $root.google.devtools.artifactregistry.v1.CleanupPolicy.Action[message.action] : message.action; + if (message.mostRecentVersions != null && message.hasOwnProperty("mostRecentVersions")) { + object.mostRecentVersions = $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.toObject(message.mostRecentVersions, options); + if (options.oneofs) + object.conditionType = "mostRecentVersions"; + } + return object; + }; + + /** + * Converts this CleanupPolicy to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @instance + * @returns {Object.} JSON object + */ + CleanupPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CleanupPolicy + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.CleanupPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CleanupPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.CleanupPolicy"; + }; + + /** + * Action enum. + * @name google.devtools.artifactregistry.v1.CleanupPolicy.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} DELETE=1 DELETE value + * @property {number} KEEP=2 KEEP value + */ + CleanupPolicy.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "DELETE"] = 1; + values[valuesById[2] = "KEEP"] = 2; + return values; + })(); + + return CleanupPolicy; + })(); + + v1.VirtualRepositoryConfig = (function() { + + /** + * Properties of a VirtualRepositoryConfig. + * @memberof google.devtools.artifactregistry.v1 + * @interface IVirtualRepositoryConfig + * @property {Array.|null} [upstreamPolicies] VirtualRepositoryConfig upstreamPolicies + */ + + /** + * Constructs a new VirtualRepositoryConfig. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a VirtualRepositoryConfig. + * @implements IVirtualRepositoryConfig + * @constructor + * @param {google.devtools.artifactregistry.v1.IVirtualRepositoryConfig=} [properties] Properties to set + */ + function VirtualRepositoryConfig(properties) { + this.upstreamPolicies = []; + 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]]; + } + + /** + * VirtualRepositoryConfig upstreamPolicies. + * @member {Array.} upstreamPolicies + * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig + * @instance + */ + VirtualRepositoryConfig.prototype.upstreamPolicies = $util.emptyArray; + + /** + * Creates a new VirtualRepositoryConfig instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.IVirtualRepositoryConfig=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.VirtualRepositoryConfig} VirtualRepositoryConfig instance + */ + VirtualRepositoryConfig.create = function create(properties) { + return new VirtualRepositoryConfig(properties); + }; + + /** + * Encodes the specified VirtualRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.VirtualRepositoryConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.IVirtualRepositoryConfig} message VirtualRepositoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VirtualRepositoryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.upstreamPolicies != null && message.upstreamPolicies.length) + for (var i = 0; i < message.upstreamPolicies.length; ++i) + $root.google.devtools.artifactregistry.v1.UpstreamPolicy.encode(message.upstreamPolicies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VirtualRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.VirtualRepositoryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.IVirtualRepositoryConfig} message VirtualRepositoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VirtualRepositoryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VirtualRepositoryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.VirtualRepositoryConfig} VirtualRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VirtualRepositoryConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.upstreamPolicies && message.upstreamPolicies.length)) + message.upstreamPolicies = []; + message.upstreamPolicies.push($root.google.devtools.artifactregistry.v1.UpstreamPolicy.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VirtualRepositoryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.VirtualRepositoryConfig} VirtualRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VirtualRepositoryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VirtualRepositoryConfig message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VirtualRepositoryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.upstreamPolicies != null && message.hasOwnProperty("upstreamPolicies")) { + if (!Array.isArray(message.upstreamPolicies)) + return "upstreamPolicies: array expected"; + for (var i = 0; i < message.upstreamPolicies.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.UpstreamPolicy.verify(message.upstreamPolicies[i]); + if (error) + return "upstreamPolicies." + error; + } + } + return null; + }; + + /** + * Creates a VirtualRepositoryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.VirtualRepositoryConfig} VirtualRepositoryConfig + */ + VirtualRepositoryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig) + return object; + var message = new $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig(); + if (object.upstreamPolicies) { + if (!Array.isArray(object.upstreamPolicies)) + throw TypeError(".google.devtools.artifactregistry.v1.VirtualRepositoryConfig.upstreamPolicies: array expected"); + message.upstreamPolicies = []; + for (var i = 0; i < object.upstreamPolicies.length; ++i) { + if (typeof object.upstreamPolicies[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.VirtualRepositoryConfig.upstreamPolicies: object expected"); + message.upstreamPolicies[i] = $root.google.devtools.artifactregistry.v1.UpstreamPolicy.fromObject(object.upstreamPolicies[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a VirtualRepositoryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.VirtualRepositoryConfig} message VirtualRepositoryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VirtualRepositoryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.upstreamPolicies = []; + if (message.upstreamPolicies && message.upstreamPolicies.length) { + object.upstreamPolicies = []; + for (var j = 0; j < message.upstreamPolicies.length; ++j) + object.upstreamPolicies[j] = $root.google.devtools.artifactregistry.v1.UpstreamPolicy.toObject(message.upstreamPolicies[j], options); + } + return object; + }; + + /** + * Converts this VirtualRepositoryConfig to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig + * @instance + * @returns {Object.} JSON object + */ + VirtualRepositoryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VirtualRepositoryConfig + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VirtualRepositoryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.VirtualRepositoryConfig"; + }; + + return VirtualRepositoryConfig; + })(); + + v1.RemoteRepositoryConfig = (function() { + + /** + * Properties of a RemoteRepositoryConfig. + * @memberof google.devtools.artifactregistry.v1 + * @interface IRemoteRepositoryConfig + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository|null} [dockerRepository] RemoteRepositoryConfig dockerRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository|null} [mavenRepository] RemoteRepositoryConfig mavenRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository|null} [npmRepository] RemoteRepositoryConfig npmRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository|null} [pythonRepository] RemoteRepositoryConfig pythonRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository|null} [aptRepository] RemoteRepositoryConfig aptRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository|null} [yumRepository] RemoteRepositoryConfig yumRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository|null} [commonRepository] RemoteRepositoryConfig commonRepository + * @property {string|null} [description] RemoteRepositoryConfig description + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials|null} [upstreamCredentials] RemoteRepositoryConfig upstreamCredentials + * @property {boolean|null} [disableUpstreamValidation] RemoteRepositoryConfig disableUpstreamValidation + */ + + /** + * Constructs a new RemoteRepositoryConfig. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a RemoteRepositoryConfig. + * @implements IRemoteRepositoryConfig + * @constructor + * @param {google.devtools.artifactregistry.v1.IRemoteRepositoryConfig=} [properties] Properties to set + */ + function RemoteRepositoryConfig(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]]; + } + + /** + * RemoteRepositoryConfig dockerRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository|null|undefined} dockerRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @instance + */ + RemoteRepositoryConfig.prototype.dockerRepository = null; + + /** + * RemoteRepositoryConfig mavenRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository|null|undefined} mavenRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @instance + */ + RemoteRepositoryConfig.prototype.mavenRepository = null; + + /** + * RemoteRepositoryConfig npmRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository|null|undefined} npmRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @instance + */ + RemoteRepositoryConfig.prototype.npmRepository = null; + + /** + * RemoteRepositoryConfig pythonRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository|null|undefined} pythonRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @instance + */ + RemoteRepositoryConfig.prototype.pythonRepository = null; + + /** + * RemoteRepositoryConfig aptRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository|null|undefined} aptRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @instance + */ + RemoteRepositoryConfig.prototype.aptRepository = null; + + /** + * RemoteRepositoryConfig yumRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository|null|undefined} yumRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @instance + */ + RemoteRepositoryConfig.prototype.yumRepository = null; + + /** + * RemoteRepositoryConfig commonRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository|null|undefined} commonRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @instance + */ + RemoteRepositoryConfig.prototype.commonRepository = null; + + /** + * RemoteRepositoryConfig description. + * @member {string} description + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @instance + */ + RemoteRepositoryConfig.prototype.description = ""; + + /** + * RemoteRepositoryConfig upstreamCredentials. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials|null|undefined} upstreamCredentials + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @instance + */ + RemoteRepositoryConfig.prototype.upstreamCredentials = null; + + /** + * RemoteRepositoryConfig disableUpstreamValidation. + * @member {boolean} disableUpstreamValidation + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @instance + */ + RemoteRepositoryConfig.prototype.disableUpstreamValidation = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RemoteRepositoryConfig remoteSource. + * @member {"dockerRepository"|"mavenRepository"|"npmRepository"|"pythonRepository"|"aptRepository"|"yumRepository"|"commonRepository"|undefined} remoteSource + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @instance + */ + Object.defineProperty(RemoteRepositoryConfig.prototype, "remoteSource", { + get: $util.oneOfGetter($oneOfFields = ["dockerRepository", "mavenRepository", "npmRepository", "pythonRepository", "aptRepository", "yumRepository", "commonRepository"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RemoteRepositoryConfig instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.IRemoteRepositoryConfig=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig} RemoteRepositoryConfig instance + */ + RemoteRepositoryConfig.create = function create(properties) { + return new RemoteRepositoryConfig(properties); + }; + + /** + * Encodes the specified RemoteRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.IRemoteRepositoryConfig} message RemoteRepositoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoteRepositoryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.dockerRepository != null && Object.hasOwnProperty.call(message, "dockerRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.encode(message.dockerRepository, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.mavenRepository != null && Object.hasOwnProperty.call(message, "mavenRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.encode(message.mavenRepository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.npmRepository != null && Object.hasOwnProperty.call(message, "npmRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.encode(message.npmRepository, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.pythonRepository != null && Object.hasOwnProperty.call(message, "pythonRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.encode(message.pythonRepository, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.aptRepository != null && Object.hasOwnProperty.call(message, "aptRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.encode(message.aptRepository, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.yumRepository != null && Object.hasOwnProperty.call(message, "yumRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.encode(message.yumRepository, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.upstreamCredentials != null && Object.hasOwnProperty.call(message, "upstreamCredentials")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.encode(message.upstreamCredentials, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.disableUpstreamValidation != null && Object.hasOwnProperty.call(message, "disableUpstreamValidation")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.disableUpstreamValidation); + if (message.commonRepository != null && Object.hasOwnProperty.call(message, "commonRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.encode(message.commonRepository, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RemoteRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.IRemoteRepositoryConfig} message RemoteRepositoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoteRepositoryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoteRepositoryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig} RemoteRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoteRepositoryConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.dockerRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.decode(reader, reader.uint32()); + break; + } + case 3: { + message.mavenRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.decode(reader, reader.uint32()); + break; + } + case 4: { + message.npmRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.decode(reader, reader.uint32()); + break; + } + case 5: { + message.pythonRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.decode(reader, reader.uint32()); + break; + } + case 6: { + message.aptRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.decode(reader, reader.uint32()); + break; + } + case 7: { + message.yumRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.decode(reader, reader.uint32()); + break; + } + case 14: { + message.commonRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.decode(reader, reader.uint32()); + break; + } + case 1: { + message.description = reader.string(); + break; + } + case 9: { + message.upstreamCredentials = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.decode(reader, reader.uint32()); + break; + } + case 12: { + message.disableUpstreamValidation = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoteRepositoryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig} RemoteRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoteRepositoryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoteRepositoryConfig message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoteRepositoryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dockerRepository != null && message.hasOwnProperty("dockerRepository")) { + properties.remoteSource = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.verify(message.dockerRepository); + if (error) + return "dockerRepository." + error; + } + } + if (message.mavenRepository != null && message.hasOwnProperty("mavenRepository")) { + if (properties.remoteSource === 1) + return "remoteSource: multiple values"; + properties.remoteSource = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.verify(message.mavenRepository); + if (error) + return "mavenRepository." + error; + } + } + if (message.npmRepository != null && message.hasOwnProperty("npmRepository")) { + if (properties.remoteSource === 1) + return "remoteSource: multiple values"; + properties.remoteSource = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.verify(message.npmRepository); + if (error) + return "npmRepository." + error; + } + } + if (message.pythonRepository != null && message.hasOwnProperty("pythonRepository")) { + if (properties.remoteSource === 1) + return "remoteSource: multiple values"; + properties.remoteSource = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.verify(message.pythonRepository); + if (error) + return "pythonRepository." + error; + } + } + if (message.aptRepository != null && message.hasOwnProperty("aptRepository")) { + if (properties.remoteSource === 1) + return "remoteSource: multiple values"; + properties.remoteSource = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.verify(message.aptRepository); + if (error) + return "aptRepository." + error; + } + } + if (message.yumRepository != null && message.hasOwnProperty("yumRepository")) { + if (properties.remoteSource === 1) + return "remoteSource: multiple values"; + properties.remoteSource = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.verify(message.yumRepository); + if (error) + return "yumRepository." + error; + } + } + if (message.commonRepository != null && message.hasOwnProperty("commonRepository")) { + if (properties.remoteSource === 1) + return "remoteSource: multiple values"; + properties.remoteSource = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.verify(message.commonRepository); + if (error) + return "commonRepository." + error; + } + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.upstreamCredentials != null && message.hasOwnProperty("upstreamCredentials")) { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.verify(message.upstreamCredentials); + if (error) + return "upstreamCredentials." + error; + } + if (message.disableUpstreamValidation != null && message.hasOwnProperty("disableUpstreamValidation")) + if (typeof message.disableUpstreamValidation !== "boolean") + return "disableUpstreamValidation: boolean expected"; + return null; + }; + + /** + * Creates a RemoteRepositoryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig} RemoteRepositoryConfig + */ + RemoteRepositoryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig(); + if (object.dockerRepository != null) { + if (typeof object.dockerRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.dockerRepository: object expected"); + message.dockerRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.fromObject(object.dockerRepository); + } + if (object.mavenRepository != null) { + if (typeof object.mavenRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.mavenRepository: object expected"); + message.mavenRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.fromObject(object.mavenRepository); + } + if (object.npmRepository != null) { + if (typeof object.npmRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.npmRepository: object expected"); + message.npmRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.fromObject(object.npmRepository); + } + if (object.pythonRepository != null) { + if (typeof object.pythonRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.pythonRepository: object expected"); + message.pythonRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.fromObject(object.pythonRepository); + } + if (object.aptRepository != null) { + if (typeof object.aptRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.aptRepository: object expected"); + message.aptRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.fromObject(object.aptRepository); + } + if (object.yumRepository != null) { + if (typeof object.yumRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.yumRepository: object expected"); + message.yumRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.fromObject(object.yumRepository); + } + if (object.commonRepository != null) { + if (typeof object.commonRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.commonRepository: object expected"); + message.commonRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.fromObject(object.commonRepository); + } + if (object.description != null) + message.description = String(object.description); + if (object.upstreamCredentials != null) { + if (typeof object.upstreamCredentials !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.upstreamCredentials: object expected"); + message.upstreamCredentials = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.fromObject(object.upstreamCredentials); + } + if (object.disableUpstreamValidation != null) + message.disableUpstreamValidation = Boolean(object.disableUpstreamValidation); + return message; + }; + + /** + * Creates a plain object from a RemoteRepositoryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig} message RemoteRepositoryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoteRepositoryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = ""; + object.upstreamCredentials = null; + object.disableUpstreamValidation = false; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.dockerRepository != null && message.hasOwnProperty("dockerRepository")) { + object.dockerRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.toObject(message.dockerRepository, options); + if (options.oneofs) + object.remoteSource = "dockerRepository"; + } + if (message.mavenRepository != null && message.hasOwnProperty("mavenRepository")) { + object.mavenRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.toObject(message.mavenRepository, options); + if (options.oneofs) + object.remoteSource = "mavenRepository"; + } + if (message.npmRepository != null && message.hasOwnProperty("npmRepository")) { + object.npmRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.toObject(message.npmRepository, options); + if (options.oneofs) + object.remoteSource = "npmRepository"; + } + if (message.pythonRepository != null && message.hasOwnProperty("pythonRepository")) { + object.pythonRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.toObject(message.pythonRepository, options); + if (options.oneofs) + object.remoteSource = "pythonRepository"; + } + if (message.aptRepository != null && message.hasOwnProperty("aptRepository")) { + object.aptRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.toObject(message.aptRepository, options); + if (options.oneofs) + object.remoteSource = "aptRepository"; + } + if (message.yumRepository != null && message.hasOwnProperty("yumRepository")) { + object.yumRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.toObject(message.yumRepository, options); + if (options.oneofs) + object.remoteSource = "yumRepository"; + } + if (message.upstreamCredentials != null && message.hasOwnProperty("upstreamCredentials")) + object.upstreamCredentials = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.toObject(message.upstreamCredentials, options); + if (message.disableUpstreamValidation != null && message.hasOwnProperty("disableUpstreamValidation")) + object.disableUpstreamValidation = message.disableUpstreamValidation; + if (message.commonRepository != null && message.hasOwnProperty("commonRepository")) { + object.commonRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.toObject(message.commonRepository, options); + if (options.oneofs) + object.remoteSource = "commonRepository"; + } + return object; + }; + + /** + * Converts this RemoteRepositoryConfig to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @instance + * @returns {Object.} JSON object + */ + RemoteRepositoryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoteRepositoryConfig + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoteRepositoryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig"; + }; + + RemoteRepositoryConfig.UpstreamCredentials = (function() { + + /** + * Properties of an UpstreamCredentials. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @interface IUpstreamCredentials + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials|null} [usernamePasswordCredentials] UpstreamCredentials usernamePasswordCredentials + */ + + /** + * Constructs a new UpstreamCredentials. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @classdesc Represents an UpstreamCredentials. + * @implements IUpstreamCredentials + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials=} [properties] Properties to set + */ + function UpstreamCredentials(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]]; + } + + /** + * UpstreamCredentials usernamePasswordCredentials. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials|null|undefined} usernamePasswordCredentials + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + * @instance + */ + UpstreamCredentials.prototype.usernamePasswordCredentials = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UpstreamCredentials credentials. + * @member {"usernamePasswordCredentials"|undefined} credentials + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + * @instance + */ + Object.defineProperty(UpstreamCredentials.prototype, "credentials", { + get: $util.oneOfGetter($oneOfFields = ["usernamePasswordCredentials"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UpstreamCredentials instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials} UpstreamCredentials instance + */ + UpstreamCredentials.create = function create(properties) { + return new UpstreamCredentials(properties); + }; + + /** + * Encodes the specified UpstreamCredentials message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials} message UpstreamCredentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpstreamCredentials.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.usernamePasswordCredentials != null && Object.hasOwnProperty.call(message, "usernamePasswordCredentials")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.encode(message.usernamePasswordCredentials, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpstreamCredentials message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials} message UpstreamCredentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpstreamCredentials.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpstreamCredentials message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials} UpstreamCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpstreamCredentials.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.usernamePasswordCredentials = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpstreamCredentials message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials} UpstreamCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpstreamCredentials.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpstreamCredentials message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpstreamCredentials.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.usernamePasswordCredentials != null && message.hasOwnProperty("usernamePasswordCredentials")) { + properties.credentials = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.verify(message.usernamePasswordCredentials); + if (error) + return "usernamePasswordCredentials." + error; + } + } + return null; + }; + + /** + * Creates an UpstreamCredentials message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials} UpstreamCredentials + */ + UpstreamCredentials.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials(); + if (object.usernamePasswordCredentials != null) { + if (typeof object.usernamePasswordCredentials !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.usernamePasswordCredentials: object expected"); + message.usernamePasswordCredentials = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.fromObject(object.usernamePasswordCredentials); + } + return message; + }; + + /** + * Creates a plain object from an UpstreamCredentials message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials} message UpstreamCredentials + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpstreamCredentials.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.usernamePasswordCredentials != null && message.hasOwnProperty("usernamePasswordCredentials")) { + object.usernamePasswordCredentials = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.toObject(message.usernamePasswordCredentials, options); + if (options.oneofs) + object.credentials = "usernamePasswordCredentials"; + } + return object; + }; + + /** + * Converts this UpstreamCredentials to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + * @instance + * @returns {Object.} JSON object + */ + UpstreamCredentials.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpstreamCredentials + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpstreamCredentials.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials"; + }; + + UpstreamCredentials.UsernamePasswordCredentials = (function() { + + /** + * Properties of a UsernamePasswordCredentials. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + * @interface IUsernamePasswordCredentials + * @property {string|null} [username] UsernamePasswordCredentials username + * @property {string|null} [passwordSecretVersion] UsernamePasswordCredentials passwordSecretVersion + */ + + /** + * Constructs a new UsernamePasswordCredentials. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + * @classdesc Represents a UsernamePasswordCredentials. + * @implements IUsernamePasswordCredentials + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials=} [properties] Properties to set + */ + function UsernamePasswordCredentials(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]]; + } + + /** + * UsernamePasswordCredentials username. + * @member {string} username + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials + * @instance + */ + UsernamePasswordCredentials.prototype.username = ""; + + /** + * UsernamePasswordCredentials passwordSecretVersion. + * @member {string} passwordSecretVersion + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials + * @instance + */ + UsernamePasswordCredentials.prototype.passwordSecretVersion = ""; + + /** + * Creates a new UsernamePasswordCredentials instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials} UsernamePasswordCredentials instance + */ + UsernamePasswordCredentials.create = function create(properties) { + return new UsernamePasswordCredentials(properties); + }; + + /** + * Encodes the specified UsernamePasswordCredentials message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials} message UsernamePasswordCredentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsernamePasswordCredentials.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); + if (message.passwordSecretVersion != null && Object.hasOwnProperty.call(message, "passwordSecretVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.passwordSecretVersion); + return writer; + }; + + /** + * Encodes the specified UsernamePasswordCredentials message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials} message UsernamePasswordCredentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsernamePasswordCredentials.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UsernamePasswordCredentials message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials} UsernamePasswordCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsernamePasswordCredentials.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.username = reader.string(); + break; + } + case 2: { + message.passwordSecretVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UsernamePasswordCredentials message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials} UsernamePasswordCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsernamePasswordCredentials.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UsernamePasswordCredentials message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UsernamePasswordCredentials.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.passwordSecretVersion != null && message.hasOwnProperty("passwordSecretVersion")) + if (!$util.isString(message.passwordSecretVersion)) + return "passwordSecretVersion: string expected"; + return null; + }; + + /** + * Creates a UsernamePasswordCredentials message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials} UsernamePasswordCredentials + */ + UsernamePasswordCredentials.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials(); + if (object.username != null) + message.username = String(object.username); + if (object.passwordSecretVersion != null) + message.passwordSecretVersion = String(object.passwordSecretVersion); + return message; + }; + + /** + * Creates a plain object from a UsernamePasswordCredentials message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials} message UsernamePasswordCredentials + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UsernamePasswordCredentials.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.username = ""; + object.passwordSecretVersion = ""; + } + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.passwordSecretVersion != null && message.hasOwnProperty("passwordSecretVersion")) + object.passwordSecretVersion = message.passwordSecretVersion; + return object; + }; + + /** + * Converts this UsernamePasswordCredentials to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials + * @instance + * @returns {Object.} JSON object + */ + UsernamePasswordCredentials.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UsernamePasswordCredentials + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UsernamePasswordCredentials.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials"; + }; + + return UsernamePasswordCredentials; + })(); + + return UpstreamCredentials; + })(); + + RemoteRepositoryConfig.DockerRepository = (function() { + + /** + * Properties of a DockerRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @interface IDockerRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository|null} [publicRepository] DockerRepository publicRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository|null} [customRepository] DockerRepository customRepository + */ + + /** + * Constructs a new DockerRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @classdesc Represents a DockerRepository. + * @implements IDockerRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository=} [properties] Properties to set + */ + function DockerRepository(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]]; + } + + /** + * DockerRepository publicRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository|null|undefined} publicRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @instance + */ + DockerRepository.prototype.publicRepository = null; + + /** + * DockerRepository customRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository|null|undefined} customRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @instance + */ + DockerRepository.prototype.customRepository = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DockerRepository upstream. + * @member {"publicRepository"|"customRepository"|undefined} upstream + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @instance + */ + Object.defineProperty(DockerRepository.prototype, "upstream", { + get: $util.oneOfGetter($oneOfFields = ["publicRepository", "customRepository"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DockerRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository} DockerRepository instance + */ + DockerRepository.create = function create(properties) { + return new DockerRepository(properties); + }; + + /** + * Encodes the specified DockerRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository} message DockerRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DockerRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicRepository != null && Object.hasOwnProperty.call(message, "publicRepository")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.publicRepository); + if (message.customRepository != null && Object.hasOwnProperty.call(message, "customRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.encode(message.customRepository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DockerRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository} message DockerRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DockerRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DockerRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository} DockerRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DockerRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publicRepository = reader.int32(); + break; + } + case 3: { + message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DockerRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository} DockerRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DockerRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DockerRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DockerRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { + properties.upstream = 1; + switch (message.publicRepository) { + default: + return "publicRepository: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.customRepository != null && message.hasOwnProperty("customRepository")) { + if (properties.upstream === 1) + return "upstream: multiple values"; + properties.upstream = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.verify(message.customRepository); + if (error) + return "customRepository." + error; + } + } + return null; + }; + + /** + * Creates a DockerRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository} DockerRepository + */ + DockerRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository(); + switch (object.publicRepository) { + default: + if (typeof object.publicRepository === "number") { + message.publicRepository = object.publicRepository; + break; + } + break; + case "PUBLIC_REPOSITORY_UNSPECIFIED": + case 0: + message.publicRepository = 0; + break; + case "DOCKER_HUB": + case 1: + message.publicRepository = 1; + break; + } + if (object.customRepository != null) { + if (typeof object.customRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.customRepository: object expected"); + message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.fromObject(object.customRepository); + } + return message; + }; + + /** + * Creates a plain object from a DockerRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository} message DockerRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DockerRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { + object.publicRepository = options.enums === String ? $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository[message.publicRepository] === undefined ? message.publicRepository : $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository[message.publicRepository] : message.publicRepository; + if (options.oneofs) + object.upstream = "publicRepository"; + } + if (message.customRepository != null && message.hasOwnProperty("customRepository")) { + object.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.toObject(message.customRepository, options); + if (options.oneofs) + object.upstream = "customRepository"; + } + return object; + }; + + /** + * Converts this DockerRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @instance + * @returns {Object.} JSON object + */ + DockerRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DockerRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DockerRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository"; + }; + + DockerRepository.CustomRepository = (function() { + + /** + * Properties of a CustomRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @interface ICustomRepository + * @property {string|null} [uri] CustomRepository uri + */ + + /** + * Constructs a new CustomRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + * @classdesc Represents a CustomRepository. + * @implements ICustomRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository=} [properties] Properties to set + */ + function CustomRepository(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]]; + } + + /** + * CustomRepository uri. + * @member {string} uri + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository + * @instance + */ + CustomRepository.prototype.uri = ""; + + /** + * Creates a new CustomRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository} CustomRepository instance + */ + CustomRepository.create = function create(properties) { + return new CustomRepository(properties); + }; + + /** + * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository} message CustomRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository} message CustomRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository} CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository} CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CustomRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository} CustomRepository + */ + CustomRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository} message CustomRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CustomRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository + * @instance + * @returns {Object.} JSON object + */ + CustomRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository"; + }; + + return CustomRepository; + })(); + + /** + * PublicRepository enum. + * @name google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository + * @enum {number} + * @property {number} PUBLIC_REPOSITORY_UNSPECIFIED=0 PUBLIC_REPOSITORY_UNSPECIFIED value + * @property {number} DOCKER_HUB=1 DOCKER_HUB value + */ + DockerRepository.PublicRepository = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PUBLIC_REPOSITORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "DOCKER_HUB"] = 1; + return values; + })(); + + return DockerRepository; + })(); + + RemoteRepositoryConfig.MavenRepository = (function() { + + /** + * Properties of a MavenRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @interface IMavenRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository|null} [publicRepository] MavenRepository publicRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository|null} [customRepository] MavenRepository customRepository + */ + + /** + * Constructs a new MavenRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @classdesc Represents a MavenRepository. + * @implements IMavenRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository=} [properties] Properties to set + */ + function MavenRepository(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]]; + } + + /** + * MavenRepository publicRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository|null|undefined} publicRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @instance + */ + MavenRepository.prototype.publicRepository = null; + + /** + * MavenRepository customRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository|null|undefined} customRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @instance + */ + MavenRepository.prototype.customRepository = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MavenRepository upstream. + * @member {"publicRepository"|"customRepository"|undefined} upstream + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @instance + */ + Object.defineProperty(MavenRepository.prototype, "upstream", { + get: $util.oneOfGetter($oneOfFields = ["publicRepository", "customRepository"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MavenRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository} MavenRepository instance + */ + MavenRepository.create = function create(properties) { + return new MavenRepository(properties); + }; + + /** + * Encodes the specified MavenRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository} message MavenRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MavenRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicRepository != null && Object.hasOwnProperty.call(message, "publicRepository")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.publicRepository); + if (message.customRepository != null && Object.hasOwnProperty.call(message, "customRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.encode(message.customRepository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MavenRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository} message MavenRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MavenRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MavenRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository} MavenRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MavenRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publicRepository = reader.int32(); + break; + } + case 3: { + message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MavenRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository} MavenRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MavenRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MavenRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MavenRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { + properties.upstream = 1; + switch (message.publicRepository) { + default: + return "publicRepository: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.customRepository != null && message.hasOwnProperty("customRepository")) { + if (properties.upstream === 1) + return "upstream: multiple values"; + properties.upstream = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.verify(message.customRepository); + if (error) + return "customRepository." + error; + } + } + return null; + }; + + /** + * Creates a MavenRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository} MavenRepository + */ + MavenRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository(); + switch (object.publicRepository) { + default: + if (typeof object.publicRepository === "number") { + message.publicRepository = object.publicRepository; + break; + } + break; + case "PUBLIC_REPOSITORY_UNSPECIFIED": + case 0: + message.publicRepository = 0; + break; + case "MAVEN_CENTRAL": + case 1: + message.publicRepository = 1; + break; + } + if (object.customRepository != null) { + if (typeof object.customRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.customRepository: object expected"); + message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.fromObject(object.customRepository); + } + return message; + }; + + /** + * Creates a plain object from a MavenRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository} message MavenRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MavenRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { + object.publicRepository = options.enums === String ? $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository[message.publicRepository] === undefined ? message.publicRepository : $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository[message.publicRepository] : message.publicRepository; + if (options.oneofs) + object.upstream = "publicRepository"; + } + if (message.customRepository != null && message.hasOwnProperty("customRepository")) { + object.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.toObject(message.customRepository, options); + if (options.oneofs) + object.upstream = "customRepository"; + } + return object; + }; + + /** + * Converts this MavenRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @instance + * @returns {Object.} JSON object + */ + MavenRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MavenRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MavenRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository"; + }; + + MavenRepository.CustomRepository = (function() { + + /** + * Properties of a CustomRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @interface ICustomRepository + * @property {string|null} [uri] CustomRepository uri + */ + + /** + * Constructs a new CustomRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + * @classdesc Represents a CustomRepository. + * @implements ICustomRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository=} [properties] Properties to set + */ + function CustomRepository(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]]; + } + + /** + * CustomRepository uri. + * @member {string} uri + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository + * @instance + */ + CustomRepository.prototype.uri = ""; + + /** + * Creates a new CustomRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository} CustomRepository instance + */ + CustomRepository.create = function create(properties) { + return new CustomRepository(properties); + }; + + /** + * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository} message CustomRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository} message CustomRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository} CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository} CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CustomRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository} CustomRepository + */ + CustomRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository} message CustomRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CustomRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository + * @instance + * @returns {Object.} JSON object + */ + CustomRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository"; + }; + + return CustomRepository; + })(); + + /** + * PublicRepository enum. + * @name google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository + * @enum {number} + * @property {number} PUBLIC_REPOSITORY_UNSPECIFIED=0 PUBLIC_REPOSITORY_UNSPECIFIED value + * @property {number} MAVEN_CENTRAL=1 MAVEN_CENTRAL value + */ + MavenRepository.PublicRepository = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PUBLIC_REPOSITORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "MAVEN_CENTRAL"] = 1; + return values; + })(); + + return MavenRepository; + })(); + + RemoteRepositoryConfig.NpmRepository = (function() { + + /** + * Properties of a NpmRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @interface INpmRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository|null} [publicRepository] NpmRepository publicRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository|null} [customRepository] NpmRepository customRepository + */ + + /** + * Constructs a new NpmRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @classdesc Represents a NpmRepository. + * @implements INpmRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository=} [properties] Properties to set + */ + function NpmRepository(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]]; + } + + /** + * NpmRepository publicRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository|null|undefined} publicRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @instance + */ + NpmRepository.prototype.publicRepository = null; + + /** + * NpmRepository customRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository|null|undefined} customRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @instance + */ + NpmRepository.prototype.customRepository = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NpmRepository upstream. + * @member {"publicRepository"|"customRepository"|undefined} upstream + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @instance + */ + Object.defineProperty(NpmRepository.prototype, "upstream", { + get: $util.oneOfGetter($oneOfFields = ["publicRepository", "customRepository"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NpmRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository} NpmRepository instance + */ + NpmRepository.create = function create(properties) { + return new NpmRepository(properties); + }; + + /** + * Encodes the specified NpmRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository} message NpmRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NpmRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicRepository != null && Object.hasOwnProperty.call(message, "publicRepository")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.publicRepository); + if (message.customRepository != null && Object.hasOwnProperty.call(message, "customRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.encode(message.customRepository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NpmRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository} message NpmRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NpmRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NpmRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository} NpmRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NpmRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publicRepository = reader.int32(); + break; + } + case 3: { + message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NpmRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository} NpmRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NpmRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NpmRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NpmRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { + properties.upstream = 1; + switch (message.publicRepository) { + default: + return "publicRepository: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.customRepository != null && message.hasOwnProperty("customRepository")) { + if (properties.upstream === 1) + return "upstream: multiple values"; + properties.upstream = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.verify(message.customRepository); + if (error) + return "customRepository." + error; + } + } + return null; + }; + + /** + * Creates a NpmRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository} NpmRepository + */ + NpmRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository(); + switch (object.publicRepository) { + default: + if (typeof object.publicRepository === "number") { + message.publicRepository = object.publicRepository; + break; + } + break; + case "PUBLIC_REPOSITORY_UNSPECIFIED": + case 0: + message.publicRepository = 0; + break; + case "NPMJS": + case 1: + message.publicRepository = 1; + break; + } + if (object.customRepository != null) { + if (typeof object.customRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.customRepository: object expected"); + message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.fromObject(object.customRepository); + } + return message; + }; + + /** + * Creates a plain object from a NpmRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository} message NpmRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NpmRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { + object.publicRepository = options.enums === String ? $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository[message.publicRepository] === undefined ? message.publicRepository : $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository[message.publicRepository] : message.publicRepository; + if (options.oneofs) + object.upstream = "publicRepository"; + } + if (message.customRepository != null && message.hasOwnProperty("customRepository")) { + object.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.toObject(message.customRepository, options); + if (options.oneofs) + object.upstream = "customRepository"; + } + return object; + }; + + /** + * Converts this NpmRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @instance + * @returns {Object.} JSON object + */ + NpmRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NpmRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NpmRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository"; + }; + + NpmRepository.CustomRepository = (function() { + + /** + * Properties of a CustomRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @interface ICustomRepository + * @property {string|null} [uri] CustomRepository uri + */ + + /** + * Constructs a new CustomRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + * @classdesc Represents a CustomRepository. + * @implements ICustomRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository=} [properties] Properties to set + */ + function CustomRepository(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]]; + } + + /** + * CustomRepository uri. + * @member {string} uri + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository + * @instance + */ + CustomRepository.prototype.uri = ""; + + /** + * Creates a new CustomRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository} CustomRepository instance + */ + CustomRepository.create = function create(properties) { + return new CustomRepository(properties); + }; + + /** + * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository} message CustomRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository} message CustomRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository} CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository} CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CustomRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository} CustomRepository + */ + CustomRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository} message CustomRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CustomRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository + * @instance + * @returns {Object.} JSON object + */ + CustomRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository"; + }; + + return CustomRepository; + })(); + + /** + * PublicRepository enum. + * @name google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository + * @enum {number} + * @property {number} PUBLIC_REPOSITORY_UNSPECIFIED=0 PUBLIC_REPOSITORY_UNSPECIFIED value + * @property {number} NPMJS=1 NPMJS value + */ + NpmRepository.PublicRepository = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PUBLIC_REPOSITORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "NPMJS"] = 1; + return values; + })(); + + return NpmRepository; + })(); + + RemoteRepositoryConfig.PythonRepository = (function() { + + /** + * Properties of a PythonRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @interface IPythonRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository|null} [publicRepository] PythonRepository publicRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository|null} [customRepository] PythonRepository customRepository + */ + + /** + * Constructs a new PythonRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @classdesc Represents a PythonRepository. + * @implements IPythonRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository=} [properties] Properties to set + */ + function PythonRepository(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]]; + } + + /** + * PythonRepository publicRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository|null|undefined} publicRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @instance + */ + PythonRepository.prototype.publicRepository = null; + + /** + * PythonRepository customRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository|null|undefined} customRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @instance + */ + PythonRepository.prototype.customRepository = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PythonRepository upstream. + * @member {"publicRepository"|"customRepository"|undefined} upstream + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @instance + */ + Object.defineProperty(PythonRepository.prototype, "upstream", { + get: $util.oneOfGetter($oneOfFields = ["publicRepository", "customRepository"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PythonRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository} PythonRepository instance + */ + PythonRepository.create = function create(properties) { + return new PythonRepository(properties); + }; + + /** + * Encodes the specified PythonRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository} message PythonRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicRepository != null && Object.hasOwnProperty.call(message, "publicRepository")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.publicRepository); + if (message.customRepository != null && Object.hasOwnProperty.call(message, "customRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.encode(message.customRepository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository} message PythonRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository} PythonRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publicRepository = reader.int32(); + break; + } + case 3: { + message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository} PythonRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { + properties.upstream = 1; + switch (message.publicRepository) { + default: + return "publicRepository: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.customRepository != null && message.hasOwnProperty("customRepository")) { + if (properties.upstream === 1) + return "upstream: multiple values"; + properties.upstream = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.verify(message.customRepository); + if (error) + return "customRepository." + error; + } + } + return null; + }; + + /** + * Creates a PythonRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository} PythonRepository + */ + PythonRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository(); + switch (object.publicRepository) { + default: + if (typeof object.publicRepository === "number") { + message.publicRepository = object.publicRepository; + break; + } + break; + case "PUBLIC_REPOSITORY_UNSPECIFIED": + case 0: + message.publicRepository = 0; + break; + case "PYPI": + case 1: + message.publicRepository = 1; + break; + } + if (object.customRepository != null) { + if (typeof object.customRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.customRepository: object expected"); + message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.fromObject(object.customRepository); + } + return message; + }; + + /** + * Creates a plain object from a PythonRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository} message PythonRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { + object.publicRepository = options.enums === String ? $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository[message.publicRepository] === undefined ? message.publicRepository : $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository[message.publicRepository] : message.publicRepository; + if (options.oneofs) + object.upstream = "publicRepository"; + } + if (message.customRepository != null && message.hasOwnProperty("customRepository")) { + object.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.toObject(message.customRepository, options); + if (options.oneofs) + object.upstream = "customRepository"; + } + return object; + }; + + /** + * Converts this PythonRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @instance + * @returns {Object.} JSON object + */ + PythonRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository"; + }; + + PythonRepository.CustomRepository = (function() { + + /** + * Properties of a CustomRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @interface ICustomRepository + * @property {string|null} [uri] CustomRepository uri + */ + + /** + * Constructs a new CustomRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + * @classdesc Represents a CustomRepository. + * @implements ICustomRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository=} [properties] Properties to set + */ + function CustomRepository(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]]; + } + + /** + * CustomRepository uri. + * @member {string} uri + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository + * @instance + */ + CustomRepository.prototype.uri = ""; + + /** + * Creates a new CustomRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository} CustomRepository instance + */ + CustomRepository.create = function create(properties) { + return new CustomRepository(properties); + }; + + /** + * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository} message CustomRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository} message CustomRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository} CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository} CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CustomRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository} CustomRepository + */ + CustomRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository} message CustomRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CustomRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository + * @instance + * @returns {Object.} JSON object + */ + CustomRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository"; + }; + + return CustomRepository; + })(); + + /** + * PublicRepository enum. + * @name google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository + * @enum {number} + * @property {number} PUBLIC_REPOSITORY_UNSPECIFIED=0 PUBLIC_REPOSITORY_UNSPECIFIED value + * @property {number} PYPI=1 PYPI value + */ + PythonRepository.PublicRepository = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PUBLIC_REPOSITORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "PYPI"] = 1; + return values; + })(); + + return PythonRepository; + })(); + + RemoteRepositoryConfig.AptRepository = (function() { + + /** + * Properties of an AptRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @interface IAptRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository|null} [publicRepository] AptRepository publicRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository|null} [customRepository] AptRepository customRepository + */ + + /** + * Constructs a new AptRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @classdesc Represents an AptRepository. + * @implements IAptRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository=} [properties] Properties to set + */ + function AptRepository(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]]; + } + + /** + * AptRepository publicRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository|null|undefined} publicRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @instance + */ + AptRepository.prototype.publicRepository = null; + + /** + * AptRepository customRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository|null|undefined} customRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @instance + */ + AptRepository.prototype.customRepository = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AptRepository upstream. + * @member {"publicRepository"|"customRepository"|undefined} upstream + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @instance + */ + Object.defineProperty(AptRepository.prototype, "upstream", { + get: $util.oneOfGetter($oneOfFields = ["publicRepository", "customRepository"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AptRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository} AptRepository instance + */ + AptRepository.create = function create(properties) { + return new AptRepository(properties); + }; + + /** + * Encodes the specified AptRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository} message AptRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AptRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicRepository != null && Object.hasOwnProperty.call(message, "publicRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.encode(message.publicRepository, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.customRepository != null && Object.hasOwnProperty.call(message, "customRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.encode(message.customRepository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AptRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository} message AptRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AptRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AptRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository} AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publicRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.decode(reader, reader.uint32()); + break; + } + case 3: { + message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AptRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository} AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AptRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AptRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { + properties.upstream = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.verify(message.publicRepository); + if (error) + return "publicRepository." + error; + } + } + if (message.customRepository != null && message.hasOwnProperty("customRepository")) { + if (properties.upstream === 1) + return "upstream: multiple values"; + properties.upstream = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.verify(message.customRepository); + if (error) + return "customRepository." + error; + } + } + return null; + }; + + /** + * Creates an AptRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository} AptRepository + */ + AptRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository(); + if (object.publicRepository != null) { + if (typeof object.publicRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.publicRepository: object expected"); + message.publicRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.fromObject(object.publicRepository); + } + if (object.customRepository != null) { + if (typeof object.customRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.customRepository: object expected"); + message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.fromObject(object.customRepository); + } + return message; + }; + + /** + * Creates a plain object from an AptRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository} message AptRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AptRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { + object.publicRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.toObject(message.publicRepository, options); + if (options.oneofs) + object.upstream = "publicRepository"; + } + if (message.customRepository != null && message.hasOwnProperty("customRepository")) { + object.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.toObject(message.customRepository, options); + if (options.oneofs) + object.upstream = "customRepository"; + } + return object; + }; + + /** + * Converts this AptRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @instance + * @returns {Object.} JSON object + */ + AptRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AptRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AptRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository"; + }; + + AptRepository.PublicRepository = (function() { + + /** + * Properties of a PublicRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @interface IPublicRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase|null} [repositoryBase] PublicRepository repositoryBase + * @property {string|null} [repositoryPath] PublicRepository repositoryPath + */ + + /** + * Constructs a new PublicRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @classdesc Represents a PublicRepository. + * @implements IPublicRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository=} [properties] Properties to set + */ + function PublicRepository(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]]; + } + + /** + * PublicRepository repositoryBase. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase} repositoryBase + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository + * @instance + */ + PublicRepository.prototype.repositoryBase = 0; + + /** + * PublicRepository repositoryPath. + * @member {string} repositoryPath + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository + * @instance + */ + PublicRepository.prototype.repositoryPath = ""; + + /** + * Creates a new PublicRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository} PublicRepository instance + */ + PublicRepository.create = function create(properties) { + return new PublicRepository(properties); + }; + + /** + * Encodes the specified PublicRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository} message PublicRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repositoryBase != null && Object.hasOwnProperty.call(message, "repositoryBase")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.repositoryBase); + if (message.repositoryPath != null && Object.hasOwnProperty.call(message, "repositoryPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.repositoryPath); + return writer; + }; + + /** + * Encodes the specified PublicRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository} message PublicRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublicRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository} PublicRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.repositoryBase = reader.int32(); + break; + } + case 2: { + message.repositoryPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublicRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository} PublicRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublicRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublicRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repositoryBase != null && message.hasOwnProperty("repositoryBase")) + switch (message.repositoryBase) { + default: + return "repositoryBase: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.repositoryPath != null && message.hasOwnProperty("repositoryPath")) + if (!$util.isString(message.repositoryPath)) + return "repositoryPath: string expected"; + return null; + }; + + /** + * Creates a PublicRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository} PublicRepository + */ + PublicRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository(); + switch (object.repositoryBase) { + default: + if (typeof object.repositoryBase === "number") { + message.repositoryBase = object.repositoryBase; + break; + } + break; + case "REPOSITORY_BASE_UNSPECIFIED": + case 0: + message.repositoryBase = 0; + break; + case "DEBIAN": + case 1: + message.repositoryBase = 1; + break; + case "UBUNTU": + case 2: + message.repositoryBase = 2; + break; + case "DEBIAN_SNAPSHOT": + case 3: + message.repositoryBase = 3; + break; + } + if (object.repositoryPath != null) + message.repositoryPath = String(object.repositoryPath); + return message; + }; + + /** + * Creates a plain object from a PublicRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository} message PublicRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublicRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.repositoryBase = options.enums === String ? "REPOSITORY_BASE_UNSPECIFIED" : 0; + object.repositoryPath = ""; + } + if (message.repositoryBase != null && message.hasOwnProperty("repositoryBase")) + object.repositoryBase = options.enums === String ? $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase[message.repositoryBase] === undefined ? message.repositoryBase : $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase[message.repositoryBase] : message.repositoryBase; + if (message.repositoryPath != null && message.hasOwnProperty("repositoryPath")) + object.repositoryPath = message.repositoryPath; + return object; + }; + + /** + * Converts this PublicRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository + * @instance + * @returns {Object.} JSON object + */ + PublicRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublicRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublicRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository"; + }; + + /** + * RepositoryBase enum. + * @name google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase + * @enum {number} + * @property {number} REPOSITORY_BASE_UNSPECIFIED=0 REPOSITORY_BASE_UNSPECIFIED value + * @property {number} DEBIAN=1 DEBIAN value + * @property {number} UBUNTU=2 UBUNTU value + * @property {number} DEBIAN_SNAPSHOT=3 DEBIAN_SNAPSHOT value + */ + PublicRepository.RepositoryBase = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPOSITORY_BASE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEBIAN"] = 1; + values[valuesById[2] = "UBUNTU"] = 2; + values[valuesById[3] = "DEBIAN_SNAPSHOT"] = 3; + return values; + })(); + + return PublicRepository; + })(); + + AptRepository.CustomRepository = (function() { + + /** + * Properties of a CustomRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @interface ICustomRepository + * @property {string|null} [uri] CustomRepository uri + */ + + /** + * Constructs a new CustomRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + * @classdesc Represents a CustomRepository. + * @implements ICustomRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository=} [properties] Properties to set + */ + function CustomRepository(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]]; + } + + /** + * CustomRepository uri. + * @member {string} uri + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository + * @instance + */ + CustomRepository.prototype.uri = ""; + + /** + * Creates a new CustomRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository} CustomRepository instance + */ + CustomRepository.create = function create(properties) { + return new CustomRepository(properties); + }; + + /** + * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository} message CustomRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository} message CustomRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository} CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository} CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CustomRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository} CustomRepository + */ + CustomRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository} message CustomRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CustomRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository + * @instance + * @returns {Object.} JSON object + */ + CustomRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository"; + }; + + return CustomRepository; + })(); + + return AptRepository; + })(); + + RemoteRepositoryConfig.YumRepository = (function() { + + /** + * Properties of a YumRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @interface IYumRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository|null} [publicRepository] YumRepository publicRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository|null} [customRepository] YumRepository customRepository + */ + + /** + * Constructs a new YumRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @classdesc Represents a YumRepository. + * @implements IYumRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository=} [properties] Properties to set + */ + function YumRepository(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]]; + } + + /** + * YumRepository publicRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository|null|undefined} publicRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @instance + */ + YumRepository.prototype.publicRepository = null; + + /** + * YumRepository customRepository. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository|null|undefined} customRepository + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @instance + */ + YumRepository.prototype.customRepository = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * YumRepository upstream. + * @member {"publicRepository"|"customRepository"|undefined} upstream + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @instance + */ + Object.defineProperty(YumRepository.prototype, "upstream", { + get: $util.oneOfGetter($oneOfFields = ["publicRepository", "customRepository"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new YumRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository} YumRepository instance + */ + YumRepository.create = function create(properties) { + return new YumRepository(properties); + }; + + /** + * Encodes the specified YumRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository} message YumRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YumRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicRepository != null && Object.hasOwnProperty.call(message, "publicRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.encode(message.publicRepository, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.customRepository != null && Object.hasOwnProperty.call(message, "customRepository")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.encode(message.customRepository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified YumRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository} message YumRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YumRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a YumRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository} YumRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YumRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publicRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.decode(reader, reader.uint32()); + break; + } + case 3: { + message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a YumRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository} YumRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YumRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a YumRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + YumRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { + properties.upstream = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.verify(message.publicRepository); + if (error) + return "publicRepository." + error; + } + } + if (message.customRepository != null && message.hasOwnProperty("customRepository")) { + if (properties.upstream === 1) + return "upstream: multiple values"; + properties.upstream = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.verify(message.customRepository); + if (error) + return "customRepository." + error; + } + } + return null; + }; + + /** + * Creates a YumRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository} YumRepository + */ + YumRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository(); + if (object.publicRepository != null) { + if (typeof object.publicRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.publicRepository: object expected"); + message.publicRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.fromObject(object.publicRepository); + } + if (object.customRepository != null) { + if (typeof object.customRepository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.customRepository: object expected"); + message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.fromObject(object.customRepository); + } + return message; + }; + + /** + * Creates a plain object from a YumRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository} message YumRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + YumRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { + object.publicRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.toObject(message.publicRepository, options); + if (options.oneofs) + object.upstream = "publicRepository"; + } + if (message.customRepository != null && message.hasOwnProperty("customRepository")) { + object.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.toObject(message.customRepository, options); + if (options.oneofs) + object.upstream = "customRepository"; + } + return object; + }; + + /** + * Converts this YumRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @instance + * @returns {Object.} JSON object + */ + YumRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for YumRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + YumRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository"; + }; + + YumRepository.PublicRepository = (function() { + + /** + * Properties of a PublicRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @interface IPublicRepository + * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase|null} [repositoryBase] PublicRepository repositoryBase + * @property {string|null} [repositoryPath] PublicRepository repositoryPath + */ + + /** + * Constructs a new PublicRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @classdesc Represents a PublicRepository. + * @implements IPublicRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository=} [properties] Properties to set + */ + function PublicRepository(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]]; + } + + /** + * PublicRepository repositoryBase. + * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase} repositoryBase + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository + * @instance + */ + PublicRepository.prototype.repositoryBase = 0; + + /** + * PublicRepository repositoryPath. + * @member {string} repositoryPath + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository + * @instance + */ + PublicRepository.prototype.repositoryPath = ""; + + /** + * Creates a new PublicRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository} PublicRepository instance + */ + PublicRepository.create = function create(properties) { + return new PublicRepository(properties); + }; + + /** + * Encodes the specified PublicRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository} message PublicRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repositoryBase != null && Object.hasOwnProperty.call(message, "repositoryBase")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.repositoryBase); + if (message.repositoryPath != null && Object.hasOwnProperty.call(message, "repositoryPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.repositoryPath); + return writer; + }; + + /** + * Encodes the specified PublicRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository} message PublicRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublicRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository} PublicRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.repositoryBase = reader.int32(); + break; + } + case 2: { + message.repositoryPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublicRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository} PublicRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublicRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublicRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repositoryBase != null && message.hasOwnProperty("repositoryBase")) + switch (message.repositoryBase) { + default: + return "repositoryBase: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.repositoryPath != null && message.hasOwnProperty("repositoryPath")) + if (!$util.isString(message.repositoryPath)) + return "repositoryPath: string expected"; + return null; + }; + + /** + * Creates a PublicRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository} PublicRepository + */ + PublicRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository(); + switch (object.repositoryBase) { + default: + if (typeof object.repositoryBase === "number") { + message.repositoryBase = object.repositoryBase; + break; + } + break; + case "REPOSITORY_BASE_UNSPECIFIED": + case 0: + message.repositoryBase = 0; + break; + case "CENTOS": + case 1: + message.repositoryBase = 1; + break; + case "CENTOS_DEBUG": + case 2: + message.repositoryBase = 2; + break; + case "CENTOS_VAULT": + case 3: + message.repositoryBase = 3; + break; + case "CENTOS_STREAM": + case 4: + message.repositoryBase = 4; + break; + case "ROCKY": + case 5: + message.repositoryBase = 5; + break; + case "EPEL": + case 6: + message.repositoryBase = 6; + break; + } + if (object.repositoryPath != null) + message.repositoryPath = String(object.repositoryPath); + return message; + }; + + /** + * Creates a plain object from a PublicRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository} message PublicRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublicRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.repositoryBase = options.enums === String ? "REPOSITORY_BASE_UNSPECIFIED" : 0; + object.repositoryPath = ""; + } + if (message.repositoryBase != null && message.hasOwnProperty("repositoryBase")) + object.repositoryBase = options.enums === String ? $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase[message.repositoryBase] === undefined ? message.repositoryBase : $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase[message.repositoryBase] : message.repositoryBase; + if (message.repositoryPath != null && message.hasOwnProperty("repositoryPath")) + object.repositoryPath = message.repositoryPath; + return object; + }; + + /** + * Converts this PublicRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository + * @instance + * @returns {Object.} JSON object + */ + PublicRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublicRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublicRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository"; + }; + + /** + * RepositoryBase enum. + * @name google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase + * @enum {number} + * @property {number} REPOSITORY_BASE_UNSPECIFIED=0 REPOSITORY_BASE_UNSPECIFIED value + * @property {number} CENTOS=1 CENTOS value + * @property {number} CENTOS_DEBUG=2 CENTOS_DEBUG value + * @property {number} CENTOS_VAULT=3 CENTOS_VAULT value + * @property {number} CENTOS_STREAM=4 CENTOS_STREAM value + * @property {number} ROCKY=5 ROCKY value + * @property {number} EPEL=6 EPEL value + */ + PublicRepository.RepositoryBase = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPOSITORY_BASE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CENTOS"] = 1; + values[valuesById[2] = "CENTOS_DEBUG"] = 2; + values[valuesById[3] = "CENTOS_VAULT"] = 3; + values[valuesById[4] = "CENTOS_STREAM"] = 4; + values[valuesById[5] = "ROCKY"] = 5; + values[valuesById[6] = "EPEL"] = 6; + return values; + })(); + + return PublicRepository; + })(); + + YumRepository.CustomRepository = (function() { + + /** + * Properties of a CustomRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @interface ICustomRepository + * @property {string|null} [uri] CustomRepository uri + */ + + /** + * Constructs a new CustomRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + * @classdesc Represents a CustomRepository. + * @implements ICustomRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository=} [properties] Properties to set + */ + function CustomRepository(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]]; + } + + /** + * CustomRepository uri. + * @member {string} uri + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository + * @instance + */ + CustomRepository.prototype.uri = ""; + + /** + * Creates a new CustomRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository} CustomRepository instance + */ + CustomRepository.create = function create(properties) { + return new CustomRepository(properties); + }; + + /** + * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository} message CustomRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository} message CustomRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository} CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository} CustomRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CustomRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository} CustomRepository + */ + CustomRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository} message CustomRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CustomRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository + * @instance + * @returns {Object.} JSON object + */ + CustomRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository"; + }; + + return CustomRepository; + })(); + + return YumRepository; + })(); + + RemoteRepositoryConfig.CommonRemoteRepository = (function() { + + /** + * Properties of a CommonRemoteRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @interface ICommonRemoteRepository + * @property {string|null} [uri] CommonRemoteRepository uri + */ + + /** + * Constructs a new CommonRemoteRepository. + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig + * @classdesc Represents a CommonRemoteRepository. + * @implements ICommonRemoteRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository=} [properties] Properties to set + */ + function CommonRemoteRepository(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]]; + } + + /** + * CommonRemoteRepository uri. + * @member {string} uri + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository + * @instance + */ + CommonRemoteRepository.prototype.uri = ""; + + /** + * Creates a new CommonRemoteRepository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository} CommonRemoteRepository instance + */ + CommonRemoteRepository.create = function create(properties) { + return new CommonRemoteRepository(properties); + }; + + /** + * Encodes the specified CommonRemoteRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository} message CommonRemoteRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonRemoteRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CommonRemoteRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository} message CommonRemoteRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonRemoteRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonRemoteRepository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository} CommonRemoteRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonRemoteRepository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonRemoteRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository} CommonRemoteRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonRemoteRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonRemoteRepository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonRemoteRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CommonRemoteRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository} CommonRemoteRepository + */ + CommonRemoteRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CommonRemoteRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository + * @static + * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository} message CommonRemoteRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonRemoteRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CommonRemoteRepository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository + * @instance + * @returns {Object.} JSON object + */ + CommonRemoteRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonRemoteRepository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonRemoteRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository"; + }; + + return CommonRemoteRepository; + })(); + + return RemoteRepositoryConfig; + })(); + + v1.Repository = (function() { + + /** + * Properties of a Repository. + * @memberof google.devtools.artifactregistry.v1 + * @interface IRepository + * @property {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig|null} [mavenConfig] Repository mavenConfig + * @property {google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig|null} [dockerConfig] Repository dockerConfig + * @property {google.devtools.artifactregistry.v1.IVirtualRepositoryConfig|null} [virtualRepositoryConfig] Repository virtualRepositoryConfig + * @property {google.devtools.artifactregistry.v1.IRemoteRepositoryConfig|null} [remoteRepositoryConfig] Repository remoteRepositoryConfig + * @property {string|null} [name] Repository name + * @property {google.devtools.artifactregistry.v1.Repository.Format|null} [format] Repository format + * @property {string|null} [description] Repository description + * @property {Object.|null} [labels] Repository labels + * @property {google.protobuf.ITimestamp|null} [createTime] Repository createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Repository updateTime + * @property {string|null} [kmsKeyName] Repository kmsKeyName + * @property {google.devtools.artifactregistry.v1.Repository.Mode|null} [mode] Repository mode + * @property {Object.|null} [cleanupPolicies] Repository cleanupPolicies + * @property {number|Long|null} [sizeBytes] Repository sizeBytes + * @property {boolean|null} [satisfiesPzs] Repository satisfiesPzs + * @property {boolean|null} [cleanupPolicyDryRun] Repository cleanupPolicyDryRun + * @property {google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig|null} [vulnerabilityScanningConfig] Repository vulnerabilityScanningConfig + * @property {boolean|null} [disallowUnspecifiedMode] Repository disallowUnspecifiedMode + * @property {boolean|null} [satisfiesPzi] Repository satisfiesPzi + * @property {string|null} [registryUri] Repository registryUri + */ + + /** + * Constructs a new Repository. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a Repository. + * @implements IRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.IRepository=} [properties] Properties to set + */ + function Repository(properties) { + this.labels = {}; + this.cleanupPolicies = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Repository mavenConfig. + * @member {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig|null|undefined} mavenConfig + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.mavenConfig = null; + + /** + * Repository dockerConfig. + * @member {google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig|null|undefined} dockerConfig + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.dockerConfig = null; + + /** + * Repository virtualRepositoryConfig. + * @member {google.devtools.artifactregistry.v1.IVirtualRepositoryConfig|null|undefined} virtualRepositoryConfig + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.virtualRepositoryConfig = null; + + /** + * Repository remoteRepositoryConfig. + * @member {google.devtools.artifactregistry.v1.IRemoteRepositoryConfig|null|undefined} remoteRepositoryConfig + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.remoteRepositoryConfig = null; + + /** + * Repository name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.name = ""; + + /** + * Repository format. + * @member {google.devtools.artifactregistry.v1.Repository.Format} format + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.format = 0; + + /** + * Repository description. + * @member {string} description + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.description = ""; + + /** + * Repository labels. + * @member {Object.} labels + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.labels = $util.emptyObject; + + /** + * Repository createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.createTime = null; + + /** + * Repository updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.updateTime = null; + + /** + * Repository kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.kmsKeyName = ""; + + /** + * Repository mode. + * @member {google.devtools.artifactregistry.v1.Repository.Mode} mode + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.mode = 0; + + /** + * Repository cleanupPolicies. + * @member {Object.} cleanupPolicies + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.cleanupPolicies = $util.emptyObject; + + /** + * Repository sizeBytes. + * @member {number|Long} sizeBytes + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Repository satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.satisfiesPzs = false; + + /** + * Repository cleanupPolicyDryRun. + * @member {boolean} cleanupPolicyDryRun + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.cleanupPolicyDryRun = false; + + /** + * Repository vulnerabilityScanningConfig. + * @member {google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig|null|undefined} vulnerabilityScanningConfig + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.vulnerabilityScanningConfig = null; + + /** + * Repository disallowUnspecifiedMode. + * @member {boolean} disallowUnspecifiedMode + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.disallowUnspecifiedMode = false; + + /** + * Repository satisfiesPzi. + * @member {boolean} satisfiesPzi + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.satisfiesPzi = false; + + /** + * Repository registryUri. + * @member {string} registryUri + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.registryUri = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Repository formatConfig. + * @member {"mavenConfig"|"dockerConfig"|undefined} formatConfig + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Object.defineProperty(Repository.prototype, "formatConfig", { + get: $util.oneOfGetter($oneOfFields = ["mavenConfig", "dockerConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Repository modeConfig. + * @member {"virtualRepositoryConfig"|"remoteRepositoryConfig"|undefined} modeConfig + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Object.defineProperty(Repository.prototype, "modeConfig", { + get: $util.oneOfGetter($oneOfFields = ["virtualRepositoryConfig", "remoteRepositoryConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Repository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {google.devtools.artifactregistry.v1.IRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Repository} Repository instance + */ + Repository.create = function create(properties) { + return new Repository(properties); + }; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {google.devtools.artifactregistry.v1.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.kmsKeyName); + if (message.mavenConfig != null && Object.hasOwnProperty.call(message, "mavenConfig")) + $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.encode(message.mavenConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.mode); + if (message.cleanupPolicies != null && Object.hasOwnProperty.call(message, "cleanupPolicies")) + for (var keys = Object.keys(message.cleanupPolicies), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.devtools.artifactregistry.v1.CleanupPolicy.encode(message.cleanupPolicies[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) + writer.uint32(/* id 13, wireType 0 =*/104).int64(message.sizeBytes); + if (message.virtualRepositoryConfig != null && Object.hasOwnProperty.call(message, "virtualRepositoryConfig")) + $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.encode(message.virtualRepositoryConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.remoteRepositoryConfig != null && Object.hasOwnProperty.call(message, "remoteRepositoryConfig")) + $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.encode(message.remoteRepositoryConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.satisfiesPzs); + if (message.dockerConfig != null && Object.hasOwnProperty.call(message, "dockerConfig")) + $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.encode(message.dockerConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.cleanupPolicyDryRun != null && Object.hasOwnProperty.call(message, "cleanupPolicyDryRun")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.cleanupPolicyDryRun); + if (message.vulnerabilityScanningConfig != null && Object.hasOwnProperty.call(message, "vulnerabilityScanningConfig")) + $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.encode(message.vulnerabilityScanningConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.disallowUnspecifiedMode != null && Object.hasOwnProperty.call(message, "disallowUnspecifiedMode")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.disallowUnspecifiedMode); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 22, wireType 0 =*/176).bool(message.satisfiesPzi); + if (message.registryUri != null && Object.hasOwnProperty.call(message, "registryUri")) + writer.uint32(/* id 26, wireType 2 =*/210).string(message.registryUri); + return writer; + }; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {google.devtools.artifactregistry.v1.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Repository(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 9: { + message.mavenConfig = $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.decode(reader, reader.uint32()); + break; + } + case 17: { + message.dockerConfig = $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.decode(reader, reader.uint32()); + break; + } + case 14: { + message.virtualRepositoryConfig = $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.decode(reader, reader.uint32()); + break; + } + case 15: { + message.remoteRepositoryConfig = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.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; + } + case 10: { + message.mode = reader.int32(); + break; + } + case 12: { + if (message.cleanupPolicies === $util.emptyObject) + message.cleanupPolicies = {}; + 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.devtools.artifactregistry.v1.CleanupPolicy.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.cleanupPolicies[key] = value; + break; + } + case 13: { + message.sizeBytes = reader.int64(); + break; + } + case 16: { + message.satisfiesPzs = reader.bool(); + break; + } + case 18: { + message.cleanupPolicyDryRun = reader.bool(); + break; + } + case 19: { + message.vulnerabilityScanningConfig = $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.decode(reader, reader.uint32()); + break; + } + case 21: { + message.disallowUnspecifiedMode = reader.bool(); + break; + } + case 22: { + message.satisfiesPzi = reader.bool(); + break; + } + case 26: { + message.registryUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Repository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Repository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mavenConfig != null && message.hasOwnProperty("mavenConfig")) { + properties.formatConfig = 1; + { + var error = $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify(message.mavenConfig); + if (error) + return "mavenConfig." + error; + } + } + if (message.dockerConfig != null && message.hasOwnProperty("dockerConfig")) { + if (properties.formatConfig === 1) + return "formatConfig: multiple values"; + properties.formatConfig = 1; + { + var error = $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.verify(message.dockerConfig); + if (error) + return "dockerConfig." + error; + } + } + if (message.virtualRepositoryConfig != null && message.hasOwnProperty("virtualRepositoryConfig")) { + properties.modeConfig = 1; + { + var error = $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.verify(message.virtualRepositoryConfig); + if (error) + return "virtualRepositoryConfig." + error; + } + } + if (message.remoteRepositoryConfig != null && message.hasOwnProperty("remoteRepositoryConfig")) { + if (properties.modeConfig === 1) + return "modeConfig: multiple values"; + properties.modeConfig = 1; + { + var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.verify(message.remoteRepositoryConfig); + if (error) + return "remoteRepositoryConfig." + 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: + case 9: + case 10: + case 11: + case 12: + 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"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.cleanupPolicies != null && message.hasOwnProperty("cleanupPolicies")) { + if (!$util.isObject(message.cleanupPolicies)) + return "cleanupPolicies: object expected"; + var key = Object.keys(message.cleanupPolicies); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.CleanupPolicy.verify(message.cleanupPolicies[key[i]]); + if (error) + return "cleanupPolicies." + error; + } + } + 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.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; + if (message.cleanupPolicyDryRun != null && message.hasOwnProperty("cleanupPolicyDryRun")) + if (typeof message.cleanupPolicyDryRun !== "boolean") + return "cleanupPolicyDryRun: boolean expected"; + if (message.vulnerabilityScanningConfig != null && message.hasOwnProperty("vulnerabilityScanningConfig")) { + var error = $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.verify(message.vulnerabilityScanningConfig); + if (error) + return "vulnerabilityScanningConfig." + error; + } + if (message.disallowUnspecifiedMode != null && message.hasOwnProperty("disallowUnspecifiedMode")) + if (typeof message.disallowUnspecifiedMode !== "boolean") + return "disallowUnspecifiedMode: boolean expected"; + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + if (typeof message.satisfiesPzi !== "boolean") + return "satisfiesPzi: boolean expected"; + if (message.registryUri != null && message.hasOwnProperty("registryUri")) + if (!$util.isString(message.registryUri)) + return "registryUri: string expected"; + return null; + }; + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Repository} Repository + */ + Repository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Repository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Repository(); + if (object.mavenConfig != null) { + if (typeof object.mavenConfig !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.mavenConfig: object expected"); + message.mavenConfig = $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.fromObject(object.mavenConfig); + } + if (object.dockerConfig != null) { + if (typeof object.dockerConfig !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.dockerConfig: object expected"); + message.dockerConfig = $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.fromObject(object.dockerConfig); + } + if (object.virtualRepositoryConfig != null) { + if (typeof object.virtualRepositoryConfig !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.virtualRepositoryConfig: object expected"); + message.virtualRepositoryConfig = $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.fromObject(object.virtualRepositoryConfig); + } + if (object.remoteRepositoryConfig != null) { + if (typeof object.remoteRepositoryConfig !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.remoteRepositoryConfig: object expected"); + message.remoteRepositoryConfig = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.fromObject(object.remoteRepositoryConfig); + } + if (object.name != null) + message.name = String(object.name); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + 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; + case "KFP": + case 9: + message.format = 9; + break; + case "GO": + case 10: + message.format = 10; + break; + case "GENERIC": + case 11: + message.format = 11; + break; + case "RUBY": + case 12: + message.format = 12; + break; + } + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "STANDARD_REPOSITORY": + case 1: + message.mode = 1; + break; + case "VIRTUAL_REPOSITORY": + case 2: + message.mode = 2; + break; + case "REMOTE_REPOSITORY": + case 3: + message.mode = 3; + break; + } + if (object.cleanupPolicies) { + if (typeof object.cleanupPolicies !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.cleanupPolicies: object expected"); + message.cleanupPolicies = {}; + for (var keys = Object.keys(object.cleanupPolicies), i = 0; i < keys.length; ++i) { + if (typeof object.cleanupPolicies[keys[i]] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.cleanupPolicies: object expected"); + message.cleanupPolicies[keys[i]] = $root.google.devtools.artifactregistry.v1.CleanupPolicy.fromObject(object.cleanupPolicies[keys[i]]); + } + } + 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.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.cleanupPolicyDryRun != null) + message.cleanupPolicyDryRun = Boolean(object.cleanupPolicyDryRun); + if (object.vulnerabilityScanningConfig != null) { + if (typeof object.vulnerabilityScanningConfig !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.vulnerabilityScanningConfig: object expected"); + message.vulnerabilityScanningConfig = $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.fromObject(object.vulnerabilityScanningConfig); + } + if (object.disallowUnspecifiedMode != null) + message.disallowUnspecifiedMode = Boolean(object.disallowUnspecifiedMode); + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); + if (object.registryUri != null) + message.registryUri = String(object.registryUri); + return message; + }; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {google.devtools.artifactregistry.v1.Repository} message Repository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Repository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.cleanupPolicies = {}; + } + if (options.defaults) { + object.name = ""; + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.kmsKeyName = ""; + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + 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.satisfiesPzs = false; + object.cleanupPolicyDryRun = false; + object.vulnerabilityScanningConfig = null; + object.disallowUnspecifiedMode = false; + object.satisfiesPzi = false; + object.registryUri = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.devtools.artifactregistry.v1.Repository.Format[message.format] === undefined ? message.format : $root.google.devtools.artifactregistry.v1.Repository.Format[message.format] : message.format; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + if (message.mavenConfig != null && message.hasOwnProperty("mavenConfig")) { + object.mavenConfig = $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.toObject(message.mavenConfig, options); + if (options.oneofs) + object.formatConfig = "mavenConfig"; + } + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.devtools.artifactregistry.v1.Repository.Mode[message.mode] === undefined ? message.mode : $root.google.devtools.artifactregistry.v1.Repository.Mode[message.mode] : message.mode; + if (message.cleanupPolicies && (keys2 = Object.keys(message.cleanupPolicies)).length) { + object.cleanupPolicies = {}; + for (var j = 0; j < keys2.length; ++j) + object.cleanupPolicies[keys2[j]] = $root.google.devtools.artifactregistry.v1.CleanupPolicy.toObject(message.cleanupPolicies[keys2[j]], options); + } + 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.virtualRepositoryConfig != null && message.hasOwnProperty("virtualRepositoryConfig")) { + object.virtualRepositoryConfig = $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.toObject(message.virtualRepositoryConfig, options); + if (options.oneofs) + object.modeConfig = "virtualRepositoryConfig"; + } + if (message.remoteRepositoryConfig != null && message.hasOwnProperty("remoteRepositoryConfig")) { + object.remoteRepositoryConfig = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.toObject(message.remoteRepositoryConfig, options); + if (options.oneofs) + object.modeConfig = "remoteRepositoryConfig"; + } + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; + if (message.dockerConfig != null && message.hasOwnProperty("dockerConfig")) { + object.dockerConfig = $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.toObject(message.dockerConfig, options); + if (options.oneofs) + object.formatConfig = "dockerConfig"; + } + if (message.cleanupPolicyDryRun != null && message.hasOwnProperty("cleanupPolicyDryRun")) + object.cleanupPolicyDryRun = message.cleanupPolicyDryRun; + if (message.vulnerabilityScanningConfig != null && message.hasOwnProperty("vulnerabilityScanningConfig")) + object.vulnerabilityScanningConfig = $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.toObject(message.vulnerabilityScanningConfig, options); + if (message.disallowUnspecifiedMode != null && message.hasOwnProperty("disallowUnspecifiedMode")) + object.disallowUnspecifiedMode = message.disallowUnspecifiedMode; + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + object.satisfiesPzi = message.satisfiesPzi; + if (message.registryUri != null && message.hasOwnProperty("registryUri")) + object.registryUri = message.registryUri; + return object; + }; + + /** + * Converts this Repository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + * @returns {Object.} JSON object + */ + Repository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Repository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Repository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Repository"; + }; + + Repository.MavenRepositoryConfig = (function() { + + /** + * Properties of a MavenRepositoryConfig. + * @memberof google.devtools.artifactregistry.v1.Repository + * @interface IMavenRepositoryConfig + * @property {boolean|null} [allowSnapshotOverwrites] MavenRepositoryConfig allowSnapshotOverwrites + * @property {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy|null} [versionPolicy] MavenRepositoryConfig versionPolicy + */ + + /** + * Constructs a new MavenRepositoryConfig. + * @memberof google.devtools.artifactregistry.v1.Repository + * @classdesc Represents a MavenRepositoryConfig. + * @implements IMavenRepositoryConfig + * @constructor + * @param {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig=} [properties] Properties to set + */ + function MavenRepositoryConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MavenRepositoryConfig allowSnapshotOverwrites. + * @member {boolean} allowSnapshotOverwrites + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @instance + */ + MavenRepositoryConfig.prototype.allowSnapshotOverwrites = false; + + /** + * MavenRepositoryConfig versionPolicy. + * @member {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy} versionPolicy + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @instance + */ + MavenRepositoryConfig.prototype.versionPolicy = 0; + + /** + * Creates a new MavenRepositoryConfig instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} MavenRepositoryConfig instance + */ + MavenRepositoryConfig.create = function create(properties) { + return new MavenRepositoryConfig(properties); + }; + + /** + * Encodes the specified MavenRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig} message MavenRepositoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MavenRepositoryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowSnapshotOverwrites != null && Object.hasOwnProperty.call(message, "allowSnapshotOverwrites")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowSnapshotOverwrites); + if (message.versionPolicy != null && Object.hasOwnProperty.call(message, "versionPolicy")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.versionPolicy); + return writer; + }; + + /** + * Encodes the specified MavenRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig} message MavenRepositoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MavenRepositoryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MavenRepositoryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} MavenRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MavenRepositoryConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.allowSnapshotOverwrites = reader.bool(); + break; + } + case 2: { + message.versionPolicy = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MavenRepositoryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} MavenRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MavenRepositoryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MavenRepositoryConfig message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MavenRepositoryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowSnapshotOverwrites != null && message.hasOwnProperty("allowSnapshotOverwrites")) + if (typeof message.allowSnapshotOverwrites !== "boolean") + return "allowSnapshotOverwrites: boolean expected"; + if (message.versionPolicy != null && message.hasOwnProperty("versionPolicy")) + switch (message.versionPolicy) { + default: + return "versionPolicy: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a MavenRepositoryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} MavenRepositoryConfig + */ + MavenRepositoryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig(); + if (object.allowSnapshotOverwrites != null) + message.allowSnapshotOverwrites = Boolean(object.allowSnapshotOverwrites); + switch (object.versionPolicy) { + default: + if (typeof object.versionPolicy === "number") { + message.versionPolicy = object.versionPolicy; + break; + } + break; + case "VERSION_POLICY_UNSPECIFIED": + case 0: + message.versionPolicy = 0; + break; + case "RELEASE": + case 1: + message.versionPolicy = 1; + break; + case "SNAPSHOT": + case 2: + message.versionPolicy = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a MavenRepositoryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} message MavenRepositoryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MavenRepositoryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.allowSnapshotOverwrites = false; + object.versionPolicy = options.enums === String ? "VERSION_POLICY_UNSPECIFIED" : 0; + } + if (message.allowSnapshotOverwrites != null && message.hasOwnProperty("allowSnapshotOverwrites")) + object.allowSnapshotOverwrites = message.allowSnapshotOverwrites; + if (message.versionPolicy != null && message.hasOwnProperty("versionPolicy")) + object.versionPolicy = options.enums === String ? $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy[message.versionPolicy] === undefined ? message.versionPolicy : $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy[message.versionPolicy] : message.versionPolicy; + return object; + }; + + /** + * Converts this MavenRepositoryConfig to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @instance + * @returns {Object.} JSON object + */ + MavenRepositoryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MavenRepositoryConfig + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MavenRepositoryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig"; + }; + + /** + * VersionPolicy enum. + * @name google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy + * @enum {number} + * @property {number} VERSION_POLICY_UNSPECIFIED=0 VERSION_POLICY_UNSPECIFIED value + * @property {number} RELEASE=1 RELEASE value + * @property {number} SNAPSHOT=2 SNAPSHOT value + */ + MavenRepositoryConfig.VersionPolicy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERSION_POLICY_UNSPECIFIED"] = 0; + values[valuesById[1] = "RELEASE"] = 1; + values[valuesById[2] = "SNAPSHOT"] = 2; + return values; + })(); + + return MavenRepositoryConfig; + })(); + + Repository.DockerRepositoryConfig = (function() { + + /** + * Properties of a DockerRepositoryConfig. + * @memberof google.devtools.artifactregistry.v1.Repository + * @interface IDockerRepositoryConfig + * @property {boolean|null} [immutableTags] DockerRepositoryConfig immutableTags + */ + + /** + * Constructs a new DockerRepositoryConfig. + * @memberof google.devtools.artifactregistry.v1.Repository + * @classdesc Represents a DockerRepositoryConfig. + * @implements IDockerRepositoryConfig + * @constructor + * @param {google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig=} [properties] Properties to set + */ + function DockerRepositoryConfig(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]]; + } + + /** + * DockerRepositoryConfig immutableTags. + * @member {boolean} immutableTags + * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + * @instance + */ + DockerRepositoryConfig.prototype.immutableTags = false; + + /** + * Creates a new DockerRepositoryConfig instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig} DockerRepositoryConfig instance + */ + DockerRepositoryConfig.create = function create(properties) { + return new DockerRepositoryConfig(properties); + }; + + /** + * Encodes the specified DockerRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig} message DockerRepositoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DockerRepositoryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.immutableTags != null && Object.hasOwnProperty.call(message, "immutableTags")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.immutableTags); + return writer; + }; + + /** + * Encodes the specified DockerRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig} message DockerRepositoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DockerRepositoryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DockerRepositoryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig} DockerRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DockerRepositoryConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.immutableTags = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DockerRepositoryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig} DockerRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DockerRepositoryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DockerRepositoryConfig message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DockerRepositoryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.immutableTags != null && message.hasOwnProperty("immutableTags")) + if (typeof message.immutableTags !== "boolean") + return "immutableTags: boolean expected"; + return null; + }; + + /** + * Creates a DockerRepositoryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig} DockerRepositoryConfig + */ + DockerRepositoryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig(); + if (object.immutableTags != null) + message.immutableTags = Boolean(object.immutableTags); + return message; + }; + + /** + * Creates a plain object from a DockerRepositoryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig} message DockerRepositoryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DockerRepositoryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.immutableTags = false; + if (message.immutableTags != null && message.hasOwnProperty("immutableTags")) + object.immutableTags = message.immutableTags; + return object; + }; + + /** + * Converts this DockerRepositoryConfig to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + * @instance + * @returns {Object.} JSON object + */ + DockerRepositoryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DockerRepositoryConfig + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DockerRepositoryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig"; + }; + + return DockerRepositoryConfig; + })(); + + Repository.VulnerabilityScanningConfig = (function() { + + /** + * Properties of a VulnerabilityScanningConfig. + * @memberof google.devtools.artifactregistry.v1.Repository + * @interface IVulnerabilityScanningConfig + * @property {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig|null} [enablementConfig] VulnerabilityScanningConfig enablementConfig + * @property {google.protobuf.ITimestamp|null} [lastEnableTime] VulnerabilityScanningConfig lastEnableTime + * @property {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState|null} [enablementState] VulnerabilityScanningConfig enablementState + * @property {string|null} [enablementStateReason] VulnerabilityScanningConfig enablementStateReason + */ + + /** + * Constructs a new VulnerabilityScanningConfig. + * @memberof google.devtools.artifactregistry.v1.Repository + * @classdesc Represents a VulnerabilityScanningConfig. + * @implements IVulnerabilityScanningConfig + * @constructor + * @param {google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig=} [properties] Properties to set + */ + function VulnerabilityScanningConfig(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]]; + } + + /** + * VulnerabilityScanningConfig enablementConfig. + * @member {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig} enablementConfig + * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig + * @instance + */ + VulnerabilityScanningConfig.prototype.enablementConfig = 0; + + /** + * VulnerabilityScanningConfig lastEnableTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastEnableTime + * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig + * @instance + */ + VulnerabilityScanningConfig.prototype.lastEnableTime = null; + + /** + * VulnerabilityScanningConfig enablementState. + * @member {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState} enablementState + * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig + * @instance + */ + VulnerabilityScanningConfig.prototype.enablementState = 0; + + /** + * VulnerabilityScanningConfig enablementStateReason. + * @member {string} enablementStateReason + * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig + * @instance + */ + VulnerabilityScanningConfig.prototype.enablementStateReason = ""; + + /** + * Creates a new VulnerabilityScanningConfig instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig} VulnerabilityScanningConfig instance + */ + VulnerabilityScanningConfig.create = function create(properties) { + return new VulnerabilityScanningConfig(properties); + }; + + /** + * Encodes the specified VulnerabilityScanningConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig} message VulnerabilityScanningConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VulnerabilityScanningConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enablementConfig != null && Object.hasOwnProperty.call(message, "enablementConfig")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.enablementConfig); + if (message.lastEnableTime != null && Object.hasOwnProperty.call(message, "lastEnableTime")) + $root.google.protobuf.Timestamp.encode(message.lastEnableTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.enablementState); + if (message.enablementStateReason != null && Object.hasOwnProperty.call(message, "enablementStateReason")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.enablementStateReason); + return writer; + }; + + /** + * Encodes the specified VulnerabilityScanningConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig} message VulnerabilityScanningConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VulnerabilityScanningConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VulnerabilityScanningConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig} VulnerabilityScanningConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VulnerabilityScanningConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.enablementConfig = reader.int32(); + break; + } + case 2: { + message.lastEnableTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.enablementState = reader.int32(); + break; + } + case 4: { + message.enablementStateReason = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VulnerabilityScanningConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig} VulnerabilityScanningConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VulnerabilityScanningConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VulnerabilityScanningConfig message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VulnerabilityScanningConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enablementConfig != null && message.hasOwnProperty("enablementConfig")) + switch (message.enablementConfig) { + default: + return "enablementConfig: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lastEnableTime != null && message.hasOwnProperty("lastEnableTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastEnableTime); + if (error) + return "lastEnableTime." + error; + } + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + switch (message.enablementState) { + default: + return "enablementState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enablementStateReason != null && message.hasOwnProperty("enablementStateReason")) + if (!$util.isString(message.enablementStateReason)) + return "enablementStateReason: string expected"; + return null; + }; + + /** + * Creates a VulnerabilityScanningConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig} VulnerabilityScanningConfig + */ + VulnerabilityScanningConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig(); + switch (object.enablementConfig) { + default: + if (typeof object.enablementConfig === "number") { + message.enablementConfig = object.enablementConfig; + break; + } + break; + case "ENABLEMENT_CONFIG_UNSPECIFIED": + case 0: + message.enablementConfig = 0; + break; + case "INHERITED": + case 1: + message.enablementConfig = 1; + break; + case "DISABLED": + case 2: + message.enablementConfig = 2; + break; + } + if (object.lastEnableTime != null) { + if (typeof object.lastEnableTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.lastEnableTime: object expected"); + message.lastEnableTime = $root.google.protobuf.Timestamp.fromObject(object.lastEnableTime); + } + switch (object.enablementState) { + default: + if (typeof object.enablementState === "number") { + message.enablementState = object.enablementState; + break; + } + break; + case "ENABLEMENT_STATE_UNSPECIFIED": + case 0: + message.enablementState = 0; + break; + case "SCANNING_UNSUPPORTED": + case 1: + message.enablementState = 1; + break; + case "SCANNING_DISABLED": + case 2: + message.enablementState = 2; + break; + case "SCANNING_ACTIVE": + case 3: + message.enablementState = 3; + break; + } + if (object.enablementStateReason != null) + message.enablementStateReason = String(object.enablementStateReason); + return message; + }; + + /** + * Creates a plain object from a VulnerabilityScanningConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig} message VulnerabilityScanningConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VulnerabilityScanningConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enablementConfig = options.enums === String ? "ENABLEMENT_CONFIG_UNSPECIFIED" : 0; + object.lastEnableTime = null; + object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; + object.enablementStateReason = ""; + } + if (message.enablementConfig != null && message.hasOwnProperty("enablementConfig")) + object.enablementConfig = options.enums === String ? $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig[message.enablementConfig] === undefined ? message.enablementConfig : $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig[message.enablementConfig] : message.enablementConfig; + if (message.lastEnableTime != null && message.hasOwnProperty("lastEnableTime")) + object.lastEnableTime = $root.google.protobuf.Timestamp.toObject(message.lastEnableTime, options); + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + object.enablementState = options.enums === String ? $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState[message.enablementState] : message.enablementState; + if (message.enablementStateReason != null && message.hasOwnProperty("enablementStateReason")) + object.enablementStateReason = message.enablementStateReason; + return object; + }; + + /** + * Converts this VulnerabilityScanningConfig to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig + * @instance + * @returns {Object.} JSON object + */ + VulnerabilityScanningConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VulnerabilityScanningConfig + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VulnerabilityScanningConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig"; + }; + + /** + * EnablementConfig enum. + * @name google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig + * @enum {number} + * @property {number} ENABLEMENT_CONFIG_UNSPECIFIED=0 ENABLEMENT_CONFIG_UNSPECIFIED value + * @property {number} INHERITED=1 INHERITED value + * @property {number} DISABLED=2 DISABLED value + */ + VulnerabilityScanningConfig.EnablementConfig = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENABLEMENT_CONFIG_UNSPECIFIED"] = 0; + values[valuesById[1] = "INHERITED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + return values; + })(); + + /** + * EnablementState enum. + * @name google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState + * @enum {number} + * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value + * @property {number} SCANNING_UNSUPPORTED=1 SCANNING_UNSUPPORTED value + * @property {number} SCANNING_DISABLED=2 SCANNING_DISABLED value + * @property {number} SCANNING_ACTIVE=3 SCANNING_ACTIVE value + */ + VulnerabilityScanningConfig.EnablementState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCANNING_UNSUPPORTED"] = 1; + values[valuesById[2] = "SCANNING_DISABLED"] = 2; + values[valuesById[3] = "SCANNING_ACTIVE"] = 3; + return values; + })(); + + return VulnerabilityScanningConfig; + })(); + + /** + * Format enum. + * @name google.devtools.artifactregistry.v1.Repository.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} DOCKER=1 DOCKER value + * @property {number} MAVEN=2 MAVEN value + * @property {number} NPM=3 NPM value + * @property {number} APT=5 APT value + * @property {number} YUM=6 YUM value + * @property {number} PYTHON=8 PYTHON value + * @property {number} KFP=9 KFP value + * @property {number} GO=10 GO value + * @property {number} GENERIC=11 GENERIC value + * @property {number} RUBY=12 RUBY value + */ + Repository.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "DOCKER"] = 1; + values[valuesById[2] = "MAVEN"] = 2; + values[valuesById[3] = "NPM"] = 3; + values[valuesById[5] = "APT"] = 5; + values[valuesById[6] = "YUM"] = 6; + values[valuesById[8] = "PYTHON"] = 8; + values[valuesById[9] = "KFP"] = 9; + values[valuesById[10] = "GO"] = 10; + values[valuesById[11] = "GENERIC"] = 11; + values[valuesById[12] = "RUBY"] = 12; + return values; + })(); + + /** + * Mode enum. + * @name google.devtools.artifactregistry.v1.Repository.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} STANDARD_REPOSITORY=1 STANDARD_REPOSITORY value + * @property {number} VIRTUAL_REPOSITORY=2 VIRTUAL_REPOSITORY value + * @property {number} REMOTE_REPOSITORY=3 REMOTE_REPOSITORY value + */ + Repository.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD_REPOSITORY"] = 1; + values[valuesById[2] = "VIRTUAL_REPOSITORY"] = 2; + values[valuesById[3] = "REMOTE_REPOSITORY"] = 3; + return values; + })(); + + return Repository; + })(); + + v1.ListRepositoriesRequest = (function() { + + /** + * Properties of a ListRepositoriesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListRepositoriesRequest + * @property {string|null} [parent] ListRepositoriesRequest parent + * @property {number|null} [pageSize] ListRepositoriesRequest pageSize + * @property {string|null} [pageToken] ListRepositoriesRequest pageToken + * @property {string|null} [filter] ListRepositoriesRequest filter + * @property {string|null} [orderBy] ListRepositoriesRequest orderBy + */ + + /** + * Constructs a new ListRepositoriesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListRepositoriesRequest. + * @implements IListRepositoriesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest=} [properties] Properties to set + */ + function ListRepositoriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.parent = ""; + + /** + * ListRepositoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageSize = 0; + + /** + * ListRepositoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageToken = ""; + + /** + * ListRepositoriesRequest filter. + * @member {string} filter + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.filter = ""; + + /** + * ListRepositoriesRequest orderBy. + * @member {string} orderBy + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest instance + */ + ListRepositoriesRequest.create = function create(properties) { + return new ListRepositoriesRequest(properties); + }; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListRepositoriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest + */ + ListRepositoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListRepositoriesRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListRepositoriesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListRepositoriesRequest} message ListRepositoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRepositoriesRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRepositoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListRepositoriesRequest"; + }; + + return ListRepositoriesRequest; + })(); + + v1.ListRepositoriesResponse = (function() { + + /** + * Properties of a ListRepositoriesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListRepositoriesResponse + * @property {Array.|null} [repositories] ListRepositoriesResponse repositories + * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken + */ + + /** + * Constructs a new ListRepositoriesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListRepositoriesResponse. + * @implements IListRepositoriesResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse=} [properties] Properties to set + */ + function ListRepositoriesResponse(properties) { + this.repositories = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesResponse repositories. + * @member {Array.} repositories + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.repositories = $util.emptyArray; + + /** + * ListRepositoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse instance + */ + ListRepositoriesResponse.create = function create(properties) { + return new ListRepositoriesResponse(properties); + }; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repositories != null && message.repositories.length) + for (var i = 0; i < message.repositories.length; ++i) + $root.google.devtools.artifactregistry.v1.Repository.encode(message.repositories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListRepositoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.repositories && message.repositories.length)) + message.repositories = []; + message.repositories.push($root.google.devtools.artifactregistry.v1.Repository.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repositories != null && message.hasOwnProperty("repositories")) { + if (!Array.isArray(message.repositories)) + return "repositories: array expected"; + for (var i = 0; i < message.repositories.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Repository.verify(message.repositories[i]); + if (error) + return "repositories." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse + */ + ListRepositoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListRepositoriesResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListRepositoriesResponse(); + if (object.repositories) { + if (!Array.isArray(object.repositories)) + throw TypeError(".google.devtools.artifactregistry.v1.ListRepositoriesResponse.repositories: array expected"); + message.repositories = []; + for (var i = 0; i < object.repositories.length; ++i) { + if (typeof object.repositories[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListRepositoriesResponse.repositories: object expected"); + message.repositories[i] = $root.google.devtools.artifactregistry.v1.Repository.fromObject(object.repositories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListRepositoriesResponse} message ListRepositoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.repositories = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.repositories && message.repositories.length) { + object.repositories = []; + for (var j = 0; j < message.repositories.length; ++j) + object.repositories[j] = $root.google.devtools.artifactregistry.v1.Repository.toObject(message.repositories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRepositoriesResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRepositoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListRepositoriesResponse"; + }; + + return ListRepositoriesResponse; + })(); + + v1.GetRepositoryRequest = (function() { + + /** + * Properties of a GetRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetRepositoryRequest + * @property {string|null} [name] GetRepositoryRequest name + */ + + /** + * Constructs a new GetRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetRepositoryRequest. + * @implements IGetRepositoryRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest=} [properties] Properties to set + */ + function GetRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetRepositoryRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @instance + */ + GetRepositoryRequest.prototype.name = ""; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest instance + */ + GetRepositoryRequest.create = function create(properties) { + return new GetRepositoryRequest(properties); + }; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRepositoryRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest + */ + GetRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetRepositoryRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetRepositoryRequest} message GetRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + GetRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetRepositoryRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetRepositoryRequest"; + }; + + return GetRepositoryRequest; + })(); + + v1.CreateRepositoryRequest = (function() { + + /** + * Properties of a CreateRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface ICreateRepositoryRequest + * @property {string|null} [parent] CreateRepositoryRequest parent + * @property {string|null} [repositoryId] CreateRepositoryRequest repositoryId + * @property {google.devtools.artifactregistry.v1.IRepository|null} [repository] CreateRepositoryRequest repository + */ + + /** + * Constructs a new CreateRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a CreateRepositoryRequest. + * @implements ICreateRepositoryRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest=} [properties] Properties to set + */ + function CreateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateRepositoryRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.parent = ""; + + /** + * CreateRepositoryRequest repositoryId. + * @member {string} repositoryId + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repositoryId = ""; + + /** + * CreateRepositoryRequest repository. + * @member {google.devtools.artifactregistry.v1.IRepository|null|undefined} repository + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repository = null; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.CreateRepositoryRequest} CreateRepositoryRequest instance + */ + CreateRepositoryRequest.create = function create(properties) { + return new CreateRepositoryRequest(properties); + }; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.repositoryId != null && Object.hasOwnProperty.call(message, "repositoryId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.repositoryId); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.devtools.artifactregistry.v1.Repository.encode(message.repository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.CreateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.repositoryId = reader.string(); + break; + } + case 3: { + message.repository = $root.google.devtools.artifactregistry.v1.Repository.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateRepositoryRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + if (!$util.isString(message.repositoryId)) + return "repositoryId: string expected"; + if (message.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.devtools.artifactregistry.v1.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + return null; + }; + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.CreateRepositoryRequest} CreateRepositoryRequest + */ + CreateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.CreateRepositoryRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.CreateRepositoryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.repositoryId != null) + message.repositoryId = String(object.repositoryId); + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.CreateRepositoryRequest.repository: object expected"); + message.repository = $root.google.devtools.artifactregistry.v1.Repository.fromObject(object.repository); + } + return message; + }; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.CreateRepositoryRequest} message CreateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.repositoryId = ""; + object.repository = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + object.repositoryId = message.repositoryId; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.devtools.artifactregistry.v1.Repository.toObject(message.repository, options); + return object; + }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + CreateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateRepositoryRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.CreateRepositoryRequest"; + }; + + return CreateRepositoryRequest; + })(); + + v1.UpdateRepositoryRequest = (function() { + + /** + * Properties of an UpdateRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IUpdateRepositoryRequest + * @property {google.devtools.artifactregistry.v1.IRepository|null} [repository] UpdateRepositoryRequest repository + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateRepositoryRequest updateMask + */ + + /** + * Constructs a new UpdateRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an UpdateRepositoryRequest. + * @implements IUpdateRepositoryRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest=} [properties] Properties to set + */ + function UpdateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateRepositoryRequest repository. + * @member {google.devtools.artifactregistry.v1.IRepository|null|undefined} repository + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @instance + */ + UpdateRepositoryRequest.prototype.repository = null; + + /** + * UpdateRepositoryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @instance + */ + UpdateRepositoryRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} UpdateRepositoryRequest instance + */ + UpdateRepositoryRequest.create = function create(properties) { + return new UpdateRepositoryRequest(properties); + }; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.devtools.artifactregistry.v1.Repository.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.repository = $root.google.devtools.artifactregistry.v1.Repository.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateRepositoryRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.devtools.artifactregistry.v1.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} UpdateRepositoryRequest + */ + UpdateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateRepositoryRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.UpdateRepositoryRequest(); + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateRepositoryRequest.repository: object expected"); + message.repository = $root.google.devtools.artifactregistry.v1.Repository.fromObject(object.repository); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateRepositoryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} message UpdateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.repository = null; + object.updateMask = null; + } + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.devtools.artifactregistry.v1.Repository.toObject(message.repository, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateRepositoryRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdateRepositoryRequest"; + }; + + return UpdateRepositoryRequest; + })(); + + v1.DeleteRepositoryRequest = (function() { + + /** + * Properties of a DeleteRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IDeleteRepositoryRequest + * @property {string|null} [name] DeleteRepositoryRequest name + */ + + /** + * Constructs a new DeleteRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a DeleteRepositoryRequest. + * @implements IDeleteRepositoryRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest=} [properties] Properties to set + */ + function DeleteRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteRepositoryRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.name = ""; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} DeleteRepositoryRequest instance + */ + DeleteRepositoryRequest.create = function create(properties) { + return new DeleteRepositoryRequest(properties); + }; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DeleteRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteRepositoryRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} DeleteRepositoryRequest + */ + DeleteRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteRepositoryRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.DeleteRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} message DeleteRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteRepositoryRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DeleteRepositoryRequest"; + }; + + return DeleteRepositoryRequest; + })(); + + v1.Rule = (function() { + + /** + * Properties of a Rule. + * @memberof google.devtools.artifactregistry.v1 + * @interface IRule + * @property {string|null} [name] Rule name + * @property {google.devtools.artifactregistry.v1.Rule.Action|null} [action] Rule action + * @property {google.devtools.artifactregistry.v1.Rule.Operation|null} [operation] Rule operation + * @property {google.type.IExpr|null} [condition] Rule condition + * @property {string|null} [packageId] Rule packageId + */ + + /** + * Constructs a new Rule. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a Rule. + * @implements IRule + * @constructor + * @param {google.devtools.artifactregistry.v1.IRule=} [properties] Properties to set + */ + function Rule(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]]; + } + + /** + * Rule name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.Rule + * @instance + */ + Rule.prototype.name = ""; + + /** + * Rule action. + * @member {google.devtools.artifactregistry.v1.Rule.Action} action + * @memberof google.devtools.artifactregistry.v1.Rule + * @instance + */ + Rule.prototype.action = 0; + + /** + * Rule operation. + * @member {google.devtools.artifactregistry.v1.Rule.Operation} operation + * @memberof google.devtools.artifactregistry.v1.Rule + * @instance + */ + Rule.prototype.operation = 0; + + /** + * Rule condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.devtools.artifactregistry.v1.Rule + * @instance + */ + Rule.prototype.condition = null; + + /** + * Rule packageId. + * @member {string} packageId + * @memberof google.devtools.artifactregistry.v1.Rule + * @instance + */ + Rule.prototype.packageId = ""; + + /** + * Creates a new Rule instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Rule + * @static + * @param {google.devtools.artifactregistry.v1.IRule=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Rule} Rule instance + */ + Rule.create = function create(properties) { + return new Rule(properties); + }; + + /** + * Encodes the specified Rule message. Does not implicitly {@link google.devtools.artifactregistry.v1.Rule.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Rule + * @static + * @param {google.devtools.artifactregistry.v1.IRule} message Rule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rule.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.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.action); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.operation); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.packageId != null && Object.hasOwnProperty.call(message, "packageId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.packageId); + return writer; + }; + + /** + * Encodes the specified Rule message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Rule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Rule + * @static + * @param {google.devtools.artifactregistry.v1.IRule} message Rule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Rule message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Rule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Rule} Rule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Rule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.action = reader.int32(); + break; + } + case 3: { + message.operation = reader.int32(); + break; + } + case 4: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + case 5: { + message.packageId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Rule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Rule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Rule} Rule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Rule message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Rule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rule.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.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.operation != null && message.hasOwnProperty("operation")) + switch (message.operation) { + default: + return "operation: enum value expected"; + case 0: + case 1: + break; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + if (message.packageId != null && message.hasOwnProperty("packageId")) + if (!$util.isString(message.packageId)) + return "packageId: string expected"; + return null; + }; + + /** + * Creates a Rule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Rule + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Rule} Rule + */ + Rule.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Rule) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Rule(); + if (object.name != null) + message.name = String(object.name); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ALLOW": + case 1: + message.action = 1; + break; + case "DENY": + case 2: + message.action = 2; + break; + } + switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; + case "OPERATION_UNSPECIFIED": + case 0: + message.operation = 0; + break; + case "DOWNLOAD": + case 1: + message.operation = 1; + break; + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Rule.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + if (object.packageId != null) + message.packageId = String(object.packageId); + return message; + }; + + /** + * Creates a plain object from a Rule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Rule + * @static + * @param {google.devtools.artifactregistry.v1.Rule} message Rule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; + object.condition = null; + object.packageId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.devtools.artifactregistry.v1.Rule.Action[message.action] === undefined ? message.action : $root.google.devtools.artifactregistry.v1.Rule.Action[message.action] : message.action; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = options.enums === String ? $root.google.devtools.artifactregistry.v1.Rule.Operation[message.operation] === undefined ? message.operation : $root.google.devtools.artifactregistry.v1.Rule.Operation[message.operation] : message.operation; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + if (message.packageId != null && message.hasOwnProperty("packageId")) + object.packageId = message.packageId; + return object; + }; + + /** + * Converts this Rule to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Rule + * @instance + * @returns {Object.} JSON object + */ + Rule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Rule + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.Rule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Rule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Rule"; + }; + + /** + * Action enum. + * @name google.devtools.artifactregistry.v1.Rule.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ALLOW=1 ALLOW value + * @property {number} DENY=2 DENY value + */ + Rule.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "DENY"] = 2; + return values; + })(); + + /** + * Operation enum. + * @name google.devtools.artifactregistry.v1.Rule.Operation + * @enum {number} + * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value + * @property {number} DOWNLOAD=1 DOWNLOAD value + */ + Rule.Operation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "DOWNLOAD"] = 1; + return values; + })(); + + return Rule; + })(); + + v1.ListRulesRequest = (function() { + + /** + * Properties of a ListRulesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListRulesRequest + * @property {string|null} [parent] ListRulesRequest parent + * @property {number|null} [pageSize] ListRulesRequest pageSize + * @property {string|null} [pageToken] ListRulesRequest pageToken + */ + + /** + * Constructs a new ListRulesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListRulesRequest. + * @implements IListRulesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListRulesRequest=} [properties] Properties to set + */ + function ListRulesRequest(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]]; + } + + /** + * ListRulesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListRulesRequest + * @instance + */ + ListRulesRequest.prototype.parent = ""; + + /** + * ListRulesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListRulesRequest + * @instance + */ + ListRulesRequest.prototype.pageSize = 0; + + /** + * ListRulesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListRulesRequest + * @instance + */ + ListRulesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListRulesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListRulesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListRulesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListRulesRequest} ListRulesRequest instance + */ + ListRulesRequest.create = function create(properties) { + return new ListRulesRequest(properties); + }; + + /** + * Encodes the specified ListRulesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListRulesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListRulesRequest} message ListRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRulesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListRulesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListRulesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListRulesRequest} message ListRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRulesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListRulesRequest} ListRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRulesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListRulesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListRulesRequest} ListRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRulesRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListRulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRulesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListRulesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListRulesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListRulesRequest} ListRulesRequest + */ + ListRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListRulesRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListRulesRequest(); + 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 ListRulesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListRulesRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListRulesRequest} message ListRulesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRulesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListRulesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListRulesRequest + * @instance + * @returns {Object.} JSON object + */ + ListRulesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRulesRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListRulesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListRulesRequest"; + }; + + return ListRulesRequest; + })(); + + v1.ListRulesResponse = (function() { + + /** + * Properties of a ListRulesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListRulesResponse + * @property {Array.|null} [rules] ListRulesResponse rules + * @property {string|null} [nextPageToken] ListRulesResponse nextPageToken + */ + + /** + * Constructs a new ListRulesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListRulesResponse. + * @implements IListRulesResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListRulesResponse=} [properties] Properties to set + */ + function ListRulesResponse(properties) { + this.rules = []; + 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]]; + } + + /** + * ListRulesResponse rules. + * @member {Array.} rules + * @memberof google.devtools.artifactregistry.v1.ListRulesResponse + * @instance + */ + ListRulesResponse.prototype.rules = $util.emptyArray; + + /** + * ListRulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListRulesResponse + * @instance + */ + ListRulesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListRulesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListRulesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListRulesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListRulesResponse} ListRulesResponse instance + */ + ListRulesResponse.create = function create(properties) { + return new ListRulesResponse(properties); + }; + + /** + * Encodes the specified ListRulesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListRulesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListRulesResponse} message ListRulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRulesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.devtools.artifactregistry.v1.Rule.encode(message.rules[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 ListRulesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListRulesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListRulesResponse} message ListRulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRulesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListRulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListRulesResponse} ListRulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRulesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListRulesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.devtools.artifactregistry.v1.Rule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRulesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListRulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListRulesResponse} ListRulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRulesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRulesResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListRulesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRulesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Rule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListRulesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListRulesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListRulesResponse} ListRulesResponse + */ + ListRulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListRulesResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListRulesResponse(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.devtools.artifactregistry.v1.ListRulesResponse.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListRulesResponse.rules: object expected"); + message.rules[i] = $root.google.devtools.artifactregistry.v1.Rule.fromObject(object.rules[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListRulesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListRulesResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListRulesResponse} message ListRulesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRulesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.devtools.artifactregistry.v1.Rule.toObject(message.rules[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListRulesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListRulesResponse + * @instance + * @returns {Object.} JSON object + */ + ListRulesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRulesResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ListRulesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListRulesResponse"; + }; + + return ListRulesResponse; + })(); + + v1.GetRuleRequest = (function() { + + /** + * Properties of a GetRuleRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetRuleRequest + * @property {string|null} [name] GetRuleRequest name + */ + + /** + * Constructs a new GetRuleRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetRuleRequest. + * @implements IGetRuleRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetRuleRequest=} [properties] Properties to set + */ + function GetRuleRequest(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]]; + } + + /** + * GetRuleRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetRuleRequest + * @instance + */ + GetRuleRequest.prototype.name = ""; + + /** + * Creates a new GetRuleRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetRuleRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetRuleRequest} GetRuleRequest instance + */ + GetRuleRequest.create = function create(properties) { + return new GetRuleRequest(properties); + }; + + /** + * Encodes the specified GetRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRuleRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetRuleRequest} message GetRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRuleRequest.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 GetRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetRuleRequest} message GetRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetRuleRequest} GetRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRuleRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetRuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetRuleRequest} GetRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRuleRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetRuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRuleRequest.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 GetRuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetRuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetRuleRequest} GetRuleRequest + */ + GetRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetRuleRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetRuleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetRuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetRuleRequest} message GetRuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRuleRequest.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 GetRuleRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetRuleRequest + * @instance + * @returns {Object.} JSON object + */ + GetRuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetRuleRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GetRuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetRuleRequest"; + }; + + return GetRuleRequest; + })(); + + v1.CreateRuleRequest = (function() { + + /** + * Properties of a CreateRuleRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface ICreateRuleRequest + * @property {string|null} [parent] CreateRuleRequest parent + * @property {string|null} [ruleId] CreateRuleRequest ruleId + * @property {google.devtools.artifactregistry.v1.IRule|null} [rule] CreateRuleRequest rule + */ + + /** + * Constructs a new CreateRuleRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a CreateRuleRequest. + * @implements ICreateRuleRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.ICreateRuleRequest=} [properties] Properties to set + */ + function CreateRuleRequest(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]]; + } + + /** + * CreateRuleRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest + * @instance + */ + CreateRuleRequest.prototype.parent = ""; + + /** + * CreateRuleRequest ruleId. + * @member {string} ruleId + * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest + * @instance + */ + CreateRuleRequest.prototype.ruleId = ""; + + /** + * CreateRuleRequest rule. + * @member {google.devtools.artifactregistry.v1.IRule|null|undefined} rule + * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest + * @instance + */ + CreateRuleRequest.prototype.rule = null; + + /** + * Creates a new CreateRuleRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateRuleRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.CreateRuleRequest} CreateRuleRequest instance + */ + CreateRuleRequest.create = function create(properties) { + return new CreateRuleRequest(properties); + }; + + /** + * Encodes the specified CreateRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRuleRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateRuleRequest} message CreateRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRuleRequest.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.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ruleId); + if (message.rule != null && Object.hasOwnProperty.call(message, "rule")) + $root.google.devtools.artifactregistry.v1.Rule.encode(message.rule, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateRuleRequest} message CreateRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateRuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.CreateRuleRequest} CreateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRuleRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.CreateRuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.ruleId = reader.string(); + break; + } + case 3: { + message.rule = $root.google.devtools.artifactregistry.v1.Rule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateRuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.CreateRuleRequest} CreateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateRuleRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRuleRequest.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.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.rule != null && message.hasOwnProperty("rule")) { + var error = $root.google.devtools.artifactregistry.v1.Rule.verify(message.rule); + if (error) + return "rule." + error; + } + return null; + }; + + /** + * Creates a CreateRuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.CreateRuleRequest} CreateRuleRequest + */ + CreateRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.CreateRuleRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.CreateRuleRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + if (object.rule != null) { + if (typeof object.rule !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.CreateRuleRequest.rule: object expected"); + message.rule = $root.google.devtools.artifactregistry.v1.Rule.fromObject(object.rule); + } + return message; + }; + + /** + * Creates a plain object from a CreateRuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.CreateRuleRequest} message CreateRuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateRuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.ruleId = ""; + object.rule = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.rule != null && message.hasOwnProperty("rule")) + object.rule = $root.google.devtools.artifactregistry.v1.Rule.toObject(message.rule, options); + return object; + }; + + /** + * Converts this CreateRuleRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest + * @instance + * @returns {Object.} JSON object + */ + CreateRuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateRuleRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.CreateRuleRequest"; + }; + + return CreateRuleRequest; + })(); + + v1.UpdateRuleRequest = (function() { + + /** + * Properties of an UpdateRuleRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IUpdateRuleRequest + * @property {google.devtools.artifactregistry.v1.IRule|null} [rule] UpdateRuleRequest rule + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateRuleRequest updateMask + */ + + /** + * Constructs a new UpdateRuleRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an UpdateRuleRequest. + * @implements IUpdateRuleRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IUpdateRuleRequest=} [properties] Properties to set + */ + function UpdateRuleRequest(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]]; + } + + /** + * UpdateRuleRequest rule. + * @member {google.devtools.artifactregistry.v1.IRule|null|undefined} rule + * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest + * @instance + */ + UpdateRuleRequest.prototype.rule = null; + + /** + * UpdateRuleRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest + * @instance + */ + UpdateRuleRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateRuleRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateRuleRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.UpdateRuleRequest} UpdateRuleRequest instance + */ + UpdateRuleRequest.create = function create(properties) { + return new UpdateRuleRequest(properties); + }; + + /** + * Encodes the specified UpdateRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRuleRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateRuleRequest} message UpdateRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRuleRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rule != null && Object.hasOwnProperty.call(message, "rule")) + $root.google.devtools.artifactregistry.v1.Rule.encode(message.rule, 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 UpdateRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateRuleRequest} message UpdateRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateRuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.UpdateRuleRequest} UpdateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRuleRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdateRuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.rule = $root.google.devtools.artifactregistry.v1.Rule.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 UpdateRuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.UpdateRuleRequest} UpdateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateRuleRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateRuleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rule != null && message.hasOwnProperty("rule")) { + var error = $root.google.devtools.artifactregistry.v1.Rule.verify(message.rule); + if (error) + return "rule." + 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 UpdateRuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.UpdateRuleRequest} UpdateRuleRequest + */ + UpdateRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateRuleRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.UpdateRuleRequest(); + if (object.rule != null) { + if (typeof object.rule !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateRuleRequest.rule: object expected"); + message.rule = $root.google.devtools.artifactregistry.v1.Rule.fromObject(object.rule); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateRuleRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateRuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.UpdateRuleRequest} message UpdateRuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateRuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rule = null; + object.updateMask = null; + } + if (message.rule != null && message.hasOwnProperty("rule")) + object.rule = $root.google.devtools.artifactregistry.v1.Rule.toObject(message.rule, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateRuleRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateRuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateRuleRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdateRuleRequest"; + }; + + return UpdateRuleRequest; + })(); + + v1.DeleteRuleRequest = (function() { + + /** + * Properties of a DeleteRuleRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IDeleteRuleRequest + * @property {string|null} [name] DeleteRuleRequest name + */ + + /** + * Constructs a new DeleteRuleRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a DeleteRuleRequest. + * @implements IDeleteRuleRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IDeleteRuleRequest=} [properties] Properties to set + */ + function DeleteRuleRequest(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]]; + } + + /** + * DeleteRuleRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest + * @instance + */ + DeleteRuleRequest.prototype.name = ""; + + /** + * Creates a new DeleteRuleRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteRuleRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.DeleteRuleRequest} DeleteRuleRequest instance + */ + DeleteRuleRequest.create = function create(properties) { + return new DeleteRuleRequest(properties); + }; + + /** + * Encodes the specified DeleteRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRuleRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteRuleRequest} message DeleteRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRuleRequest.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 DeleteRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteRuleRequest} message DeleteRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteRuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.DeleteRuleRequest} DeleteRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRuleRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DeleteRuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteRuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.DeleteRuleRequest} DeleteRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteRuleRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteRuleRequest.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 DeleteRuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.DeleteRuleRequest} DeleteRuleRequest + */ + DeleteRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteRuleRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.DeleteRuleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteRuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest + * @static + * @param {google.devtools.artifactregistry.v1.DeleteRuleRequest} message DeleteRuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteRuleRequest.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 DeleteRuleRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteRuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteRuleRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DeleteRuleRequest"; + }; + + return DeleteRuleRequest; + })(); + + v1.ArtifactRegistry = (function() { + + /** + * Constructs a new ArtifactRegistry service. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ArtifactRegistry + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function ArtifactRegistry(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ArtifactRegistry.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ArtifactRegistry; + + /** + * Creates new ArtifactRegistry service using the specified rpc implementation. + * @function create + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {ArtifactRegistry} RPC service. Useful where requests and/or responses are streamed. + */ + ArtifactRegistry.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listDockerImages}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListDockerImagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListDockerImagesResponse} [response] ListDockerImagesResponse + */ + + /** + * Calls ListDockerImages. + * @function listDockerImages + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} request ListDockerImagesRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImagesCallback} callback Node-style callback called with the error, if any, and ListDockerImagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listDockerImages = function listDockerImages(request, callback) { + return this.rpcCall(listDockerImages, $root.google.devtools.artifactregistry.v1.ListDockerImagesRequest, $root.google.devtools.artifactregistry.v1.ListDockerImagesResponse, request, callback); + }, "name", { value: "ListDockerImages" }); + + /** + * Calls ListDockerImages. + * @function listDockerImages + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} request ListDockerImagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getDockerImage}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetDockerImageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.DockerImage} [response] DockerImage + */ + + /** + * Calls GetDockerImage. + * @function getDockerImage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest} request GetDockerImageRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImageCallback} callback Node-style callback called with the error, if any, and DockerImage + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getDockerImage = function getDockerImage(request, callback) { + return this.rpcCall(getDockerImage, $root.google.devtools.artifactregistry.v1.GetDockerImageRequest, $root.google.devtools.artifactregistry.v1.DockerImage, request, callback); + }, "name", { value: "GetDockerImage" }); + + /** + * Calls GetDockerImage. + * @function getDockerImage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest} request GetDockerImageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listMavenArtifacts}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListMavenArtifactsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListMavenArtifactsResponse} [response] ListMavenArtifactsResponse + */ + + /** + * Calls ListMavenArtifacts. + * @function listMavenArtifacts + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsRequest} request ListMavenArtifactsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListMavenArtifactsCallback} callback Node-style callback called with the error, if any, and ListMavenArtifactsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listMavenArtifacts = function listMavenArtifacts(request, callback) { + return this.rpcCall(listMavenArtifacts, $root.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest, $root.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse, request, callback); + }, "name", { value: "ListMavenArtifacts" }); + + /** + * Calls ListMavenArtifacts. + * @function listMavenArtifacts + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsRequest} request ListMavenArtifactsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getMavenArtifact}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetMavenArtifactCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.MavenArtifact} [response] MavenArtifact + */ + + /** + * Calls GetMavenArtifact. + * @function getMavenArtifact + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetMavenArtifactRequest} request GetMavenArtifactRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetMavenArtifactCallback} callback Node-style callback called with the error, if any, and MavenArtifact + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getMavenArtifact = function getMavenArtifact(request, callback) { + return this.rpcCall(getMavenArtifact, $root.google.devtools.artifactregistry.v1.GetMavenArtifactRequest, $root.google.devtools.artifactregistry.v1.MavenArtifact, request, callback); + }, "name", { value: "GetMavenArtifact" }); + + /** + * Calls GetMavenArtifact. + * @function getMavenArtifact + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetMavenArtifactRequest} request GetMavenArtifactRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listNpmPackages}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListNpmPackagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListNpmPackagesResponse} [response] ListNpmPackagesResponse + */ + + /** + * Calls ListNpmPackages. + * @function listNpmPackages + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListNpmPackagesRequest} request ListNpmPackagesRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListNpmPackagesCallback} callback Node-style callback called with the error, if any, and ListNpmPackagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listNpmPackages = function listNpmPackages(request, callback) { + return this.rpcCall(listNpmPackages, $root.google.devtools.artifactregistry.v1.ListNpmPackagesRequest, $root.google.devtools.artifactregistry.v1.ListNpmPackagesResponse, request, callback); + }, "name", { value: "ListNpmPackages" }); + + /** + * Calls ListNpmPackages. + * @function listNpmPackages + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListNpmPackagesRequest} request ListNpmPackagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getNpmPackage}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetNpmPackageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.NpmPackage} [response] NpmPackage + */ + + /** + * Calls GetNpmPackage. + * @function getNpmPackage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetNpmPackageRequest} request GetNpmPackageRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetNpmPackageCallback} callback Node-style callback called with the error, if any, and NpmPackage + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getNpmPackage = function getNpmPackage(request, callback) { + return this.rpcCall(getNpmPackage, $root.google.devtools.artifactregistry.v1.GetNpmPackageRequest, $root.google.devtools.artifactregistry.v1.NpmPackage, request, callback); + }, "name", { value: "GetNpmPackage" }); + + /** + * Calls GetNpmPackage. + * @function getNpmPackage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetNpmPackageRequest} request GetNpmPackageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listPythonPackages}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListPythonPackagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListPythonPackagesResponse} [response] ListPythonPackagesResponse + */ + + /** + * Calls ListPythonPackages. + * @function listPythonPackages + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListPythonPackagesRequest} request ListPythonPackagesRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListPythonPackagesCallback} callback Node-style callback called with the error, if any, and ListPythonPackagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listPythonPackages = function listPythonPackages(request, callback) { + return this.rpcCall(listPythonPackages, $root.google.devtools.artifactregistry.v1.ListPythonPackagesRequest, $root.google.devtools.artifactregistry.v1.ListPythonPackagesResponse, request, callback); + }, "name", { value: "ListPythonPackages" }); + + /** + * Calls ListPythonPackages. + * @function listPythonPackages + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListPythonPackagesRequest} request ListPythonPackagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getPythonPackage}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetPythonPackageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.PythonPackage} [response] PythonPackage + */ + + /** + * Calls GetPythonPackage. + * @function getPythonPackage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetPythonPackageRequest} request GetPythonPackageRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetPythonPackageCallback} callback Node-style callback called with the error, if any, and PythonPackage + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getPythonPackage = function getPythonPackage(request, callback) { + return this.rpcCall(getPythonPackage, $root.google.devtools.artifactregistry.v1.GetPythonPackageRequest, $root.google.devtools.artifactregistry.v1.PythonPackage, request, callback); + }, "name", { value: "GetPythonPackage" }); + + /** + * Calls GetPythonPackage. + * @function getPythonPackage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetPythonPackageRequest} request GetPythonPackageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|importAptArtifacts}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ImportAptArtifactsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportAptArtifacts. + * @function importAptArtifacts + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest} request ImportAptArtifactsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifactsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.importAptArtifacts = function importAptArtifacts(request, callback) { + return this.rpcCall(importAptArtifacts, $root.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportAptArtifacts" }); + + /** + * Calls ImportAptArtifacts. + * @function importAptArtifacts + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest} request ImportAptArtifactsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|importYumArtifacts}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ImportYumArtifactsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportYumArtifacts. + * @function importYumArtifacts + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest} request ImportYumArtifactsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifactsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.importYumArtifacts = function importYumArtifacts(request, callback) { + return this.rpcCall(importYumArtifacts, $root.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportYumArtifacts" }); + + /** + * Calls ImportYumArtifacts. + * @function importYumArtifacts + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest} request ImportYumArtifactsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listRepositories}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListRepositoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListRepositoriesResponse} [response] ListRepositoriesResponse + */ + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositoriesCallback} callback Node-style callback called with the error, if any, and ListRepositoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listRepositories = function listRepositories(request, callback) { + return this.rpcCall(listRepositories, $root.google.devtools.artifactregistry.v1.ListRepositoriesRequest, $root.google.devtools.artifactregistry.v1.ListRepositoriesResponse, request, callback); + }, "name", { value: "ListRepositories" }); + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getRepository}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Repository} [response] Repository + */ + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getRepository = function getRepository(request, callback) { + return this.rpcCall(getRepository, $root.google.devtools.artifactregistry.v1.GetRepositoryRequest, $root.google.devtools.artifactregistry.v1.Repository, request, callback); + }, "name", { value: "GetRepository" }); + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createRepository}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef CreateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepositoryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.createRepository = function createRepository(request, callback) { + return this.rpcCall(createRepository, $root.google.devtools.artifactregistry.v1.CreateRepositoryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateRepository" }); + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateRepository}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef UpdateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Repository} [response] Repository + */ + + /** + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.updateRepository = function updateRepository(request, callback) { + return this.rpcCall(updateRepository, $root.google.devtools.artifactregistry.v1.UpdateRepositoryRequest, $root.google.devtools.artifactregistry.v1.Repository, request, callback); + }, "name", { value: "UpdateRepository" }); + + /** + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteRepository}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef DeleteRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepositoryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.deleteRepository = function deleteRepository(request, callback) { + return this.rpcCall(deleteRepository, $root.google.devtools.artifactregistry.v1.DeleteRepositoryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteRepository" }); + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listPackages}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListPackagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListPackagesResponse} [response] ListPackagesResponse + */ + + /** + * Calls ListPackages. + * @function listPackages + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListPackagesRequest} request ListPackagesRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackagesCallback} callback Node-style callback called with the error, if any, and ListPackagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listPackages = function listPackages(request, callback) { + return this.rpcCall(listPackages, $root.google.devtools.artifactregistry.v1.ListPackagesRequest, $root.google.devtools.artifactregistry.v1.ListPackagesResponse, request, callback); + }, "name", { value: "ListPackages" }); + + /** + * Calls ListPackages. + * @function listPackages + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListPackagesRequest} request ListPackagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getPackage}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetPackageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Package} [response] Package + */ + + /** + * Calls GetPackage. + * @function getPackage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetPackageRequest} request GetPackageRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackageCallback} callback Node-style callback called with the error, if any, and Package + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getPackage = function getPackage(request, callback) { + return this.rpcCall(getPackage, $root.google.devtools.artifactregistry.v1.GetPackageRequest, $root.google.devtools.artifactregistry.v1.Package, request, callback); + }, "name", { value: "GetPackage" }); + + /** + * Calls GetPackage. + * @function getPackage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetPackageRequest} request GetPackageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deletePackage}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef DeletePackageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeletePackage. + * @function deletePackage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest} request DeletePackageRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackageCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.deletePackage = function deletePackage(request, callback) { + return this.rpcCall(deletePackage, $root.google.devtools.artifactregistry.v1.DeletePackageRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeletePackage" }); + + /** + * Calls DeletePackage. + * @function deletePackage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest} request DeletePackageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listVersions}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListVersionsResponse} [response] ListVersionsResponse + */ + + /** + * Calls ListVersions. + * @function listVersions + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListVersionsRequest} request ListVersionsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersionsCallback} callback Node-style callback called with the error, if any, and ListVersionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listVersions = function listVersions(request, callback) { + return this.rpcCall(listVersions, $root.google.devtools.artifactregistry.v1.ListVersionsRequest, $root.google.devtools.artifactregistry.v1.ListVersionsResponse, request, callback); + }, "name", { value: "ListVersions" }); + + /** + * Calls ListVersions. + * @function listVersions + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListVersionsRequest} request ListVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getVersion}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Version} [response] Version + */ + + /** + * Calls GetVersion. + * @function getVersion + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetVersionRequest} request GetVersionRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersionCallback} callback Node-style callback called with the error, if any, and Version + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getVersion = function getVersion(request, callback) { + return this.rpcCall(getVersion, $root.google.devtools.artifactregistry.v1.GetVersionRequest, $root.google.devtools.artifactregistry.v1.Version, request, callback); + }, "name", { value: "GetVersion" }); + + /** + * Calls GetVersion. + * @function getVersion + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetVersionRequest} request GetVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteVersion}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef DeleteVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteVersion. + * @function deleteVersion + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest} request DeleteVersionRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.deleteVersion = function deleteVersion(request, callback) { + return this.rpcCall(deleteVersion, $root.google.devtools.artifactregistry.v1.DeleteVersionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteVersion" }); + + /** + * Calls DeleteVersion. + * @function deleteVersion + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest} request DeleteVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|batchDeleteVersions}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef BatchDeleteVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls BatchDeleteVersions. + * @function batchDeleteVersions + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest} request BatchDeleteVersionsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.BatchDeleteVersionsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.batchDeleteVersions = function batchDeleteVersions(request, callback) { + return this.rpcCall(batchDeleteVersions, $root.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchDeleteVersions" }); + + /** + * Calls BatchDeleteVersions. + * @function batchDeleteVersions + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest} request BatchDeleteVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateVersion}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef UpdateVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Version} [response] Version + */ + + /** + * Calls UpdateVersion. + * @function updateVersion + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateVersionRequest} request UpdateVersionRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVersionCallback} callback Node-style callback called with the error, if any, and Version + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.updateVersion = function updateVersion(request, callback) { + return this.rpcCall(updateVersion, $root.google.devtools.artifactregistry.v1.UpdateVersionRequest, $root.google.devtools.artifactregistry.v1.Version, request, callback); + }, "name", { value: "UpdateVersion" }); + + /** + * Calls UpdateVersion. + * @function updateVersion + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateVersionRequest} request UpdateVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listFiles}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListFilesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListFilesResponse} [response] ListFilesResponse + */ + + /** + * Calls ListFiles. + * @function listFiles + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListFilesRequest} request ListFilesRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListFilesCallback} callback Node-style callback called with the error, if any, and ListFilesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listFiles = function listFiles(request, callback) { + return this.rpcCall(listFiles, $root.google.devtools.artifactregistry.v1.ListFilesRequest, $root.google.devtools.artifactregistry.v1.ListFilesResponse, request, callback); + }, "name", { value: "ListFiles" }); + + /** + * Calls ListFiles. + * @function listFiles + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListFilesRequest} request ListFilesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getFile}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.File} [response] File + */ + + /** + * Calls GetFile. + * @function getFile + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetFileRequest} request GetFileRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetFileCallback} callback Node-style callback called with the error, if any, and File + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getFile = function getFile(request, callback) { + return this.rpcCall(getFile, $root.google.devtools.artifactregistry.v1.GetFileRequest, $root.google.devtools.artifactregistry.v1.File, request, callback); + }, "name", { value: "GetFile" }); + + /** + * Calls GetFile. + * @function getFile + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetFileRequest} request GetFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteFile}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef DeleteFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteFile. + * @function deleteFile + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteFileRequest} request DeleteFileRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteFileCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.deleteFile = function deleteFile(request, callback) { + return this.rpcCall(deleteFile, $root.google.devtools.artifactregistry.v1.DeleteFileRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteFile" }); + + /** + * Calls DeleteFile. + * @function deleteFile + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteFileRequest} request DeleteFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateFile}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef UpdateFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.File} [response] File + */ + + /** + * Calls UpdateFile. + * @function updateFile + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateFileRequest} request UpdateFileRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateFileCallback} callback Node-style callback called with the error, if any, and File + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.updateFile = function updateFile(request, callback) { + return this.rpcCall(updateFile, $root.google.devtools.artifactregistry.v1.UpdateFileRequest, $root.google.devtools.artifactregistry.v1.File, request, callback); + }, "name", { value: "UpdateFile" }); + + /** + * Calls UpdateFile. + * @function updateFile + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateFileRequest} request UpdateFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listTags}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListTagsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListTagsResponse} [response] ListTagsResponse + */ + + /** + * Calls ListTags. + * @function listTags + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListTagsRequest} request ListTagsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListTagsCallback} callback Node-style callback called with the error, if any, and ListTagsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listTags = function listTags(request, callback) { + return this.rpcCall(listTags, $root.google.devtools.artifactregistry.v1.ListTagsRequest, $root.google.devtools.artifactregistry.v1.ListTagsResponse, request, callback); + }, "name", { value: "ListTags" }); + + /** + * Calls ListTags. + * @function listTags + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListTagsRequest} request ListTagsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getTag}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Tag} [response] Tag + */ + + /** + * Calls GetTag. + * @function getTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetTagRequest} request GetTagRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetTagCallback} callback Node-style callback called with the error, if any, and Tag + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getTag = function getTag(request, callback) { + return this.rpcCall(getTag, $root.google.devtools.artifactregistry.v1.GetTagRequest, $root.google.devtools.artifactregistry.v1.Tag, request, callback); + }, "name", { value: "GetTag" }); + + /** + * Calls GetTag. + * @function getTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetTagRequest} request GetTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createTag}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef CreateTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Tag} [response] Tag + */ + + /** + * Calls CreateTag. + * @function createTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.ICreateTagRequest} request CreateTagRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTagCallback} callback Node-style callback called with the error, if any, and Tag + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.createTag = function createTag(request, callback) { + return this.rpcCall(createTag, $root.google.devtools.artifactregistry.v1.CreateTagRequest, $root.google.devtools.artifactregistry.v1.Tag, request, callback); + }, "name", { value: "CreateTag" }); + + /** + * Calls CreateTag. + * @function createTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.ICreateTagRequest} request CreateTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateTag}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef UpdateTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Tag} [response] Tag + */ + + /** + * Calls UpdateTag. + * @function updateTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest} request UpdateTagRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTagCallback} callback Node-style callback called with the error, if any, and Tag + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.updateTag = function updateTag(request, callback) { + return this.rpcCall(updateTag, $root.google.devtools.artifactregistry.v1.UpdateTagRequest, $root.google.devtools.artifactregistry.v1.Tag, request, callback); + }, "name", { value: "UpdateTag" }); + + /** + * Calls UpdateTag. + * @function updateTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest} request UpdateTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteTag}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef DeleteTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteTag. + * @function deleteTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest} request DeleteTagRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTagCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.deleteTag = function deleteTag(request, callback) { + return this.rpcCall(deleteTag, $root.google.devtools.artifactregistry.v1.DeleteTagRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteTag" }); + + /** + * Calls DeleteTag. + * @function deleteTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest} request DeleteTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createRule}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef CreateRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Rule} [response] Rule + */ + + /** + * Calls CreateRule. + * @function createRule + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.ICreateRuleRequest} request CreateRuleRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRuleCallback} callback Node-style callback called with the error, if any, and Rule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.createRule = function createRule(request, callback) { + return this.rpcCall(createRule, $root.google.devtools.artifactregistry.v1.CreateRuleRequest, $root.google.devtools.artifactregistry.v1.Rule, request, callback); + }, "name", { value: "CreateRule" }); + + /** + * Calls CreateRule. + * @function createRule + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.ICreateRuleRequest} request CreateRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listRules}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListRulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListRulesResponse} [response] ListRulesResponse + */ + + /** + * Calls ListRules. + * @function listRules + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListRulesRequest} request ListRulesRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListRulesCallback} callback Node-style callback called with the error, if any, and ListRulesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listRules = function listRules(request, callback) { + return this.rpcCall(listRules, $root.google.devtools.artifactregistry.v1.ListRulesRequest, $root.google.devtools.artifactregistry.v1.ListRulesResponse, request, callback); + }, "name", { value: "ListRules" }); + + /** + * Calls ListRules. + * @function listRules + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListRulesRequest} request ListRulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getRule}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Rule} [response] Rule + */ + + /** + * Calls GetRule. + * @function getRule + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetRuleRequest} request GetRuleRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetRuleCallback} callback Node-style callback called with the error, if any, and Rule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getRule = function getRule(request, callback) { + return this.rpcCall(getRule, $root.google.devtools.artifactregistry.v1.GetRuleRequest, $root.google.devtools.artifactregistry.v1.Rule, request, callback); + }, "name", { value: "GetRule" }); + + /** + * Calls GetRule. + * @function getRule + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetRuleRequest} request GetRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateRule}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef UpdateRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Rule} [response] Rule + */ + + /** + * Calls UpdateRule. + * @function updateRule + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateRuleRequest} request UpdateRuleRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRuleCallback} callback Node-style callback called with the error, if any, and Rule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.updateRule = function updateRule(request, callback) { + return this.rpcCall(updateRule, $root.google.devtools.artifactregistry.v1.UpdateRuleRequest, $root.google.devtools.artifactregistry.v1.Rule, request, callback); + }, "name", { value: "UpdateRule" }); + + /** + * Calls UpdateRule. + * @function updateRule + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateRuleRequest} request UpdateRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteRule}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef DeleteRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteRule. + * @function deleteRule + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteRuleRequest} request DeleteRuleRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRuleCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.deleteRule = function deleteRule(request, callback) { + return this.rpcCall(deleteRule, $root.google.devtools.artifactregistry.v1.DeleteRuleRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteRule" }); + + /** + * Calls DeleteRule. + * @function deleteRule + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteRuleRequest} request DeleteRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|setIamPolicy}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getIamPolicy}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|testIamPermissions}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getProjectSettings}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetProjectSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ProjectSettings} [response] ProjectSettings + */ + + /** + * Calls GetProjectSettings. + * @function getProjectSettings + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest} request GetProjectSettingsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettingsCallback} callback Node-style callback called with the error, if any, and ProjectSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getProjectSettings = function getProjectSettings(request, callback) { + return this.rpcCall(getProjectSettings, $root.google.devtools.artifactregistry.v1.GetProjectSettingsRequest, $root.google.devtools.artifactregistry.v1.ProjectSettings, request, callback); + }, "name", { value: "GetProjectSettings" }); + + /** + * Calls GetProjectSettings. + * @function getProjectSettings + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest} request GetProjectSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateProjectSettings}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef UpdateProjectSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ProjectSettings} [response] ProjectSettings + */ + + /** + * Calls UpdateProjectSettings. + * @function updateProjectSettings + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest} request UpdateProjectSettingsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettingsCallback} callback Node-style callback called with the error, if any, and ProjectSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.updateProjectSettings = function updateProjectSettings(request, callback) { + return this.rpcCall(updateProjectSettings, $root.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest, $root.google.devtools.artifactregistry.v1.ProjectSettings, request, callback); + }, "name", { value: "UpdateProjectSettings" }); + + /** + * Calls UpdateProjectSettings. + * @function updateProjectSettings + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest} request UpdateProjectSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getVPCSCConfig}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetVPCSCConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.VPCSCConfig} [response] VPCSCConfig + */ + + /** + * Calls GetVPCSCConfig. + * @function getVPCSCConfig + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest} request GetVPCSCConfigRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetVPCSCConfigCallback} callback Node-style callback called with the error, if any, and VPCSCConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getVPCSCConfig = function getVPCSCConfig(request, callback) { + return this.rpcCall(getVPCSCConfig, $root.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest, $root.google.devtools.artifactregistry.v1.VPCSCConfig, request, callback); + }, "name", { value: "GetVPCSCConfig" }); + + /** + * Calls GetVPCSCConfig. + * @function getVPCSCConfig + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest} request GetVPCSCConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateVPCSCConfig}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef UpdateVPCSCConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.VPCSCConfig} [response] VPCSCConfig + */ + + /** + * Calls UpdateVPCSCConfig. + * @function updateVPCSCConfig + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest} request UpdateVPCSCConfigRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVPCSCConfigCallback} callback Node-style callback called with the error, if any, and VPCSCConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.updateVPCSCConfig = function updateVPCSCConfig(request, callback) { + return this.rpcCall(updateVPCSCConfig, $root.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest, $root.google.devtools.artifactregistry.v1.VPCSCConfig, request, callback); + }, "name", { value: "UpdateVPCSCConfig" }); + + /** + * Calls UpdateVPCSCConfig. + * @function updateVPCSCConfig + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest} request UpdateVPCSCConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updatePackage}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef UpdatePackageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Package} [response] Package + */ + + /** + * Calls UpdatePackage. + * @function updatePackage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdatePackageRequest} request UpdatePackageRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdatePackageCallback} callback Node-style callback called with the error, if any, and Package + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.updatePackage = function updatePackage(request, callback) { + return this.rpcCall(updatePackage, $root.google.devtools.artifactregistry.v1.UpdatePackageRequest, $root.google.devtools.artifactregistry.v1.Package, request, callback); + }, "name", { value: "UpdatePackage" }); + + /** + * Calls UpdatePackage. + * @function updatePackage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdatePackageRequest} request UpdatePackageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listAttachments}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListAttachmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListAttachmentsResponse} [response] ListAttachmentsResponse + */ + + /** + * Calls ListAttachments. + * @function listAttachments + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListAttachmentsRequest} request ListAttachmentsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListAttachmentsCallback} callback Node-style callback called with the error, if any, and ListAttachmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listAttachments = function listAttachments(request, callback) { + return this.rpcCall(listAttachments, $root.google.devtools.artifactregistry.v1.ListAttachmentsRequest, $root.google.devtools.artifactregistry.v1.ListAttachmentsResponse, request, callback); + }, "name", { value: "ListAttachments" }); + + /** + * Calls ListAttachments. + * @function listAttachments + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListAttachmentsRequest} request ListAttachmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getAttachment}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetAttachmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Attachment} [response] Attachment + */ + + /** + * Calls GetAttachment. + * @function getAttachment + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetAttachmentRequest} request GetAttachmentRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetAttachmentCallback} callback Node-style callback called with the error, if any, and Attachment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getAttachment = function getAttachment(request, callback) { + return this.rpcCall(getAttachment, $root.google.devtools.artifactregistry.v1.GetAttachmentRequest, $root.google.devtools.artifactregistry.v1.Attachment, request, callback); + }, "name", { value: "GetAttachment" }); + + /** + * Calls GetAttachment. + * @function getAttachment + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetAttachmentRequest} request GetAttachmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createAttachment}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef CreateAttachmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAttachment. + * @function createAttachment + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.ICreateAttachmentRequest} request CreateAttachmentRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.CreateAttachmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.createAttachment = function createAttachment(request, callback) { + return this.rpcCall(createAttachment, $root.google.devtools.artifactregistry.v1.CreateAttachmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAttachment" }); + + /** + * Calls CreateAttachment. + * @function createAttachment + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.ICreateAttachmentRequest} request CreateAttachmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteAttachment}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef DeleteAttachmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteAttachment. + * @function deleteAttachment + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteAttachmentRequest} request DeleteAttachmentRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteAttachmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.deleteAttachment = function deleteAttachment(request, callback) { + return this.rpcCall(deleteAttachment, $root.google.devtools.artifactregistry.v1.DeleteAttachmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteAttachment" }); + + /** + * Calls DeleteAttachment. + * @function deleteAttachment + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteAttachmentRequest} request DeleteAttachmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|exportArtifact}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ExportArtifactCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportArtifact. + * @function exportArtifact + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IExportArtifactRequest} request ExportArtifactRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ExportArtifactCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.exportArtifact = function exportArtifact(request, callback) { + return this.rpcCall(exportArtifact, $root.google.devtools.artifactregistry.v1.ExportArtifactRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportArtifact" }); + + /** + * Calls ExportArtifact. + * @function exportArtifact + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IExportArtifactRequest} request ExportArtifactRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ArtifactRegistry; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.devtools.artifactregistry.v1 + * @interface IOperationMetadata + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.devtools.artifactregistry.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.OperationMetadata) + return object; + return new $root.google.devtools.artifactregistry.v1.OperationMetadata(); + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {google.devtools.artifactregistry.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1.ProjectSettings = (function() { + + /** + * Properties of a ProjectSettings. + * @memberof google.devtools.artifactregistry.v1 + * @interface IProjectSettings + * @property {string|null} [name] ProjectSettings name + * @property {google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState|null} [legacyRedirectionState] ProjectSettings legacyRedirectionState + * @property {number|null} [pullPercent] ProjectSettings pullPercent + */ + + /** + * Constructs a new ProjectSettings. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ProjectSettings. + * @implements IProjectSettings + * @constructor + * @param {google.devtools.artifactregistry.v1.IProjectSettings=} [properties] Properties to set + */ + function ProjectSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProjectSettings name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @instance + */ + ProjectSettings.prototype.name = ""; + + /** + * ProjectSettings legacyRedirectionState. + * @member {google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState} legacyRedirectionState + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @instance + */ + ProjectSettings.prototype.legacyRedirectionState = 0; + + /** + * ProjectSettings pullPercent. + * @member {number} pullPercent + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @instance + */ + ProjectSettings.prototype.pullPercent = 0; + + /** + * Creates a new ProjectSettings instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {google.devtools.artifactregistry.v1.IProjectSettings=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ProjectSettings} ProjectSettings instance + */ + ProjectSettings.create = function create(properties) { + return new ProjectSettings(properties); + }; + + /** + * Encodes the specified ProjectSettings message. Does not implicitly {@link google.devtools.artifactregistry.v1.ProjectSettings.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {google.devtools.artifactregistry.v1.IProjectSettings} message ProjectSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProjectSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.legacyRedirectionState != null && Object.hasOwnProperty.call(message, "legacyRedirectionState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.legacyRedirectionState); + if (message.pullPercent != null && Object.hasOwnProperty.call(message, "pullPercent")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pullPercent); + return writer; + }; + + /** + * Encodes the specified ProjectSettings message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ProjectSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {google.devtools.artifactregistry.v1.IProjectSettings} message ProjectSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProjectSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProjectSettings message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ProjectSettings} ProjectSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProjectSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ProjectSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.legacyRedirectionState = reader.int32(); + break; + } + case 3: { + message.pullPercent = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProjectSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ProjectSettings} ProjectSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProjectSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProjectSettings message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProjectSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.legacyRedirectionState != null && message.hasOwnProperty("legacyRedirectionState")) + switch (message.legacyRedirectionState) { + default: + return "legacyRedirectionState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + case 6: + break; + } + if (message.pullPercent != null && message.hasOwnProperty("pullPercent")) + if (!$util.isInteger(message.pullPercent)) + return "pullPercent: integer expected"; + return null; + }; + + /** + * Creates a ProjectSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ProjectSettings} ProjectSettings + */ + ProjectSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ProjectSettings) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ProjectSettings(); + if (object.name != null) + message.name = String(object.name); + switch (object.legacyRedirectionState) { + default: + if (typeof object.legacyRedirectionState === "number") { + message.legacyRedirectionState = object.legacyRedirectionState; + break; + } + break; + case "REDIRECTION_STATE_UNSPECIFIED": + case 0: + message.legacyRedirectionState = 0; + break; + case "REDIRECTION_FROM_GCR_IO_DISABLED": + case 1: + message.legacyRedirectionState = 1; + break; + case "REDIRECTION_FROM_GCR_IO_ENABLED": + case 2: + message.legacyRedirectionState = 2; + break; + case "REDIRECTION_FROM_GCR_IO_FINALIZED": + case 3: + message.legacyRedirectionState = 3; + break; + case "REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING": + case 5: + message.legacyRedirectionState = 5; + break; + case "REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING": + case 6: + message.legacyRedirectionState = 6; + break; + } + if (object.pullPercent != null) + message.pullPercent = object.pullPercent | 0; + return message; + }; + + /** + * Creates a plain object from a ProjectSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {google.devtools.artifactregistry.v1.ProjectSettings} message ProjectSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProjectSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.legacyRedirectionState = options.enums === String ? "REDIRECTION_STATE_UNSPECIFIED" : 0; + object.pullPercent = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.legacyRedirectionState != null && message.hasOwnProperty("legacyRedirectionState")) + object.legacyRedirectionState = options.enums === String ? $root.google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState[message.legacyRedirectionState] === undefined ? message.legacyRedirectionState : $root.google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState[message.legacyRedirectionState] : message.legacyRedirectionState; + if (message.pullPercent != null && message.hasOwnProperty("pullPercent")) + object.pullPercent = message.pullPercent; + return object; + }; + + /** + * Converts this ProjectSettings to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @instance + * @returns {Object.} JSON object + */ + ProjectSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProjectSettings + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProjectSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ProjectSettings"; + }; + + /** + * RedirectionState enum. + * @name google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState + * @enum {number} + * @property {number} REDIRECTION_STATE_UNSPECIFIED=0 REDIRECTION_STATE_UNSPECIFIED value + * @property {number} REDIRECTION_FROM_GCR_IO_DISABLED=1 REDIRECTION_FROM_GCR_IO_DISABLED value + * @property {number} REDIRECTION_FROM_GCR_IO_ENABLED=2 REDIRECTION_FROM_GCR_IO_ENABLED value + * @property {number} REDIRECTION_FROM_GCR_IO_FINALIZED=3 REDIRECTION_FROM_GCR_IO_FINALIZED value + * @property {number} REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING=5 REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING value + * @property {number} REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING=6 REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING 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; + values[valuesById[5] = "REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING"] = 5; + values[valuesById[6] = "REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING"] = 6; + return values; + })(); + + return ProjectSettings; + })(); + + v1.GetProjectSettingsRequest = (function() { + + /** + * Properties of a GetProjectSettingsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetProjectSettingsRequest + * @property {string|null} [name] GetProjectSettingsRequest name + */ + + /** + * Constructs a new GetProjectSettingsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetProjectSettingsRequest. + * @implements IGetProjectSettingsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest=} [properties] Properties to set + */ + function GetProjectSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetProjectSettingsRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @instance + */ + GetProjectSettingsRequest.prototype.name = ""; + + /** + * Creates a new GetProjectSettingsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} GetProjectSettingsRequest instance + */ + GetProjectSettingsRequest.create = function create(properties) { + return new GetProjectSettingsRequest(properties); + }; + + /** + * Encodes the specified GetProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetProjectSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest} message GetProjectSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProjectSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetProjectSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest} message GetProjectSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProjectSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetProjectSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} GetProjectSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProjectSettingsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetProjectSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetProjectSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} GetProjectSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProjectSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetProjectSettingsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetProjectSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} GetProjectSettingsRequest + */ + GetProjectSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetProjectSettingsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetProjectSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetProjectSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} message GetProjectSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetProjectSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetProjectSettingsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetProjectSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetProjectSettingsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetProjectSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetProjectSettingsRequest"; + }; + + return GetProjectSettingsRequest; + })(); + + v1.UpdateProjectSettingsRequest = (function() { + + /** + * Properties of an UpdateProjectSettingsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IUpdateProjectSettingsRequest + * @property {google.devtools.artifactregistry.v1.IProjectSettings|null} [projectSettings] UpdateProjectSettingsRequest projectSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateProjectSettingsRequest updateMask + */ + + /** + * Constructs a new UpdateProjectSettingsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an UpdateProjectSettingsRequest. + * @implements IUpdateProjectSettingsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest=} [properties] Properties to set + */ + function UpdateProjectSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateProjectSettingsRequest projectSettings. + * @member {google.devtools.artifactregistry.v1.IProjectSettings|null|undefined} projectSettings + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @instance + */ + UpdateProjectSettingsRequest.prototype.projectSettings = null; + + /** + * UpdateProjectSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @instance + */ + UpdateProjectSettingsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateProjectSettingsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest instance + */ + UpdateProjectSettingsRequest.create = function create(properties) { + return new UpdateProjectSettingsRequest(properties); + }; + + /** + * Encodes the specified UpdateProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest} message UpdateProjectSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateProjectSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectSettings != null && Object.hasOwnProperty.call(message, "projectSettings")) + $root.google.devtools.artifactregistry.v1.ProjectSettings.encode(message.projectSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest} message UpdateProjectSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateProjectSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateProjectSettingsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.projectSettings = $root.google.devtools.artifactregistry.v1.ProjectSettings.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateProjectSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateProjectSettingsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateProjectSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectSettings != null && message.hasOwnProperty("projectSettings")) { + var error = $root.google.devtools.artifactregistry.v1.ProjectSettings.verify(message.projectSettings); + if (error) + return "projectSettings." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest + */ + UpdateProjectSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest(); + if (object.projectSettings != null) { + if (typeof object.projectSettings !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.projectSettings: object expected"); + message.projectSettings = $root.google.devtools.artifactregistry.v1.ProjectSettings.fromObject(object.projectSettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateProjectSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} message UpdateProjectSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateProjectSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectSettings = null; + object.updateMask = null; + } + if (message.projectSettings != null && message.hasOwnProperty("projectSettings")) + object.projectSettings = $root.google.devtools.artifactregistry.v1.ProjectSettings.toObject(message.projectSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateProjectSettingsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateProjectSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateProjectSettingsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateProjectSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest"; + }; + + return UpdateProjectSettingsRequest; + })(); + + v1.VPCSCConfig = (function() { + + /** + * Properties of a VPCSCConfig. + * @memberof google.devtools.artifactregistry.v1 + * @interface IVPCSCConfig + * @property {string|null} [name] VPCSCConfig name + * @property {google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy|null} [vpcscPolicy] VPCSCConfig vpcscPolicy + */ + + /** + * Constructs a new VPCSCConfig. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a VPCSCConfig. + * @implements IVPCSCConfig + * @constructor + * @param {google.devtools.artifactregistry.v1.IVPCSCConfig=} [properties] Properties to set + */ + function VPCSCConfig(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]]; + } + + /** + * VPCSCConfig name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.VPCSCConfig + * @instance + */ + VPCSCConfig.prototype.name = ""; + + /** + * VPCSCConfig vpcscPolicy. + * @member {google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy} vpcscPolicy + * @memberof google.devtools.artifactregistry.v1.VPCSCConfig + * @instance + */ + VPCSCConfig.prototype.vpcscPolicy = 0; + + /** + * Creates a new VPCSCConfig instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.VPCSCConfig + * @static + * @param {google.devtools.artifactregistry.v1.IVPCSCConfig=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.VPCSCConfig} VPCSCConfig instance + */ + VPCSCConfig.create = function create(properties) { + return new VPCSCConfig(properties); + }; + + /** + * Encodes the specified VPCSCConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.VPCSCConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.VPCSCConfig + * @static + * @param {google.devtools.artifactregistry.v1.IVPCSCConfig} message VPCSCConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VPCSCConfig.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.vpcscPolicy != null && Object.hasOwnProperty.call(message, "vpcscPolicy")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.vpcscPolicy); + return writer; + }; + + /** + * Encodes the specified VPCSCConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.VPCSCConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.VPCSCConfig + * @static + * @param {google.devtools.artifactregistry.v1.IVPCSCConfig} message VPCSCConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VPCSCConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VPCSCConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.VPCSCConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.VPCSCConfig} VPCSCConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VPCSCConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.VPCSCConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.vpcscPolicy = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VPCSCConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.VPCSCConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.VPCSCConfig} VPCSCConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VPCSCConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VPCSCConfig message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.VPCSCConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VPCSCConfig.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.vpcscPolicy != null && message.hasOwnProperty("vpcscPolicy")) + switch (message.vpcscPolicy) { + default: + return "vpcscPolicy: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a VPCSCConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.VPCSCConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.VPCSCConfig} VPCSCConfig + */ + VPCSCConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.VPCSCConfig) + return object; + var message = new $root.google.devtools.artifactregistry.v1.VPCSCConfig(); + if (object.name != null) + message.name = String(object.name); + switch (object.vpcscPolicy) { + default: + if (typeof object.vpcscPolicy === "number") { + message.vpcscPolicy = object.vpcscPolicy; + break; + } + break; + case "VPCSC_POLICY_UNSPECIFIED": + case 0: + message.vpcscPolicy = 0; + break; + case "DENY": + case 1: + message.vpcscPolicy = 1; + break; + case "ALLOW": + case 2: + message.vpcscPolicy = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a VPCSCConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.VPCSCConfig + * @static + * @param {google.devtools.artifactregistry.v1.VPCSCConfig} message VPCSCConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VPCSCConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.vpcscPolicy = options.enums === String ? "VPCSC_POLICY_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.vpcscPolicy != null && message.hasOwnProperty("vpcscPolicy")) + object.vpcscPolicy = options.enums === String ? $root.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy[message.vpcscPolicy] === undefined ? message.vpcscPolicy : $root.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy[message.vpcscPolicy] : message.vpcscPolicy; + return object; + }; + + /** + * Converts this VPCSCConfig to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.VPCSCConfig + * @instance + * @returns {Object.} JSON object + */ + VPCSCConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VPCSCConfig + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.VPCSCConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VPCSCConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.VPCSCConfig"; + }; + + /** + * VPCSCPolicy enum. + * @name google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy + * @enum {number} + * @property {number} VPCSC_POLICY_UNSPECIFIED=0 VPCSC_POLICY_UNSPECIFIED value + * @property {number} DENY=1 DENY value + * @property {number} ALLOW=2 ALLOW value + */ + VPCSCConfig.VPCSCPolicy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VPCSC_POLICY_UNSPECIFIED"] = 0; + values[valuesById[1] = "DENY"] = 1; + values[valuesById[2] = "ALLOW"] = 2; + return values; + })(); + + return VPCSCConfig; + })(); + + v1.GetVPCSCConfigRequest = (function() { + + /** + * Properties of a GetVPCSCConfigRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetVPCSCConfigRequest + * @property {string|null} [name] GetVPCSCConfigRequest name + */ + + /** + * Constructs a new GetVPCSCConfigRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetVPCSCConfigRequest. + * @implements IGetVPCSCConfigRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest=} [properties] Properties to set + */ + function GetVPCSCConfigRequest(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]]; + } + + /** + * GetVPCSCConfigRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest + * @instance + */ + GetVPCSCConfigRequest.prototype.name = ""; + + /** + * Creates a new GetVPCSCConfigRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetVPCSCConfigRequest} GetVPCSCConfigRequest instance + */ + GetVPCSCConfigRequest.create = function create(properties) { + return new GetVPCSCConfigRequest(properties); + }; + + /** + * Encodes the specified GetVPCSCConfigRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest} message GetVPCSCConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVPCSCConfigRequest.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 GetVPCSCConfigRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest} message GetVPCSCConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVPCSCConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetVPCSCConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetVPCSCConfigRequest} GetVPCSCConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVPCSCConfigRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetVPCSCConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetVPCSCConfigRequest} GetVPCSCConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVPCSCConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetVPCSCConfigRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVPCSCConfigRequest.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 GetVPCSCConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetVPCSCConfigRequest} GetVPCSCConfigRequest + */ + GetVPCSCConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetVPCSCConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetVPCSCConfigRequest} message GetVPCSCConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVPCSCConfigRequest.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 GetVPCSCConfigRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetVPCSCConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetVPCSCConfigRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetVPCSCConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetVPCSCConfigRequest"; + }; + + return GetVPCSCConfigRequest; + })(); + + v1.UpdateVPCSCConfigRequest = (function() { + + /** + * Properties of an UpdateVPCSCConfigRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IUpdateVPCSCConfigRequest + * @property {google.devtools.artifactregistry.v1.IVPCSCConfig|null} [vpcscConfig] UpdateVPCSCConfigRequest vpcscConfig + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVPCSCConfigRequest updateMask + */ + + /** + * Constructs a new UpdateVPCSCConfigRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an UpdateVPCSCConfigRequest. + * @implements IUpdateVPCSCConfigRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest=} [properties] Properties to set + */ + function UpdateVPCSCConfigRequest(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]]; + } + + /** + * UpdateVPCSCConfigRequest vpcscConfig. + * @member {google.devtools.artifactregistry.v1.IVPCSCConfig|null|undefined} vpcscConfig + * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + * @instance + */ + UpdateVPCSCConfigRequest.prototype.vpcscConfig = null; + + /** + * UpdateVPCSCConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + * @instance + */ + UpdateVPCSCConfigRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateVPCSCConfigRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest} UpdateVPCSCConfigRequest instance + */ + UpdateVPCSCConfigRequest.create = function create(properties) { + return new UpdateVPCSCConfigRequest(properties); + }; + + /** + * Encodes the specified UpdateVPCSCConfigRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest} message UpdateVPCSCConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVPCSCConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vpcscConfig != null && Object.hasOwnProperty.call(message, "vpcscConfig")) + $root.google.devtools.artifactregistry.v1.VPCSCConfig.encode(message.vpcscConfig, 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 UpdateVPCSCConfigRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest} message UpdateVPCSCConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVPCSCConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateVPCSCConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest} UpdateVPCSCConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateVPCSCConfigRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.vpcscConfig = $root.google.devtools.artifactregistry.v1.VPCSCConfig.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 UpdateVPCSCConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest} UpdateVPCSCConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateVPCSCConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateVPCSCConfigRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateVPCSCConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vpcscConfig != null && message.hasOwnProperty("vpcscConfig")) { + var error = $root.google.devtools.artifactregistry.v1.VPCSCConfig.verify(message.vpcscConfig); + if (error) + return "vpcscConfig." + 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 UpdateVPCSCConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest} UpdateVPCSCConfigRequest + */ + UpdateVPCSCConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest(); + if (object.vpcscConfig != null) { + if (typeof object.vpcscConfig !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.vpcscConfig: object expected"); + message.vpcscConfig = $root.google.devtools.artifactregistry.v1.VPCSCConfig.fromObject(object.vpcscConfig); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateVPCSCConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + * @static + * @param {google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest} message UpdateVPCSCConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateVPCSCConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.vpcscConfig = null; + object.updateMask = null; + } + if (message.vpcscConfig != null && message.hasOwnProperty("vpcscConfig")) + object.vpcscConfig = $root.google.devtools.artifactregistry.v1.VPCSCConfig.toObject(message.vpcscConfig, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateVPCSCConfigRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateVPCSCConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateVPCSCConfigRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateVPCSCConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest"; + }; + + return UpdateVPCSCConfigRequest; + })(); + + v1.YumArtifact = (function() { + + /** + * Properties of a YumArtifact. + * @memberof google.devtools.artifactregistry.v1 + * @interface IYumArtifact + * @property {string|null} [name] YumArtifact name + * @property {string|null} [packageName] YumArtifact packageName + * @property {google.devtools.artifactregistry.v1.YumArtifact.PackageType|null} [packageType] YumArtifact packageType + * @property {string|null} [architecture] YumArtifact architecture + */ + + /** + * Constructs a new YumArtifact. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a YumArtifact. + * @implements IYumArtifact + * @constructor + * @param {google.devtools.artifactregistry.v1.IYumArtifact=} [properties] Properties to set + */ + function YumArtifact(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * YumArtifact name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @instance + */ + YumArtifact.prototype.name = ""; + + /** + * YumArtifact packageName. + * @member {string} packageName + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @instance + */ + YumArtifact.prototype.packageName = ""; + + /** + * YumArtifact packageType. + * @member {google.devtools.artifactregistry.v1.YumArtifact.PackageType} packageType + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @instance + */ + YumArtifact.prototype.packageType = 0; + + /** + * YumArtifact architecture. + * @member {string} architecture + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @instance + */ + YumArtifact.prototype.architecture = ""; + + /** + * Creates a new YumArtifact instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IYumArtifact=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.YumArtifact} YumArtifact instance + */ + YumArtifact.create = function create(properties) { + return new YumArtifact(properties); + }; + + /** + * Encodes the specified YumArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.YumArtifact.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IYumArtifact} message YumArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YumArtifact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.packageName); + if (message.packageType != null && Object.hasOwnProperty.call(message, "packageType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.packageType); + if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.architecture); + return writer; + }; + + /** + * Encodes the specified YumArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.YumArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IYumArtifact} message YumArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YumArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a YumArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.YumArtifact} YumArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YumArtifact.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.YumArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.packageName = reader.string(); + break; + } + case 3: { + message.packageType = reader.int32(); + break; + } + case 4: { + message.architecture = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a YumArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.YumArtifact} YumArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YumArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a YumArtifact message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + YumArtifact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + if (message.packageType != null && message.hasOwnProperty("packageType")) + switch (message.packageType) { + default: + return "packageType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.architecture != null && message.hasOwnProperty("architecture")) + if (!$util.isString(message.architecture)) + return "architecture: string expected"; + return null; + }; + + /** + * Creates a YumArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.YumArtifact} YumArtifact + */ + YumArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.YumArtifact) + return object; + var message = new $root.google.devtools.artifactregistry.v1.YumArtifact(); + if (object.name != null) + message.name = String(object.name); + if (object.packageName != null) + message.packageName = String(object.packageName); + switch (object.packageType) { + default: + if (typeof object.packageType === "number") { + message.packageType = object.packageType; + break; + } + break; + case "PACKAGE_TYPE_UNSPECIFIED": + case 0: + message.packageType = 0; + break; + case "BINARY": + case 1: + message.packageType = 1; + break; + case "SOURCE": + case 2: + message.packageType = 2; + break; + } + if (object.architecture != null) + message.architecture = String(object.architecture); + return message; + }; + + /** + * Creates a plain object from a YumArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {google.devtools.artifactregistry.v1.YumArtifact} message YumArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + YumArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.packageName = ""; + object.packageType = options.enums === String ? "PACKAGE_TYPE_UNSPECIFIED" : 0; + object.architecture = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; + if (message.packageType != null && message.hasOwnProperty("packageType")) + object.packageType = options.enums === String ? $root.google.devtools.artifactregistry.v1.YumArtifact.PackageType[message.packageType] === undefined ? message.packageType : $root.google.devtools.artifactregistry.v1.YumArtifact.PackageType[message.packageType] : message.packageType; + if (message.architecture != null && message.hasOwnProperty("architecture")) + object.architecture = message.architecture; + return object; + }; + + /** + * Converts this YumArtifact to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @instance + * @returns {Object.} JSON object + */ + YumArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for YumArtifact + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + YumArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.YumArtifact"; + }; + + /** + * PackageType enum. + * @name google.devtools.artifactregistry.v1.YumArtifact.PackageType + * @enum {number} + * @property {number} PACKAGE_TYPE_UNSPECIFIED=0 PACKAGE_TYPE_UNSPECIFIED value + * @property {number} BINARY=1 BINARY value + * @property {number} SOURCE=2 SOURCE value + */ + YumArtifact.PackageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PACKAGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BINARY"] = 1; + values[valuesById[2] = "SOURCE"] = 2; + return values; + })(); + + return YumArtifact; + })(); + + v1.ImportYumArtifactsGcsSource = (function() { + + /** + * Properties of an ImportYumArtifactsGcsSource. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImportYumArtifactsGcsSource + * @property {Array.|null} [uris] ImportYumArtifactsGcsSource uris + * @property {boolean|null} [useWildcards] ImportYumArtifactsGcsSource useWildcards + */ + + /** + * Constructs a new ImportYumArtifactsGcsSource. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportYumArtifactsGcsSource. + * @implements IImportYumArtifactsGcsSource + * @constructor + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource=} [properties] Properties to set + */ + function ImportYumArtifactsGcsSource(properties) { + this.uris = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportYumArtifactsGcsSource uris. + * @member {Array.} uris + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @instance + */ + ImportYumArtifactsGcsSource.prototype.uris = $util.emptyArray; + + /** + * ImportYumArtifactsGcsSource useWildcards. + * @member {boolean} useWildcards + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @instance + */ + ImportYumArtifactsGcsSource.prototype.useWildcards = false; + + /** + * Creates a new ImportYumArtifactsGcsSource instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} ImportYumArtifactsGcsSource instance + */ + ImportYumArtifactsGcsSource.create = function create(properties) { + return new ImportYumArtifactsGcsSource(properties); + }; + + /** + * Encodes the specified ImportYumArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource} message ImportYumArtifactsGcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsGcsSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uris != null && message.uris.length) + for (var i = 0; i < message.uris.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uris[i]); + if (message.useWildcards != null && Object.hasOwnProperty.call(message, "useWildcards")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.useWildcards); + return writer; + }; + + /** + * Encodes the specified ImportYumArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource} message ImportYumArtifactsGcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsGcsSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} ImportYumArtifactsGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsGcsSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.uris && message.uris.length)) + message.uris = []; + message.uris.push(reader.string()); + break; + } + case 2: { + message.useWildcards = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} ImportYumArtifactsGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsGcsSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportYumArtifactsGcsSource message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportYumArtifactsGcsSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uris != null && message.hasOwnProperty("uris")) { + if (!Array.isArray(message.uris)) + return "uris: array expected"; + for (var i = 0; i < message.uris.length; ++i) + if (!$util.isString(message.uris[i])) + return "uris: string[] expected"; + } + if (message.useWildcards != null && message.hasOwnProperty("useWildcards")) + if (typeof message.useWildcards !== "boolean") + return "useWildcards: boolean expected"; + return null; + }; + + /** + * Creates an ImportYumArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} ImportYumArtifactsGcsSource + */ + ImportYumArtifactsGcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource(); + if (object.uris) { + if (!Array.isArray(object.uris)) + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.uris: array expected"); + message.uris = []; + for (var i = 0; i < object.uris.length; ++i) + message.uris[i] = String(object.uris[i]); + } + if (object.useWildcards != null) + message.useWildcards = Boolean(object.useWildcards); + return message; + }; + + /** + * Creates a plain object from an ImportYumArtifactsGcsSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} message ImportYumArtifactsGcsSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportYumArtifactsGcsSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uris = []; + if (options.defaults) + object.useWildcards = false; + if (message.uris && message.uris.length) { + object.uris = []; + for (var j = 0; j < message.uris.length; ++j) + object.uris[j] = message.uris[j]; + } + if (message.useWildcards != null && message.hasOwnProperty("useWildcards")) + object.useWildcards = message.useWildcards; + return object; + }; + + /** + * Converts this ImportYumArtifactsGcsSource to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @instance + * @returns {Object.} JSON object + */ + ImportYumArtifactsGcsSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportYumArtifactsGcsSource + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportYumArtifactsGcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource"; + }; + + return ImportYumArtifactsGcsSource; + })(); + + v1.ImportYumArtifactsRequest = (function() { + + /** + * Properties of an ImportYumArtifactsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImportYumArtifactsRequest + * @property {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null} [gcsSource] ImportYumArtifactsRequest gcsSource + * @property {string|null} [parent] ImportYumArtifactsRequest parent + */ + + /** + * Constructs a new ImportYumArtifactsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportYumArtifactsRequest. + * @implements IImportYumArtifactsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest=} [properties] Properties to set + */ + function ImportYumArtifactsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportYumArtifactsRequest gcsSource. + * @member {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null|undefined} gcsSource + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @instance + */ + ImportYumArtifactsRequest.prototype.gcsSource = null; + + /** + * ImportYumArtifactsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @instance + */ + ImportYumArtifactsRequest.prototype.parent = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportYumArtifactsRequest source. + * @member {"gcsSource"|undefined} source + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @instance + */ + Object.defineProperty(ImportYumArtifactsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportYumArtifactsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} ImportYumArtifactsRequest instance + */ + ImportYumArtifactsRequest.create = function create(properties) { + return new ImportYumArtifactsRequest(properties); + }; + + /** + * Encodes the specified ImportYumArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest} message ImportYumArtifactsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.encode(message.gcsSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportYumArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest} message ImportYumArtifactsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} ImportYumArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.decode(reader, reader.uint32()); + break; + } + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} ImportYumArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportYumArtifactsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportYumArtifactsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates an ImportYumArtifactsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} ImportYumArtifactsRequest + */ + ImportYumArtifactsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.fromObject(object.gcsSource); + } + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from an ImportYumArtifactsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} message ImportYumArtifactsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportYumArtifactsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + return object; + }; + + /** + * Converts this ImportYumArtifactsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @instance + * @returns {Object.} JSON object + */ + ImportYumArtifactsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportYumArtifactsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportYumArtifactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportYumArtifactsRequest"; + }; + + return ImportYumArtifactsRequest; + })(); + + v1.ImportYumArtifactsErrorInfo = (function() { + + /** + * Properties of an ImportYumArtifactsErrorInfo. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImportYumArtifactsErrorInfo + * @property {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null} [gcsSource] ImportYumArtifactsErrorInfo gcsSource + * @property {google.rpc.IStatus|null} [error] ImportYumArtifactsErrorInfo error + */ + + /** + * Constructs a new ImportYumArtifactsErrorInfo. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportYumArtifactsErrorInfo. + * @implements IImportYumArtifactsErrorInfo + * @constructor + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo=} [properties] Properties to set + */ + function ImportYumArtifactsErrorInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportYumArtifactsErrorInfo gcsSource. + * @member {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null|undefined} gcsSource + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @instance + */ + ImportYumArtifactsErrorInfo.prototype.gcsSource = null; + + /** + * ImportYumArtifactsErrorInfo error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @instance + */ + ImportYumArtifactsErrorInfo.prototype.error = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportYumArtifactsErrorInfo source. + * @member {"gcsSource"|undefined} source + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @instance + */ + Object.defineProperty(ImportYumArtifactsErrorInfo.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportYumArtifactsErrorInfo instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} ImportYumArtifactsErrorInfo instance + */ + ImportYumArtifactsErrorInfo.create = function create(properties) { + return new ImportYumArtifactsErrorInfo(properties); + }; + + /** + * Encodes the specified ImportYumArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo} message ImportYumArtifactsErrorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsErrorInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportYumArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo} message ImportYumArtifactsErrorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsErrorInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} ImportYumArtifactsErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsErrorInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.decode(reader, reader.uint32()); + break; + } + case 2: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} ImportYumArtifactsErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsErrorInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportYumArtifactsErrorInfo message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportYumArtifactsErrorInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + return null; + }; + + /** + * Creates an ImportYumArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} ImportYumArtifactsErrorInfo + */ + ImportYumArtifactsErrorInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.gcsSource: object expected"); + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.fromObject(object.gcsSource); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + return message; + }; + + /** + * Creates a plain object from an ImportYumArtifactsErrorInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} message ImportYumArtifactsErrorInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportYumArtifactsErrorInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.error = null; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + return object; + }; + + /** + * Converts this ImportYumArtifactsErrorInfo to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @instance + * @returns {Object.} JSON object + */ + ImportYumArtifactsErrorInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportYumArtifactsErrorInfo + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportYumArtifactsErrorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo"; + }; + + return ImportYumArtifactsErrorInfo; + })(); + + v1.ImportYumArtifactsResponse = (function() { + + /** + * Properties of an ImportYumArtifactsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImportYumArtifactsResponse + * @property {Array.|null} [yumArtifacts] ImportYumArtifactsResponse yumArtifacts + * @property {Array.|null} [errors] ImportYumArtifactsResponse errors + */ + + /** + * Constructs a new ImportYumArtifactsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportYumArtifactsResponse. + * @implements IImportYumArtifactsResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsResponse=} [properties] Properties to set + */ + function ImportYumArtifactsResponse(properties) { + this.yumArtifacts = []; + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportYumArtifactsResponse yumArtifacts. + * @member {Array.} yumArtifacts + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @instance + */ + ImportYumArtifactsResponse.prototype.yumArtifacts = $util.emptyArray; + + /** + * ImportYumArtifactsResponse errors. + * @member {Array.} errors + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @instance + */ + ImportYumArtifactsResponse.prototype.errors = $util.emptyArray; + + /** + * Creates a new ImportYumArtifactsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsResponse} ImportYumArtifactsResponse instance + */ + ImportYumArtifactsResponse.create = function create(properties) { + return new ImportYumArtifactsResponse(properties); + }; + + /** + * Encodes the specified ImportYumArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsResponse} message ImportYumArtifactsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.yumArtifacts != null && message.yumArtifacts.length) + for (var i = 0; i < message.yumArtifacts.length; ++i) + $root.google.devtools.artifactregistry.v1.YumArtifact.encode(message.yumArtifacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportYumArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsResponse} message ImportYumArtifactsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportYumArtifactsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsResponse} ImportYumArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.yumArtifacts && message.yumArtifacts.length)) + message.yumArtifacts = []; + message.yumArtifacts.push($root.google.devtools.artifactregistry.v1.YumArtifact.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportYumArtifactsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsResponse} ImportYumArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportYumArtifactsResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportYumArtifactsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.yumArtifacts != null && message.hasOwnProperty("yumArtifacts")) { + if (!Array.isArray(message.yumArtifacts)) + return "yumArtifacts: array expected"; + for (var i = 0; i < message.yumArtifacts.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.YumArtifact.verify(message.yumArtifacts[i]); + if (error) + return "yumArtifacts." + error; + } + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + return null; + }; + + /** + * Creates an ImportYumArtifactsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsResponse} ImportYumArtifactsResponse + */ + ImportYumArtifactsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsResponse(); + if (object.yumArtifacts) { + if (!Array.isArray(object.yumArtifacts)) + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.yumArtifacts: array expected"); + message.yumArtifacts = []; + for (var i = 0; i < object.yumArtifacts.length; ++i) { + if (typeof object.yumArtifacts[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.yumArtifacts: object expected"); + message.yumArtifacts[i] = $root.google.devtools.artifactregistry.v1.YumArtifact.fromObject(object.yumArtifacts[i]); + } + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.errors: object expected"); + message.errors[i] = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.fromObject(object.errors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ImportYumArtifactsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.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.v1.YumArtifact.toObject(message.yumArtifacts[j], options); + } + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.toObject(message.errors[j], options); + } + return object; + }; + + /** + * Converts this ImportYumArtifactsResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @instance + * @returns {Object.} JSON object + */ + ImportYumArtifactsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportYumArtifactsResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportYumArtifactsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportYumArtifactsResponse"; + }; + + return ImportYumArtifactsResponse; + })(); + + v1.ImportYumArtifactsMetadata = (function() { + + /** + * Properties of an ImportYumArtifactsMetadata. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImportYumArtifactsMetadata + */ + + /** + * Constructs a new ImportYumArtifactsMetadata. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportYumArtifactsMetadata. + * @implements IImportYumArtifactsMetadata + * @constructor + * @param {google.devtools.artifactregistry.v1.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.v1.ImportYumArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata instance + */ + ImportYumArtifactsMetadata.create = function create(properties) { + return new ImportYumArtifactsMetadata(properties); + }; + + /** + * Encodes the specified ImportYumArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata} message ImportYumArtifactsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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.v1.ImportYumArtifactsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata} message ImportYumArtifactsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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.v1.ImportYumArtifactsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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.v1.ImportYumArtifactsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportYumArtifactsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an ImportYumArtifactsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata + */ + ImportYumArtifactsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata) + return object; + return new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata(); + }; + + /** + * Creates a plain object from an ImportYumArtifactsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} message ImportYumArtifactsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportYumArtifactsMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ImportYumArtifactsMetadata to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + * @instance + * @returns {Object.} JSON object + */ + ImportYumArtifactsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportYumArtifactsMetadata + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportYumArtifactsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata"; + }; + + return ImportYumArtifactsMetadata; + })(); + + return v1; + })(); + + artifactregistry.v1beta2 = (function() { + + /** + * Namespace v1beta2. + * @memberof google.devtools.artifactregistry + * @namespace + */ + var v1beta2 = {}; + + v1beta2.AptArtifact = (function() { + + /** + * Properties of an AptArtifact. + * @memberof google.devtools.artifactregistry.v1beta2 + * @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 AptArtifact. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an AptArtifact. + * @implements IAptArtifact + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IAptArtifact=} [properties] Properties to set + */ + function AptArtifact(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]]; + } + + /** + * AptArtifact name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact + * @instance + */ + AptArtifact.prototype.name = ""; + + /** + * AptArtifact packageName. + * @member {string} packageName + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact + * @instance + */ + AptArtifact.prototype.packageName = ""; + + /** + * 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.AptArtifact + * @static + * @param {google.devtools.artifactregistry.v1beta2.IAptArtifact=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.AptArtifact} AptArtifact instance + */ + AptArtifact.create = function create(properties) { + return new AptArtifact(properties); + }; + + /** + * Encodes the specified AptArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.AptArtifact.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact + * @static + * @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 + */ + AptArtifact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.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 AptArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.AptArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact + * @static + * @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 + */ + AptArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AptArtifact message from the specified reader or buffer. + * @function decode + * @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.AptArtifact} AptArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptArtifact.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + if (tag === error) + break; + 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; + } + case 5: { + message.component = reader.string(); + break; + } + case 6: { + message.controlFile = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AptArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + AptArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AptArtifact message. + * @function verify + * @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 + */ + AptArtifact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + if (message.packageType != null && message.hasOwnProperty("packageType")) + switch (message.packageType) { + default: + return "packageType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.architecture != null && message.hasOwnProperty("architecture")) + if (!$util.isString(message.architecture)) + return "architecture: string expected"; + if (message.component != null && message.hasOwnProperty("component")) + if (!$util.isString(message.component)) + return "component: string expected"; + if (message.controlFile != null && message.hasOwnProperty("controlFile")) + if (!(message.controlFile && typeof message.controlFile.length === "number" || $util.isString(message.controlFile))) + return "controlFile: buffer expected"; + return null; + }; + + /** + * Creates an AptArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.AptArtifact} AptArtifact + */ + AptArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.AptArtifact) + return object; + 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) { + default: + if (typeof object.packageType === "number") { + message.packageType = object.packageType; + break; + } + break; + case "PACKAGE_TYPE_UNSPECIFIED": + case 0: + message.packageType = 0; + break; + case "BINARY": + case 1: + message.packageType = 1; + break; + case "SOURCE": + case 2: + message.packageType = 2; + break; + } + if (object.architecture != null) + message.architecture = String(object.architecture); + if (object.component != null) + message.component = String(object.component); + if (object.controlFile != null) + if (typeof object.controlFile === "string") + $util.base64.decode(object.controlFile, message.controlFile = $util.newBuffer($util.base64.length(object.controlFile)), 0); + else if (object.controlFile.length >= 0) + message.controlFile = object.controlFile; + return message; + }; + + /** + * Creates a plain object from an AptArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact + * @static + * @param {google.devtools.artifactregistry.v1beta2.AptArtifact} message AptArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AptArtifact.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 = ""; + object.component = ""; + if (options.bytes === String) + object.controlFile = ""; + else { + object.controlFile = []; + if (options.bytes !== Array) + object.controlFile = $util.newBuffer(object.controlFile); + } + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.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] === undefined ? message.packageType : $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 AptArtifact to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact + * @instance + * @returns {Object.} JSON object + */ + AptArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AptArtifact + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AptArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.AptArtifact"; + }; + + /** + * PackageType enum. + * @name google.devtools.artifactregistry.v1beta2.AptArtifact.PackageType + * @enum {number} + * @property {number} PACKAGE_TYPE_UNSPECIFIED=0 PACKAGE_TYPE_UNSPECIFIED value + * @property {number} BINARY=1 BINARY value + * @property {number} SOURCE=2 SOURCE value + */ + AptArtifact.PackageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PACKAGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BINARY"] = 1; + values[valuesById[2] = "SOURCE"] = 2; + return values; + })(); + + return AptArtifact; + })(); + + v1beta2.ImportAptArtifactsGcsSource = (function() { + + /** + * Properties of an ImportAptArtifactsGcsSource. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IImportAptArtifactsGcsSource + * @property {Array.|null} [uris] ImportAptArtifactsGcsSource uris + * @property {boolean|null} [useWildcards] ImportAptArtifactsGcsSource useWildcards + */ + + /** + * Constructs a new ImportAptArtifactsGcsSource. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an ImportAptArtifactsGcsSource. + * @implements IImportAptArtifactsGcsSource + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource=} [properties] Properties to set + */ + function ImportAptArtifactsGcsSource(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]]; + } + + /** + * ImportAptArtifactsGcsSource uris. + * @member {Array.} uris + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource + * @instance + */ + ImportAptArtifactsGcsSource.prototype.uris = $util.emptyArray; + + /** + * ImportAptArtifactsGcsSource useWildcards. + * @member {boolean} useWildcards + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource + * @instance + */ + ImportAptArtifactsGcsSource.prototype.useWildcards = false; + + /** + * Creates a new ImportAptArtifactsGcsSource instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource instance + */ + ImportAptArtifactsGcsSource.create = function create(properties) { + return new ImportAptArtifactsGcsSource(properties); + }; + + /** + * Encodes the specified ImportAptArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource + * @static + * @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 + */ + ImportAptArtifactsGcsSource.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 ImportAptArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource + * @static + * @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 + */ + ImportAptArtifactsGcsSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportAptArtifactsGcsSource message from the specified reader or buffer. + * @function decode + * @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.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsGcsSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + if (tag === error) + break; + 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 ImportAptArtifactsGcsSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ImportAptArtifactsGcsSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportAptArtifactsGcsSource message. + * @function verify + * @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 + */ + ImportAptArtifactsGcsSource.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 ImportAptArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource + */ + ImportAptArtifactsGcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource) + return object; + 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.useWildcards != null) + message.useWildcards = Boolean(object.useWildcards); + return message; + }; + + /** + * Creates a plain object from an ImportAptArtifactsGcsSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource} message ImportAptArtifactsGcsSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportAptArtifactsGcsSource.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 ImportAptArtifactsGcsSource to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource + * @instance + * @returns {Object.} JSON object + */ + ImportAptArtifactsGcsSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportAptArtifactsGcsSource + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportAptArtifactsGcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource"; + }; + + return ImportAptArtifactsGcsSource; + })(); + + v1beta2.ImportAptArtifactsRequest = (function() { + + /** + * Properties of an ImportAptArtifactsRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IImportAptArtifactsRequest + * @property {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null} [gcsSource] ImportAptArtifactsRequest gcsSource + * @property {string|null} [parent] ImportAptArtifactsRequest parent + */ + + /** + * Constructs a new ImportAptArtifactsRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an ImportAptArtifactsRequest. + * @implements IImportAptArtifactsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest=} [properties] Properties to set + */ + function ImportAptArtifactsRequest(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]]; + } + + /** + * ImportAptArtifactsRequest gcsSource. + * @member {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null|undefined} gcsSource + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest + * @instance + */ + ImportAptArtifactsRequest.prototype.gcsSource = null; + + /** + * ImportAptArtifactsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest + * @instance + */ + ImportAptArtifactsRequest.prototype.parent = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportAptArtifactsRequest source. + * @member {"gcsSource"|undefined} source + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest + * @instance + */ + Object.defineProperty(ImportAptArtifactsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportAptArtifactsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest} ImportAptArtifactsRequest instance + */ + ImportAptArtifactsRequest.create = function create(properties) { + return new ImportAptArtifactsRequest(properties); + }; + + /** + * Encodes the specified ImportAptArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest + * @static + * @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 + */ + 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.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 ImportAptArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest + * @static + * @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 + */ + ImportAptArtifactsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer. + * @function decode + * @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.ImportAptArtifactsRequest} ImportAptArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.gcsSource = $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.decode(reader, reader.uint32()); + break; + } + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ImportAptArtifactsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportAptArtifactsRequest message. + * @function verify + * @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 + */ + 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"; + return null; + }; + + /** + * Creates an ImportAptArtifactsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest} ImportAptArtifactsRequest + */ + ImportAptArtifactsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest) + return object; + 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); + return message; + }; + + /** + * Creates a plain object from an ImportAptArtifactsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest} message ImportAptArtifactsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportAptArtifactsRequest.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.ImportAptArtifactsGcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + return object; + }; + + /** + * Converts this ImportAptArtifactsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest + * @instance + * @returns {Object.} JSON object + */ + ImportAptArtifactsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportAptArtifactsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportAptArtifactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest"; + }; + + return ImportAptArtifactsRequest; + })(); + + v1beta2.ImportAptArtifactsErrorInfo = (function() { + + /** + * Properties of an ImportAptArtifactsErrorInfo. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IImportAptArtifactsErrorInfo + * @property {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null} [gcsSource] ImportAptArtifactsErrorInfo gcsSource + * @property {google.rpc.IStatus|null} [error] ImportAptArtifactsErrorInfo error + */ + + /** + * Constructs a new ImportAptArtifactsErrorInfo. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an ImportAptArtifactsErrorInfo. + * @implements IImportAptArtifactsErrorInfo + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo=} [properties] Properties to set + */ + function ImportAptArtifactsErrorInfo(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]]; + } + + /** + * ImportAptArtifactsErrorInfo gcsSource. + * @member {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null|undefined} gcsSource + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo + * @instance + */ + ImportAptArtifactsErrorInfo.prototype.gcsSource = null; + + /** + * ImportAptArtifactsErrorInfo error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo + * @instance + */ + ImportAptArtifactsErrorInfo.prototype.error = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * 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.ImportAptArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo instance + */ + ImportAptArtifactsErrorInfo.create = function create(properties) { + return new ImportAptArtifactsErrorInfo(properties); + }; + + /** + * Encodes the specified ImportAptArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo + * @static + * @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 + */ + ImportAptArtifactsErrorInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 ImportAptArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo + * @static + * @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 + */ + ImportAptArtifactsErrorInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportAptArtifactsErrorInfo message from the specified reader or buffer. + * @function decode + * @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.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsErrorInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.gcsSource = $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.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 ImportAptArtifactsErrorInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ImportAptArtifactsErrorInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportAptArtifactsErrorInfo message. + * @function verify + * @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 + */ + ImportAptArtifactsErrorInfo.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.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + return null; + }; + + /** + * Creates an ImportAptArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo + */ + ImportAptArtifactsErrorInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo) + return object; + 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); + } + return message; + }; + + /** + * Creates a plain object from an ImportAptArtifactsErrorInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo} message ImportAptArtifactsErrorInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportAptArtifactsErrorInfo.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.ImportAptArtifactsGcsSource.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 ImportAptArtifactsErrorInfo to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo + * @instance + * @returns {Object.} JSON object + */ + ImportAptArtifactsErrorInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportAptArtifactsErrorInfo + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportAptArtifactsErrorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo"; + }; + + return ImportAptArtifactsErrorInfo; + })(); + + v1beta2.ImportAptArtifactsResponse = (function() { + + /** + * Properties of an ImportAptArtifactsResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IImportAptArtifactsResponse + * @property {Array.|null} [aptArtifacts] ImportAptArtifactsResponse aptArtifacts + * @property {Array.|null} [errors] ImportAptArtifactsResponse errors + */ + + /** + * Constructs a new ImportAptArtifactsResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an ImportAptArtifactsResponse. + * @implements IImportAptArtifactsResponse + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse=} [properties] Properties to set + */ + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportAptArtifactsResponse aptArtifacts. + * @member {Array.} aptArtifacts + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse + * @instance + */ + ImportAptArtifactsResponse.prototype.aptArtifacts = $util.emptyArray; + + /** + * 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.ImportAptArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse} ImportAptArtifactsResponse instance + */ + ImportAptArtifactsResponse.create = function create(properties) { + return new ImportAptArtifactsResponse(properties); + }; + + /** + * Encodes the specified ImportAptArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse + * @static + * @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 + */ + ImportAptArtifactsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 ImportAptArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse + * @static + * @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 + */ + ImportAptArtifactsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer. + * @function decode + * @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.ImportAptArtifactsResponse} ImportAptArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + 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); + break; + } + } + return message; + }; + + /** + * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ImportAptArtifactsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportAptArtifactsResponse message. + * @function verify + * @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 + */ + ImportAptArtifactsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 an ImportAptArtifactsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse} ImportAptArtifactsResponse + */ + ImportAptArtifactsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse) + return object; + 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 an ImportAptArtifactsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse} message ImportAptArtifactsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportAptArtifactsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 ImportAptArtifactsResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse + * @instance + * @returns {Object.} JSON object + */ + ImportAptArtifactsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportAptArtifactsResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportAptArtifactsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse"; + }; + + return ImportAptArtifactsResponse; + })(); + + v1beta2.ImportAptArtifactsMetadata = (function() { + + /** + * Properties of an ImportAptArtifactsMetadata. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IImportAptArtifactsMetadata + */ + + /** + * Constructs a new ImportAptArtifactsMetadata. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an ImportAptArtifactsMetadata. + * @implements IImportAptArtifactsMetadata + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata=} [properties] Properties to set + */ + function ImportAptArtifactsMetadata(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 ImportAptArtifactsMetadata instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata instance + */ + ImportAptArtifactsMetadata.create = function create(properties) { + return new ImportAptArtifactsMetadata(properties); + }; + + /** + * Encodes the specified ImportAptArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata + * @static + * @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 + */ + ImportAptArtifactsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * 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.ImportAptArtifactsMetadata + * @static + * @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 + */ + ImportAptArtifactsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer. + * @function decode + * @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.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportAptArtifactsMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ImportAptArtifactsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportAptArtifactsMetadata message. + * @function verify + * @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 + */ + ImportAptArtifactsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an ImportAptArtifactsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata + */ + ImportAptArtifactsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata) + return object; + return new $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata(); + }; + + /** + * Creates a plain object from an ImportAptArtifactsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata} message ImportAptArtifactsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportAptArtifactsMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ImportAptArtifactsMetadata to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata + * @instance + * @returns {Object.} JSON object + */ + ImportAptArtifactsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportAptArtifactsMetadata + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportAptArtifactsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata"; + }; + + return ImportAptArtifactsMetadata; + })(); + + v1beta2.Hash = (function() { + + /** + * Properties of a Hash. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IHash + * @property {google.devtools.artifactregistry.v1beta2.Hash.HashType|null} [type] Hash type + * @property {Uint8Array|null} [value] Hash value + */ + + /** + * Constructs a new Hash. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a Hash. + * @implements IHash + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IHash=} [properties] Properties to set + */ + function Hash(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Hash type. + * @member {google.devtools.artifactregistry.v1beta2.Hash.HashType} type + * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @instance + */ + Hash.prototype.type = 0; + + /** + * Hash value. + * @member {Uint8Array} value + * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @instance + */ + Hash.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Hash instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @static + * @param {google.devtools.artifactregistry.v1beta2.IHash=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.Hash} Hash instance + */ + Hash.create = function create(properties) { + return new Hash(properties); + }; + + /** + * Encodes the specified Hash message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Hash.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @static + * @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 + */ + Hash.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Hash message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Hash.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @static + * @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 + */ + Hash.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Hash message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.Hash} Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Hash.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Hash message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Hash.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Hash message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Hash.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a Hash message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.Hash} Hash + */ + Hash.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Hash) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.Hash(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + 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 >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a Hash message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @static + * @param {google.devtools.artifactregistry.v1beta2.Hash} message Hash + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Hash.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "HASH_TYPE_UNSPECIFIED" : 0; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.devtools.artifactregistry.v1beta2.Hash.HashType[message.type] === undefined ? message.type : $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 Hash to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @instance + * @returns {Object.} JSON object + */ + Hash.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Hash + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Hash.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.Hash"; + }; + + /** + * 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 IFile + * @property {string|null} [name] File name + * @property {number|Long|null} [sizeBytes] File sizeBytes + * @property {Array.|null} [hashes] File hashes + * @property {google.protobuf.ITimestamp|null} [createTime] File createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] File updateTime + * @property {string|null} [owner] File owner + */ + + /** + * Constructs a new File. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a File. + * @implements IFile + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IFile=} [properties] Properties to set + */ + function File(properties) { + this.hashes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * File name. + * @member {string} name + * @memberof google.devtools.artifactregistry.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 + * @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.File + * @static + * @param {google.devtools.artifactregistry.v1beta2.IFile=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.File} File instance + */ + File.create = function create(properties) { + return new File(properties); + }; + + /** + * Encodes the specified File message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.File.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.File + * @static + * @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 + */ + File.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.sizeBytes); + if (message.hashes != null && message.hashes.length) + for (var i = 0; i < message.hashes.length; ++i) + $root.google.devtools.artifactregistry.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 File message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.File.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.File + * @static + * @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 + */ + File.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a File message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.File} File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + File.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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()); + break; + } + case 7: { + message.owner = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a File message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.File + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + File.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a File message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.File + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + File.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high))) + return "sizeBytes: integer|Long expected"; + if (message.hashes != null && message.hasOwnProperty("hashes")) { + if (!Array.isArray(message.hashes)) + return "hashes: array expected"; + for (var i = 0; i < message.hashes.length; ++i) { + var error = $root.google.devtools.artifactregistry.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.owner != null && message.hasOwnProperty("owner")) + if (!$util.isString(message.owner)) + return "owner: string expected"; + return null; + }; + + /** + * Creates a File message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.File + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.File} File + */ + File.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.File) + 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); + } + 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 File message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.File + * @static + * @param {google.devtools.artifactregistry.v1beta2.File} message File + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + File.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.hashes = []; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sizeBytes = options.longs === String ? "0" : 0; + object.createTime = null; + object.updateTime = null; + object.owner = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + if (typeof message.sizeBytes === "number") + object.sizeBytes = options.longs === String ? String(message.sizeBytes) : message.sizeBytes; + else + object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; + if (message.hashes && message.hashes.length) { + object.hashes = []; + for (var j = 0; j < message.hashes.length; ++j) + object.hashes[j] = $root.google.devtools.artifactregistry.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 File to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.File + * @instance + * @returns {Object.} JSON object + */ + File.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for File + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.File + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + File.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.File"; + }; + + return File; + })(); + + v1beta2.ListFilesRequest = (function() { + + /** + * Properties of a ListFilesRequest. + * @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 + */ + + /** + * Constructs a new ListFilesRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a ListFilesRequest. + * @implements IListFilesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest=} [properties] Properties to set + */ + function ListFilesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFilesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @instance + */ + ListFilesRequest.prototype.parent = ""; + + /** + * 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.ListFilesRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ListFilesRequest} ListFilesRequest instance + */ + ListFilesRequest.create = function create(properties) { + return new ListFilesRequest(properties); + }; + + /** + * Encodes the specified ListFilesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @static + * @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 + */ + ListFilesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * 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.ListFilesRequest + * @static + * @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 + */ + ListFilesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFilesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.ListFilesRequest} ListFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFilesRequest.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFilesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ListFilesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFilesRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFilesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListFilesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ListFilesRequest} ListFilesRequest + */ + ListFilesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListFilesRequest) + return object; + 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 ListFilesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.ListFilesRequest} message ListFilesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFilesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + 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 ListFilesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @instance + * @returns {Object.} JSON object + */ + ListFilesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFilesRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListFilesRequest"; + }; + + return ListFilesRequest; + })(); + + v1beta2.ListFilesResponse = (function() { + + /** + * Properties of a ListFilesResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IListFilesResponse + * @property {Array.|null} [files] ListFilesResponse files + * @property {string|null} [nextPageToken] ListFilesResponse nextPageToken + */ + + /** + * Constructs a new ListFilesResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a ListFilesResponse. + * @implements IListFilesResponse + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IListFilesResponse=} [properties] Properties to set + */ + function ListFilesResponse(properties) { + this.files = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFilesResponse files. + * @member {Array.} files + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @instance + */ + ListFilesResponse.prototype.files = $util.emptyArray; + + /** + * 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.ListFilesResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.IListFilesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ListFilesResponse} ListFilesResponse instance + */ + ListFilesResponse.create = function create(properties) { + return new ListFilesResponse(properties); + }; + + /** + * Encodes the specified ListFilesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @static + * @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 + */ + ListFilesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.files != null && message.files.length) + for (var i = 0; i < message.files.length; ++i) + $root.google.devtools.artifactregistry.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 ListFilesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @static + * @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 + */ + ListFilesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFilesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.ListFilesResponse} ListFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFilesResponse.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFilesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ListFilesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFilesResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFilesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.files != null && message.hasOwnProperty("files")) { + if (!Array.isArray(message.files)) + return "files: array expected"; + for (var i = 0; i < message.files.length; ++i) { + var error = $root.google.devtools.artifactregistry.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 ListFilesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ListFilesResponse} ListFilesResponse + */ + ListFilesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListFilesResponse) + 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]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListFilesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.ListFilesResponse} message ListFilesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFilesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.files = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.files && message.files.length) { + object.files = []; + for (var j = 0; j < message.files.length; ++j) + object.files[j] = $root.google.devtools.artifactregistry.v1beta2.File.toObject(message.files[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListFilesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @instance + * @returns {Object.} JSON object + */ + ListFilesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFilesResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListFilesResponse"; + }; + + return ListFilesResponse; + })(); + + v1beta2.GetFileRequest = (function() { + + /** + * Properties of a GetFileRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IGetFileRequest + * @property {string|null} [name] GetFileRequest name + */ + + /** + * Constructs a new GetFileRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a GetFileRequest. + * @implements IGetFileRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IGetFileRequest=} [properties] Properties to set + */ + function GetFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetFileRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @instance + */ + GetFileRequest.prototype.name = ""; + + /** + * 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 + */ + GetFileRequest.create = function create(properties) { + return new GetFileRequest(properties); + }; + + /** + * 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 + */ + GetFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.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 + */ + GetFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.GetFileRequest} GetFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFileRequest.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + GetFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetFileRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.GetFileRequest} GetFileRequest + */ + GetFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetFileRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.GetFileRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.GetFileRequest} message GetFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetFileRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @instance + * @returns {Object.} JSON object + */ + GetFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetFileRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.GetFileRequest"; + }; + + return GetFileRequest; + })(); + + v1beta2.Package = (function() { + + /** + * Properties of a Package. + * @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 + */ + + /** + * Constructs a new Package. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a Package. + * @implements IPackage + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IPackage=} [properties] Properties to set + */ + function Package(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Package name. + * @member {string} name + * @memberof google.devtools.artifactregistry.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. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.Package + * @static + * @param {google.devtools.artifactregistry.v1beta2.IPackage=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.Package} Package instance + */ + Package.create = function create(properties) { + return new Package(properties); + }; + + /** + * Encodes the specified Package message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Package.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.Package + * @static + * @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 + */ + Package.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Package message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Package.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.Package + * @static + * @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 + */ + Package.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Package message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.Package} Package + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Package.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Package message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.Package + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Package.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Package message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.Package + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Package.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a Package message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.Package + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.Package} Package + */ + Package.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Package) + 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; + }; + + /** + * Creates a plain object from a Package message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.Package + * @static + * @param {google.devtools.artifactregistry.v1beta2.Package} message Package + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Package.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this Package to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.Package + * @instance + * @returns {Object.} JSON object + */ + Package.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Package + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.Package + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Package.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.Package"; + }; + + return Package; + })(); + + v1beta2.ListPackagesRequest = (function() { + + /** + * Properties of a ListPackagesRequest. + * @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 + */ + + /** + * Constructs a new ListPackagesRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a ListPackagesRequest. + * @implements IListPackagesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest=} [properties] Properties to set + */ + function ListPackagesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPackagesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @instance + */ + ListPackagesRequest.prototype.parent = ""; + + /** + * ListPackagesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @instance + */ + ListPackagesRequest.prototype.pageSize = 0; + + /** + * 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.ListPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} ListPackagesRequest instance + */ + ListPackagesRequest.create = function create(properties) { + return new ListPackagesRequest(properties); + }; + + /** + * Encodes the specified ListPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @static + * @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 + */ + ListPackagesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @static + * @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 + */ + ListPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPackagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.ListPackagesRequest} ListPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPackagesRequest.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPackagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ListPackagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPackagesRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPackagesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} ListPackagesRequest + */ + ListPackagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListPackagesRequest) + 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); + return message; + }; + + /** + * Creates a plain object from a ListPackagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} message ListPackagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPackagesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListPackagesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @instance + * @returns {Object.} JSON object + */ + ListPackagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPackagesRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPackagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListPackagesRequest"; + }; + + return ListPackagesRequest; + })(); + + v1beta2.ListPackagesResponse = (function() { + + /** + * Properties of a ListPackagesResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IListPackagesResponse + * @property {Array.|null} [packages] ListPackagesResponse packages + * @property {string|null} [nextPageToken] ListPackagesResponse nextPageToken + */ + + /** + * Constructs a new ListPackagesResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a ListPackagesResponse. + * @implements IListPackagesResponse + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IListPackagesResponse=} [properties] Properties to set + */ + function ListPackagesResponse(properties) { + this.packages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPackagesResponse packages. + * @member {Array.} packages + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @instance + */ + ListPackagesResponse.prototype.packages = $util.emptyArray; + + /** + * 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.ListPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.IListPackagesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} ListPackagesResponse instance + */ + ListPackagesResponse.create = function create(properties) { + return new ListPackagesResponse(properties); + }; + + /** + * Encodes the specified ListPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @static + * @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 + */ + ListPackagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.packages != null && message.packages.length) + for (var i = 0; i < message.packages.length; ++i) + $root.google.devtools.artifactregistry.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 ListPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @static + * @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 + */ + ListPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPackagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.ListPackagesResponse} ListPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPackagesResponse.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPackagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ListPackagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPackagesResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPackagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packages != null && message.hasOwnProperty("packages")) { + if (!Array.isArray(message.packages)) + return "packages: array expected"; + for (var i = 0; i < message.packages.length; ++i) { + var error = $root.google.devtools.artifactregistry.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 ListPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} ListPackagesResponse + */ + ListPackagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListPackagesResponse) + 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]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPackagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} message ListPackagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPackagesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.packages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.packages && message.packages.length) { + object.packages = []; + for (var j = 0; j < message.packages.length; ++j) + object.packages[j] = $root.google.devtools.artifactregistry.v1beta2.Package.toObject(message.packages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPackagesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @instance + * @returns {Object.} JSON object + */ + ListPackagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPackagesResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPackagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListPackagesResponse"; + }; + + return ListPackagesResponse; + })(); + + v1beta2.GetPackageRequest = (function() { + + /** + * Properties of a GetPackageRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IGetPackageRequest + * @property {string|null} [name] GetPackageRequest name + */ + + /** + * Constructs a new GetPackageRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a GetPackageRequest. + * @implements IGetPackageRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest=} [properties] Properties to set + */ + function GetPackageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPackageRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @instance + */ + GetPackageRequest.prototype.name = ""; + + /** + * Creates a new GetPackageRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.GetPackageRequest} GetPackageRequest instance + */ + GetPackageRequest.create = function create(properties) { + return new GetPackageRequest(properties); + }; + + /** + * Encodes the specified GetPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetPackageRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @static + * @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 + */ + GetPackageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetPackageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @static + * @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 + */ + GetPackageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPackageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.GetPackageRequest} GetPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPackageRequest.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPackageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + GetPackageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPackageRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPackageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetPackageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.GetPackageRequest} GetPackageRequest + */ + GetPackageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetPackageRequest) + return object; + 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 GetPackageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.GetPackageRequest} message GetPackageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPackageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetPackageRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @instance + * @returns {Object.} JSON object + */ + GetPackageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPackageRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPackageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.GetPackageRequest"; + }; + + return GetPackageRequest; + })(); + + v1beta2.DeletePackageRequest = (function() { + + /** + * Properties of a DeletePackageRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IDeletePackageRequest + * @property {string|null} [name] DeletePackageRequest name + */ + + /** + * Constructs a new DeletePackageRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a DeletePackageRequest. + * @implements IDeletePackageRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest=} [properties] Properties to set + */ + function DeletePackageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeletePackageRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @instance + */ + DeletePackageRequest.prototype.name = ""; + + /** + * Creates a new DeletePackageRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} DeletePackageRequest instance + */ + DeletePackageRequest.create = function create(properties) { + return new DeletePackageRequest(properties); + }; + + /** + * Encodes the specified DeletePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeletePackageRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @static + * @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 + */ + DeletePackageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeletePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeletePackageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @static + * @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 + */ + DeletePackageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePackageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.DeletePackageRequest} DeletePackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePackageRequest.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeletePackageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + DeletePackageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePackageRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePackageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeletePackageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} DeletePackageRequest + */ + DeletePackageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.DeletePackageRequest) + return object; + 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 a DeletePackageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} message DeletePackageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePackageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeletePackageRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePackageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeletePackageRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePackageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.DeletePackageRequest"; + }; + + return DeletePackageRequest; + })(); + + v1beta2.Repository = (function() { + + /** + * Properties of a Repository. + * @memberof google.devtools.artifactregistry.v1beta2 + * @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 Repository. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a Repository. + * @implements IRepository + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IRepository=} [properties] Properties to set + */ + function Repository(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Repository mavenConfig. + * @member {google.devtools.artifactregistry.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.Repository + * @instance + */ + Repository.prototype.name = ""; + + /** + * Repository format. + * @member {google.devtools.artifactregistry.v1beta2.Repository.Format} format + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @instance + */ + Repository.prototype.format = 0; + + /** + * Repository description. + * @member {string} description + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @instance + */ + 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 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) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @function decode + * @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.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decode = function decode(reader, length, error) { + 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; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + } + return message; + }; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Repository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Repository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Repository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mavenConfig != null && message.hasOwnProperty("mavenConfig")) { + properties.formatConfig = 1; + { + var error = $root.google.devtools.artifactregistry.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 Repository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.Repository} Repository + */ + Repository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Repository) + return object; + 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) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + 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 Repository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @static + * @param {google.devtools.artifactregistry.v1beta2.Repository} message Repository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Repository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.kmsKeyName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.devtools.artifactregistry.v1beta2.Repository.Format[message.format] === undefined ? message.format : $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 Repository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @instance + * @returns {Object.} JSON object + */ + Repository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Repository + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Repository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.Repository"; + }; + + 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]]; + } + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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) { + default: + if (typeof object.versionPolicy === "number") { + message.versionPolicy = object.versionPolicy; + break; + } + break; + 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] === undefined ? message.versionPolicy : $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); + }; + + /** + * Gets the default type url for MavenRepositoryConfig + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MavenRepositoryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig"; + }; + + /** + * 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; + })(); + + /** + * 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 + */ + Repository.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "DOCKER"] = 1; + values[valuesById[2] = "MAVEN"] = 2; + values[valuesById[3] = "NPM"] = 3; + values[valuesById[5] = "APT"] = 5; + values[valuesById[6] = "YUM"] = 6; + values[valuesById[8] = "PYTHON"] = 8; + return values; + })(); + + return Repository; + })(); + + v1beta2.ListRepositoriesRequest = (function() { + + /** + * 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 + */ + + /** + * 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 + */ + function ListRepositoriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.parent = ""; + + /** + * ListRepositoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageSize = 0; + + /** + * ListRepositoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageToken = ""; + + /** + * 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); + }; + + /** + * 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 + */ + ListRepositoriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.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(); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.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()); + }; + + /** + * 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 + */ + ListRepositoriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.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; + }; + + /** + * 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; + }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRepositoriesRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRepositoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest"; + }; + + return ListRepositoriesRequest; + })(); + + v1beta2.ListRepositoriesResponse = (function() { + + /** + * Properties of a ListRepositoriesResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IListRepositoriesResponse + * @property {Array.|null} [repositories] ListRepositoriesResponse repositories + * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken + */ + + /** + * 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 + */ + function ListRepositoriesResponse(properties) { + this.repositories = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesResponse repositories. + * @member {Array.} repositories + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.repositories = $util.emptyArray; + + /** + * ListRepositoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.nextPageToken = ""; + + /** + * 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 + */ + ListRepositoriesResponse.create = function create(properties) { + return new ListRepositoriesResponse(properties); + }; + + /** + * 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; + }; + + /** + * 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(); + }; + + /** + * 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 + */ + ListRepositoriesResponse.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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()); + }; + + /** + * 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; + }; + + /** + * 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 + */ + 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; + }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRepositoriesResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRepositoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse"; + }; + + return ListRepositoriesResponse; + })(); + + v1beta2.GetRepositoryRequest = (function() { + + /** + * Properties of a GetRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IGetRepositoryRequest + * @property {string|null} [name] GetRepositoryRequest name + */ + + /** + * 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 + */ + function GetRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetRepositoryRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @instance + */ + GetRepositoryRequest.prototype.name = ""; + + /** + * 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); + }; + + /** + * 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 + */ + GetRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.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(); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.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 + */ + GetRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRepositoryRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.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; + }; + + /** + * 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; + }; + + /** + * 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 + */ + GetRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + GetRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetRepositoryRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.GetRepositoryRequest"; + }; + + return GetRepositoryRequest; + })(); + + v1beta2.CreateRepositoryRequest = (function() { + + /** + * 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 + */ + + /** + * 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 + */ + function CreateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateRepositoryRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.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 + * @instance + */ + CreateRepositoryRequest.prototype.repository = null; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} CreateRepositoryRequest instance + */ + CreateRepositoryRequest.create = function create(properties) { + return new CreateRepositoryRequest(properties); + }; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @static + * @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 + */ + 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 CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @static + * @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 + */ + CreateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + } + return message; + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + CreateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateRepositoryRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + if (!$util.isString(message.repositoryId)) + return "repositoryId: string expected"; + if (message.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.devtools.artifactregistry.v1beta2.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + return null; + }; + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} CreateRepositoryRequest + */ + CreateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest) + 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); + } + return message; + }; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} message CreateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.repositoryId = ""; + object.repository = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + object.repositoryId = message.repositoryId; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.devtools.artifactregistry.v1beta2.Repository.toObject(message.repository, options); + return object; + }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + CreateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateRepositoryRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest"; + }; + + return CreateRepositoryRequest; + })(); + + v1beta2.UpdateRepositoryRequest = (function() { + + /** + * Properties of an UpdateRepositoryRequest. + * @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 + */ + + /** + * Constructs a new UpdateRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an UpdateRepositoryRequest. + * @implements IUpdateRepositoryRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest=} [properties] Properties to set + */ + function UpdateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateRepositoryRequest repository. + * @member {google.devtools.artifactregistry.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 + * @instance + */ + UpdateRepositoryRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} UpdateRepositoryRequest instance + */ + UpdateRepositoryRequest.create = function create(properties) { + return new UpdateRepositoryRequest(properties); + }; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @static + * @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 + */ + UpdateRepositoryRequest.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(); + return writer; + }; + + /** + * 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.UpdateRepositoryRequest + * @static + * @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 + */ + UpdateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + UpdateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateRepositoryRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.devtools.artifactregistry.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 an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} UpdateRepositoryRequest + */ + UpdateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest) + 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); + } + return message; + }; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} message UpdateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.repository = null; + object.updateMask = null; + } + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.devtools.artifactregistry.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 UpdateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateRepositoryRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest"; + }; + + return UpdateRepositoryRequest; + })(); + + v1beta2.DeleteRepositoryRequest = (function() { + + /** + * Properties of a DeleteRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IDeleteRepositoryRequest + * @property {string|null} [name] DeleteRepositoryRequest name + */ + + /** + * Constructs a new DeleteRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a DeleteRepositoryRequest. + * @implements IDeleteRepositoryRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest=} [properties] Properties to set + */ + function DeleteRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteRepositoryRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.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 + */ + DeleteRepositoryRequest.create = function create(properties) { + return new DeleteRepositoryRequest(properties); + }; + + /** + * 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 + */ + DeleteRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @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 + */ + DeleteRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + DeleteRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteRepositoryRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest} DeleteRepositoryRequest + */ + DeleteRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest) + return object; + 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 DeleteRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest} message DeleteRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteRepositoryRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest"; + }; + + return DeleteRepositoryRequest; + })(); + + v1beta2.ArtifactRegistry = (function() { + + /** + * 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 + */ + function ArtifactRegistry(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ArtifactRegistry.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ArtifactRegistry; + + /** + * Creates new ArtifactRegistry service using the specified rpc implementation. + * @function create + * @memberof google.devtools.artifactregistry.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); + }; + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + + /** + * 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 + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.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 + */ + 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" }); + + /** + * 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 + */ + + /** + * 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 + */ + 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" }); + + /** + * 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.OperationMetadata + * @static + * @param {google.devtools.artifactregistry.v1beta2.IOperationMetadata=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @static + * @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 + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @static + * @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 + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.OperationMetadata) + return object; + return new $root.google.devtools.artifactregistry.v1beta2.OperationMetadata(); + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @static + * @param {google.devtools.artifactregistry.v1beta2.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1beta2.ProjectSettings = (function() { + + /** + * Properties of a ProjectSettings. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IProjectSettings + * @property {string|null} [name] ProjectSettings name + * @property {google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState|null} [legacyRedirectionState] ProjectSettings legacyRedirectionState + */ + + /** + * Constructs a new ProjectSettings. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a ProjectSettings. + * @implements IProjectSettings + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IProjectSettings=} [properties] Properties to set + */ + function ProjectSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProjectSettings name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings + * @instance + */ + ProjectSettings.prototype.name = ""; + + /** + * ProjectSettings legacyRedirectionState. + * @member {google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState} legacyRedirectionState + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings + * @instance + */ + ProjectSettings.prototype.legacyRedirectionState = 0; + + /** + * Creates a new ProjectSettings instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings + * @static + * @param {google.devtools.artifactregistry.v1beta2.IProjectSettings=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ProjectSettings} ProjectSettings instance + */ + ProjectSettings.create = function create(properties) { + return new ProjectSettings(properties); + }; + + /** + * Encodes the specified ProjectSettings message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ProjectSettings.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings + * @static + * @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 + */ + ProjectSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.legacyRedirectionState != null && Object.hasOwnProperty.call(message, "legacyRedirectionState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.legacyRedirectionState); + return writer; + }; + + /** + * Encodes the specified ProjectSettings message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ProjectSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings + * @static + * @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 + */ + ProjectSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProjectSettings message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.ProjectSettings} ProjectSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProjectSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.legacyRedirectionState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProjectSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ProjectSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProjectSettings message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProjectSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.legacyRedirectionState != null && message.hasOwnProperty("legacyRedirectionState")) + switch (message.legacyRedirectionState) { + default: + return "legacyRedirectionState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a ProjectSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ProjectSettings} ProjectSettings + */ + ProjectSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ProjectSettings) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.ProjectSettings(); + if (object.name != null) + message.name = String(object.name); + switch (object.legacyRedirectionState) { + default: + if (typeof object.legacyRedirectionState === "number") { + message.legacyRedirectionState = object.legacyRedirectionState; + break; + } + break; + case "REDIRECTION_STATE_UNSPECIFIED": + case 0: + message.legacyRedirectionState = 0; + break; + case "REDIRECTION_FROM_GCR_IO_DISABLED": + case 1: + message.legacyRedirectionState = 1; + break; + case "REDIRECTION_FROM_GCR_IO_ENABLED": + case 2: + message.legacyRedirectionState = 2; + break; + case "REDIRECTION_FROM_GCR_IO_FINALIZED": + case 3: + message.legacyRedirectionState = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a ProjectSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings + * @static + * @param {google.devtools.artifactregistry.v1beta2.ProjectSettings} message ProjectSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProjectSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.legacyRedirectionState = options.enums === String ? "REDIRECTION_STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.legacyRedirectionState != null && message.hasOwnProperty("legacyRedirectionState")) + object.legacyRedirectionState = options.enums === String ? $root.google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState[message.legacyRedirectionState] === undefined ? message.legacyRedirectionState : $root.google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState[message.legacyRedirectionState] : message.legacyRedirectionState; + return object; + }; + + /** + * Converts this ProjectSettings to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings + * @instance + * @returns {Object.} JSON object + */ + ProjectSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProjectSettings + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProjectSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ProjectSettings"; + }; + + /** + * 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.GetProjectSettingsRequest = (function() { + + /** + * Properties of a GetProjectSettingsRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IGetProjectSettingsRequest + * @property {string|null} [name] GetProjectSettingsRequest name + */ + + /** + * Constructs a new GetProjectSettingsRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a GetProjectSettingsRequest. + * @implements IGetProjectSettingsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest=} [properties] Properties to set + */ + function GetProjectSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetProjectSettingsRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest + * @instance + */ + GetProjectSettingsRequest.prototype.name = ""; + + /** + * Creates a new GetProjectSettingsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest} GetProjectSettingsRequest instance + */ + GetProjectSettingsRequest.create = function create(properties) { + return new GetProjectSettingsRequest(properties); + }; + + /** + * Encodes the specified GetProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest + * @static + * @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 + */ + GetProjectSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest + * @static + * @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 + */ + GetProjectSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetProjectSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.GetProjectSettingsRequest} GetProjectSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProjectSettingsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetProjectSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + GetProjectSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetProjectSettingsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetProjectSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest} GetProjectSettingsRequest + */ + GetProjectSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest) + return object; + 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 GetProjectSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest} message GetProjectSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetProjectSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetProjectSettingsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetProjectSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetProjectSettingsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetProjectSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest"; + }; + + return GetProjectSettingsRequest; + })(); + + v1beta2.UpdateProjectSettingsRequest = (function() { + + /** + * Properties of an UpdateProjectSettingsRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IUpdateProjectSettingsRequest + * @property {google.devtools.artifactregistry.v1beta2.IProjectSettings|null} [projectSettings] UpdateProjectSettingsRequest projectSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateProjectSettingsRequest updateMask + */ + + /** + * Constructs a new UpdateProjectSettingsRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an UpdateProjectSettingsRequest. + * @implements IUpdateProjectSettingsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest=} [properties] Properties to set + */ + function UpdateProjectSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateProjectSettingsRequest projectSettings. + * @member {google.devtools.artifactregistry.v1beta2.IProjectSettings|null|undefined} projectSettings + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest + * @instance + */ + UpdateProjectSettingsRequest.prototype.projectSettings = null; + + /** + * UpdateProjectSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest + * @instance + */ + UpdateProjectSettingsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateProjectSettingsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest instance + */ + UpdateProjectSettingsRequest.create = function create(properties) { + return new UpdateProjectSettingsRequest(properties); + }; + + /** + * Encodes the specified UpdateProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest + * @static + * @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 + */ + UpdateProjectSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 UpdateProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest + * @static + * @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 + */ + UpdateProjectSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateProjectSettingsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + 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); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + UpdateProjectSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateProjectSettingsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateProjectSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectSettings != null && message.hasOwnProperty("projectSettings")) { + var error = $root.google.devtools.artifactregistry.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 an UpdateProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest + */ + UpdateProjectSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest) + return object; + 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 an UpdateProjectSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest} message UpdateProjectSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateProjectSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectSettings = null; + object.updateMask = null; + } + if (message.projectSettings != null && message.hasOwnProperty("projectSettings")) + object.projectSettings = $root.google.devtools.artifactregistry.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 UpdateProjectSettingsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateProjectSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateProjectSettingsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateProjectSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest"; + }; + + return UpdateProjectSettingsRequest; + })(); + + v1beta2.Tag = (function() { + + /** + * Properties of a Tag. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface ITag + * @property {string|null} [name] Tag name + * @property {string|null} [version] Tag version + */ + + /** + * Constructs a new Tag. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a Tag. + * @implements ITag + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.ITag=} [properties] Properties to set + */ + function Tag(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Tag name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @instance + */ + Tag.prototype.name = ""; + + /** + * Tag version. + * @member {string} version + * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @instance + */ + Tag.prototype.version = ""; + + /** + * Creates a new Tag instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @static + * @param {google.devtools.artifactregistry.v1beta2.ITag=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.Tag} Tag instance + */ + Tag.create = function create(properties) { + return new Tag(properties); + }; + + /** + * Encodes the specified Tag message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Tag.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @static + * @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 + */ + Tag.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + return writer; + }; + + /** + * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Tag.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @static + * @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 + */ + Tag.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tag message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.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.Tag} Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tag.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Tag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Tag.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tag message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tag.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a Tag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.Tag} Tag + */ + Tag.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Tag) + 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); + return message; + }; + + /** + * Creates a plain object from a Tag message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @static + * @param {google.devtools.artifactregistry.v1beta2.Tag} message Tag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tag.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.version = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this Tag to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @instance + * @returns {Object.} JSON object + */ + Tag.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Tag + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Tag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.Tag"; + }; + + return Tag; + })(); + + v1beta2.ListTagsRequest = (function() { + + /** + * 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 + */ + + /** + * 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]]; + } + + /** + * 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 + * @instance + */ + ListTagsRequest.prototype.pageToken = ""; + + /** + * 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); + }; + + /** + * 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; + }; + + /** + * 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(); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.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()); + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * Gets the default type url for ListTagsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTagsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListTagsRequest"; + }; + + return ListTagsRequest; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for ListTagsResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTagsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListTagsResponse"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for GetTagRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.GetTagRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.GetTagRequest"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for CreateTagRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.CreateTagRequest"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for UpdateTagRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.UpdateTagRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.UpdateTagRequest"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for DeleteTagRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.DeleteTagRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.DeleteTagRequest"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for Version + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.Version + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Version.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.Version"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + 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] === undefined ? message.view : $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); + }; + + /** + * Gets the default type url for ListVersionsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListVersionsRequest"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for ListVersionsResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListVersionsResponse"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + 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] === undefined ? message.view : $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); + }; + + /** + * Gets the default type url for GetVersionRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.GetVersionRequest"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for DeleteVersionRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.DeleteVersionRequest"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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) { + default: + if (typeof object.packageType === "number") { + message.packageType = object.packageType; + break; + } + break; + 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] === undefined ? message.packageType : $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); + }; + + /** + * Gets the default type url for YumArtifact + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.YumArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + YumArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.YumArtifact"; + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for ImportYumArtifactsGcsSource + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportYumArtifactsGcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for ImportYumArtifactsRequest + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportYumArtifactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for ImportYumArtifactsErrorInfo + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportYumArtifactsErrorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for ImportYumArtifactsResponse + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportYumArtifactsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for ImportYumArtifactsMetadata + * @function getTypeUrl + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportYumArtifactsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata"; + }; + + 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 + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.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")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(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]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.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.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + 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]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + 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]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(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]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + 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]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(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]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + 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]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + 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]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + 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.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(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]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(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]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(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]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(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]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + 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]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + 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.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + 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.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(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]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(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]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + 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]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(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]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + 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]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + 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]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.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["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.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["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.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.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.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.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(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]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(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]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + 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]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + 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 ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(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]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(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]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.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.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.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.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(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]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.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.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.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.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.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.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.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.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(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]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(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]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.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.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.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.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + 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]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.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.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.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.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(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]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.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.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.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.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + 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]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + 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.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(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]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + 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.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + 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]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + 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.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(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]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(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]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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 OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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 OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(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]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + 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 EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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 EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @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 features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + 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; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + 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); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @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 + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(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]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * 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"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + 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.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @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.ServiceOptions} ServiceOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + 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; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @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 + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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; + } + } + 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.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + 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.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"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @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 MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * 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.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + 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(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @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.MethodOptions} MethodOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + 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); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @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 + */ + 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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; + } + } + 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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]); + } + } + 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 MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + 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] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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.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 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); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * 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.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @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 + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + 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]]; + } + + /** + * 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 + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.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); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @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.UninterpretedOption} UninterpretedOption + * @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, error) { + 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(); + if (tag === error) + break; + 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(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @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 + */ + UninterpretedOption.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 (error) + return "name." + 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. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + 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]); + } + } + 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 >= 0) + 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. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.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); + } + 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. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + 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, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(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]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + 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]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(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]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + 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]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.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(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @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.SourceCodeInfo} SourceCodeInfo + * @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, error) { + if (!(reader instanceof $Reader)) + 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(); + if (tag === error) + break; + 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); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @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 + */ + SourceCodeInfo.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 (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + 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]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.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); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (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 + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location 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 + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * 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.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @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 + */ + Location.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.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 Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @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 + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @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.SourceCodeInfo.Location} Location + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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: { + 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; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @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 + */ + Location.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"; + } + 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 Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + 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 Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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.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]; + } + return object; + }; + + /** + * 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); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + 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]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.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(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @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.GeneratedCodeInfo} GeneratedCodeInfo + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @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 + */ + GeneratedCodeInfo.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; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @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]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.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); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + 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 + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * 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; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * 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); + }; + + /** + * 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); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * 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(); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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()); + }; + + /** + * 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"; + } + 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"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * 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; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * 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; + object.semantic = options.enums === String ? "NONE" : 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; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + 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); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + 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]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + protobuf.Struct = (function() { + + /** + * Properties of a Struct. + * @memberof google.protobuf + * @interface IStruct + * @property {Object.|null} [fields] Struct fields + */ + + /** + * Constructs a new Struct. + * @memberof google.protobuf + * @classdesc Represents a Struct. + * @implements IStruct + * @constructor + * @param {google.protobuf.IStruct=} [properties] Properties to set + */ + function Struct(properties) { + this.fields = {}; + 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]]; + } + + /** + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyObject; + + /** + * Creates a new Struct instance using the specified properties. + * @function create + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance + */ + Struct.create = function create(properties) { + return new Struct(properties); + }; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @function decode + * @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.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fields[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Struct.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Struct message. + * @function verify + * @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 + */ + Struct.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Struct + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Struct} Struct + */ + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) + return object; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.Struct} message Struct + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Struct.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + } + return object; + }; + + /** + * Converts this Struct to JSON. + * @function toJSON + * @memberof google.protobuf.Struct + * @instance + * @returns {Object.} JSON object + */ + Struct.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Struct + * @function getTypeUrl + * @memberof google.protobuf.Struct + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Struct"; + }; + + return Struct; + })(); + + protobuf.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.protobuf + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue + */ + + /** + * Constructs a new Value. + * @memberof google.protobuf + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.protobuf.IValue=} [properties] Properties to set + */ + function Value(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]]; + } + + /** + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = null; + + /** + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = null; + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = null; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @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.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.nullValue = reader.int32(); + break; + } + case 2: { + message.numberValue = reader.double(); + break; + } + case 3: { + message.stringValue = reader.string(); + break; + } + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @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 + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) + return object; + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; + 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 Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.protobuf.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.protobuf.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Value"; + }; + + return Value; + })(); + + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {number} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { + + /** + * Properties of a ListValue. + * @memberof google.protobuf + * @interface IListValue + * @property {Array.|null} [values] ListValue values + */ + + /** + * Constructs a new ListValue. + * @memberof google.protobuf + * @classdesc Represents a ListValue. + * @implements IListValue + * @constructor + * @param {google.protobuf.IListValue=} [properties] Properties to set + */ + function ListValue(properties) { + this.values = []; + 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]]; + } + + /** + * 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.ListValue + * @static + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance + */ + ListValue.create = function create(properties) { + return new ListValue(properties); + }; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} 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 ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @function decode + * @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.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + } + return message; + }; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ListValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListValue message. + * @function verify + * @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 + */ + 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 a ListValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ListValue} ListValue + */ + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) + return object; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.ListValue} message ListValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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 ListValue to JSON. + * @function toJSON + * @memberof google.protobuf.ListValue + * @instance + * @returns {Object.} JSON object + */ + ListValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListValue + * @function getTypeUrl + * @memberof google.protobuf.ListValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ListValue"; + }; + + return ListValue; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(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 Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @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.Empty} Empty + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @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 + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + return protobuf; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Expr = (function() { + + /** + * Properties of an Expr. + * @memberof google.type + * @interface IExpr + * @property {string|null} [expression] Expr expression + * @property {string|null} [title] Expr title + * @property {string|null} [description] Expr description + * @property {string|null} [location] Expr location + */ + + /** + * Constructs a new Expr. + * @memberof google.type + * @classdesc Represents an Expr. + * @implements IExpr + * @constructor + * @param {google.type.IExpr=} [properties] Properties to set + */ + function Expr(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]]; + } + + /** + * Expr expression. + * @member {string} expression + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.expression = ""; + + /** + * Expr title. + * @member {string} title + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.title = ""; + + /** + * Expr description. + * @member {string} description + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.description = ""; + + /** + * Expr location. + * @member {string} location + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.location = ""; + + /** + * Creates a new Expr instance using the specified properties. + * @function create + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr=} [properties] Properties to set + * @returns {google.type.Expr} Expr instance + */ + Expr.create = function create(properties) { + return new Expr(properties); + }; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encode + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); + return writer; + }; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @function decode + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.expression = reader.string(); + break; + } + case 2: { + message.title = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Expr message. + * @function verify + * @memberof google.type.Expr + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Expr.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates an Expr message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Expr + * @static + * @param {Object.} object Plain object + * @returns {google.type.Expr} Expr + */ + Expr.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Expr) + return object; + var message = new $root.google.type.Expr(); + if (object.expression != null) + message.expression = String(object.expression); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Expr + * @static + * @param {google.type.Expr} message Expr + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Expr.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.expression = ""; + object.title = ""; + object.description = ""; + object.location = ""; + } + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this Expr to JSON. + * @function toJSON + * @memberof google.type.Expr + * @instance + * @returns {Object.} JSON object + */ + Expr.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Expr + * @function getTypeUrl + * @memberof google.type.Expr + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Expr"; + }; + + return Expr; + })(); + + return type; + })(); + + google.iam = (function() { + + /** + * Namespace iam. + * @memberof google + * @namespace + */ + var iam = {}; + + iam.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.iam + * @namespace + */ + var v1 = {}; + + v1.IAMPolicy = (function() { + + /** + * Constructs a new IAMPolicy service. + * @memberof google.iam.v1 + * @classdesc Represents a IAMPolicy + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; + + /** + * Creates new IAMPolicy service using the specified rpc implementation. + * @function create + * @memberof google.iam.v1.IAMPolicy + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. + */ + IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. + * @memberof google.iam.v1.IAMPolicy + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return IAMPolicy; + })(); + + v1.SetIamPolicyRequest = (function() { + + /** + * Properties of a SetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface ISetIamPolicyRequest + * @property {string|null} [resource] SetIamPolicyRequest resource + * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy + * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask + */ + + /** + * Constructs a new SetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a SetIamPolicyRequest. + * @implements ISetIamPolicyRequest + * @constructor + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + */ + function SetIamPolicyRequest(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]]; + } + + /** + * SetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.resource = ""; + + /** + * SetIamPolicyRequest policy. + * @member {google.iam.v1.IPolicy|null|undefined} policy + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.policy = null; + + /** + * SetIamPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.updateMask = null; + + /** + * Creates a new SetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance + */ + SetIamPolicyRequest.create = function create(properties) { + return new SetIamPolicyRequest(properties); + }; + + /** + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.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 SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.policy != null && message.hasOwnProperty("policy")) { + var error = $root.google.iam.v1.Policy.verify(message.policy); + if (error) + return "policy." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + */ + SetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.SetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.policy != null) { + if (typeof object.policy !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); + message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.policy = null; + object.updateMask = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this SetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + SetIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.SetIamPolicyRequest"; + }; + + return SetIamPolicyRequest; + })(); + + v1.GetIamPolicyRequest = (function() { + + /** + * Properties of a GetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface IGetIamPolicyRequest + * @property {string|null} [resource] GetIamPolicyRequest resource + * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options + */ + + /** + * Constructs a new GetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a GetIamPolicyRequest. + * @implements IGetIamPolicyRequest + * @constructor + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + */ + function GetIamPolicyRequest(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]]; + } + + /** + * GetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.resource = ""; + + /** + * GetIamPolicyRequest options. + * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.options = null; + + /** + * Creates a new GetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance + */ + GetIamPolicyRequest.create = function create(properties) { + return new GetIamPolicyRequest(properties); + }; + + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + */ + GetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.GetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); + message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.options = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this GetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + GetIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetIamPolicyRequest"; + }; + + return GetIamPolicyRequest; + })(); + + v1.TestIamPermissionsRequest = (function() { + + /** + * Properties of a TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsRequest + * @property {string|null} [resource] TestIamPermissionsRequest resource + * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions + */ + + /** + * Constructs a new TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsRequest. + * @implements ITestIamPermissionsRequest + * @constructor + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + */ + function TestIamPermissionsRequest(properties) { + this.permissions = []; + 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]]; + } + + /** + * TestIamPermissionsRequest resource. + * @member {string} resource + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.resource = ""; + + /** + * TestIamPermissionsRequest permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; + + /** + * Creates a new TestIamPermissionsRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance + */ + TestIamPermissionsRequest.create = function create(properties) { + return new TestIamPermissionsRequest(properties); + }; + + /** + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); + return writer; + }; + + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestIamPermissionsRequest message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; + + /** + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + */ + TestIamPermissionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; + + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (options.defaults) + object.resource = ""; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; + + /** + * Converts this TestIamPermissionsRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TestIamPermissionsRequest + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsRequest"; + }; + + return TestIamPermissionsRequest; + })(); + + v1.TestIamPermissionsResponse = (function() { + + /** + * Properties of a TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsResponse + * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions + */ + + /** + * Constructs a new TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsResponse. + * @implements ITestIamPermissionsResponse + * @constructor + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + */ + function TestIamPermissionsResponse(properties) { + this.permissions = []; + 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]]; + } + + /** + * TestIamPermissionsResponse permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + */ + TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; + + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance + */ + TestIamPermissionsResponse.create = function create(properties) { + return new TestIamPermissionsResponse(properties); + }; + + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); + return writer; + }; + + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestIamPermissionsResponse message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; + + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + */ + TestIamPermissionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsResponse(); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; + + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; + + /** + * Converts this TestIamPermissionsResponse to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TestIamPermissionsResponse + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsResponse"; + }; + + return TestIamPermissionsResponse; + })(); + + v1.GetPolicyOptions = (function() { + + /** + * Properties of a GetPolicyOptions. + * @memberof google.iam.v1 + * @interface IGetPolicyOptions + * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion + */ + + /** + * Constructs a new GetPolicyOptions. + * @memberof google.iam.v1 + * @classdesc Represents a GetPolicyOptions. + * @implements IGetPolicyOptions + * @constructor + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + */ + function GetPolicyOptions(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]]; + } + + /** + * GetPolicyOptions requestedPolicyVersion. + * @member {number} requestedPolicyVersion + * @memberof google.iam.v1.GetPolicyOptions + * @instance + */ + GetPolicyOptions.prototype.requestedPolicyVersion = 0; + + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance + */ + GetPolicyOptions.create = function create(properties) { + return new GetPolicyOptions(properties); + }; + + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); + return writer; + }; + + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.requestedPolicyVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPolicyOptions message. + * @function verify + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPolicyOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + if (!$util.isInteger(message.requestedPolicyVersion)) + return "requestedPolicyVersion: integer expected"; + return null; + }; + + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + */ + GetPolicyOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetPolicyOptions) + return object; + var message = new $root.google.iam.v1.GetPolicyOptions(); + if (object.requestedPolicyVersion != null) + message.requestedPolicyVersion = object.requestedPolicyVersion | 0; + return message; + }; + + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPolicyOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.requestedPolicyVersion = 0; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + object.requestedPolicyVersion = message.requestedPolicyVersion; + return object; + }; + + /** + * Converts this GetPolicyOptions to JSON. + * @function toJSON + * @memberof google.iam.v1.GetPolicyOptions + * @instance + * @returns {Object.} JSON object + */ + GetPolicyOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPolicyOptions + * @function getTypeUrl + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPolicyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetPolicyOptions"; + }; + + return GetPolicyOptions; + })(); + + v1.Policy = (function() { + + /** + * Properties of a Policy. + * @memberof google.iam.v1 + * @interface IPolicy + * @property {number|null} [version] Policy version + * @property {Array.|null} [bindings] Policy bindings + * @property {Array.|null} [auditConfigs] Policy auditConfigs + * @property {Uint8Array|null} [etag] Policy etag + */ + + /** + * Constructs a new Policy. + * @memberof google.iam.v1 + * @classdesc Represents a Policy. + * @implements IPolicy + * @constructor + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + */ + function Policy(properties) { + this.bindings = []; + this.auditConfigs = []; + 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]]; + } + + /** + * Policy version. + * @member {number} version + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.version = 0; + + /** + * Policy bindings. + * @member {Array.} bindings + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.bindings = $util.emptyArray; + + /** + * Policy auditConfigs. + * @member {Array.} auditConfigs + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.auditConfigs = $util.emptyArray; + + /** + * Policy etag. + * @member {Uint8Array} etag + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.etag = $util.newBuffer([]); + + /** + * Creates a new Policy instance using the specified properties. + * @function create + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + * @returns {google.iam.v1.Policy} Policy instance + */ + Policy.create = function create(properties) { + return new Policy(properties); + }; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); + if (message.bindings != null && message.bindings.length) + for (var i = 0; i < message.bindings.length; ++i) + $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.auditConfigs != null && message.auditConfigs.length) + for (var i = 0; i < message.auditConfigs.length; ++i) + $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.int32(); + break; + } + case 4: { + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.auditConfigs && message.auditConfigs.length)) + message.auditConfigs = []; + message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); + break; + } + case 3: { + message.etag = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Policy message. + * @function verify + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Policy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (message.bindings != null && message.hasOwnProperty("bindings")) { + if (!Array.isArray(message.bindings)) + return "bindings: array expected"; + for (var i = 0; i < message.bindings.length; ++i) { + var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); + if (error) + return "bindings." + error; + } + } + if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { + if (!Array.isArray(message.auditConfigs)) + return "auditConfigs: array expected"; + for (var i = 0; i < message.auditConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); + if (error) + return "auditConfigs." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) + return "etag: buffer expected"; + return null; + }; + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Policy} Policy + */ + Policy.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Policy) + return object; + var message = new $root.google.iam.v1.Policy(); + if (object.version != null) + message.version = object.version | 0; + if (object.bindings) { + if (!Array.isArray(object.bindings)) + throw TypeError(".google.iam.v1.Policy.bindings: array expected"); + message.bindings = []; + for (var i = 0; i < object.bindings.length; ++i) { + if (typeof object.bindings[i] !== "object") + throw TypeError(".google.iam.v1.Policy.bindings: object expected"); + message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); + } + } + if (object.auditConfigs) { + if (!Array.isArray(object.auditConfigs)) + throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); + message.auditConfigs = []; + for (var i = 0; i < object.auditConfigs.length; ++i) { + if (typeof object.auditConfigs[i] !== "object") + throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); + message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); + } + } + if (object.etag != null) + if (typeof object.etag === "string") + $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); + else if (object.etag.length >= 0) + message.etag = object.etag; + return message; + }; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.Policy} message Policy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Policy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindings = []; + object.auditConfigs = []; + } + if (options.defaults) { + object.version = 0; + if (options.bytes === String) + object.etag = ""; + else { + object.etag = []; + if (options.bytes !== Array) + object.etag = $util.newBuffer(object.etag); + } + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; + if (message.bindings && message.bindings.length) { + object.bindings = []; + for (var j = 0; j < message.bindings.length; ++j) + object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); + } + if (message.auditConfigs && message.auditConfigs.length) { + object.auditConfigs = []; + for (var j = 0; j < message.auditConfigs.length; ++j) + object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); + } + return object; + }; + + /** + * Converts this Policy to JSON. + * @function toJSON + * @memberof google.iam.v1.Policy + * @instance + * @returns {Object.} JSON object + */ + Policy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Policy + * @function getTypeUrl + * @memberof google.iam.v1.Policy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Policy"; + }; + + return Policy; + })(); + + v1.Binding = (function() { + + /** + * Properties of a Binding. + * @memberof google.iam.v1 + * @interface IBinding + * @property {string|null} [role] Binding role + * @property {Array.|null} [members] Binding members + * @property {google.type.IExpr|null} [condition] Binding condition + */ + + /** + * Constructs a new Binding. + * @memberof google.iam.v1 + * @classdesc Represents a Binding. + * @implements IBinding + * @constructor + * @param {google.iam.v1.IBinding=} [properties] Properties to set + */ + function Binding(properties) { + this.members = []; + 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]]; + } + + /** + * Binding role. + * @member {string} role + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.role = ""; + + /** + * Binding members. + * @member {Array.} members + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.members = $util.emptyArray; + + /** + * Binding condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.condition = null; + + /** + * Creates a new Binding instance using the specified properties. + * @function create + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding=} [properties] Properties to set + * @returns {google.iam.v1.Binding} Binding instance + */ + Binding.create = function create(properties) { + return new Binding(properties); + }; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.role = reader.string(); + break; + } + case 2: { + if (!(message.members && message.members.length)) + message.members = []; + message.members.push(reader.string()); + break; + } + case 3: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Binding message. + * @function verify + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Binding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.members != null && message.hasOwnProperty("members")) { + if (!Array.isArray(message.members)) + return "members: array expected"; + for (var i = 0; i < message.members.length; ++i) + if (!$util.isString(message.members[i])) + return "members: string[] expected"; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Binding} Binding + */ + Binding.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Binding) + return object; + var message = new $root.google.iam.v1.Binding(); + if (object.role != null) + message.role = String(object.role); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".google.iam.v1.Binding.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) + message.members[i] = String(object.members[i]); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.Binding.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.Binding} message Binding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Binding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) { + object.role = ""; + object.condition = null; + } + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = message.members[j]; + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this Binding to JSON. + * @function toJSON + * @memberof google.iam.v1.Binding + * @instance + * @returns {Object.} JSON object + */ + Binding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Binding + * @function getTypeUrl + * @memberof google.iam.v1.Binding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Binding"; + }; + + return Binding; + })(); + + v1.AuditConfig = (function() { + + /** + * Properties of an AuditConfig. + * @memberof google.iam.v1 + * @interface IAuditConfig + * @property {string|null} [service] AuditConfig service + * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs + */ + + /** + * Constructs a new AuditConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfig. + * @implements IAuditConfig + * @constructor + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + */ + function AuditConfig(properties) { + this.auditLogConfigs = []; + 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]]; + } + + /** + * AuditConfig service. + * @member {string} service + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.service = ""; + + /** + * AuditConfig auditLogConfigs. + * @member {Array.} auditLogConfigs + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.auditLogConfigs = $util.emptyArray; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfig} AuditConfig instance + */ + AuditConfig.create = function create(properties) { + return new AuditConfig(properties); + }; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.auditLogConfigs != null && message.auditLogConfigs.length) + for (var i = 0; i < message.auditLogConfigs.length; ++i) + $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 3: { + if (!(message.auditLogConfigs && message.auditLogConfigs.length)) + message.auditLogConfigs = []; + message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfig message. + * @function verify + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { + if (!Array.isArray(message.auditLogConfigs)) + return "auditLogConfigs: array expected"; + for (var i = 0; i < message.auditLogConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); + if (error) + return "auditLogConfigs." + error; + } + } + return null; + }; + + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfig} AuditConfig + */ + AuditConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfig) + return object; + var message = new $root.google.iam.v1.AuditConfig(); + if (object.service != null) + message.service = String(object.service); + if (object.auditLogConfigs) { + if (!Array.isArray(object.auditLogConfigs)) + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); + message.auditLogConfigs = []; + for (var i = 0; i < object.auditLogConfigs.length; ++i) { + if (typeof object.auditLogConfigs[i] !== "object") + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); + message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.AuditConfig} message AuditConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.auditLogConfigs = []; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.auditLogConfigs && message.auditLogConfigs.length) { + object.auditLogConfigs = []; + for (var j = 0; j < message.auditLogConfigs.length; ++j) + object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); + } + return object; + }; + + /** + * Converts this AuditConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfig + * @instance + * @returns {Object.} JSON object + */ + AuditConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfig"; + }; + + return AuditConfig; + })(); + + v1.AuditLogConfig = (function() { + + /** + * Properties of an AuditLogConfig. + * @memberof google.iam.v1 + * @interface IAuditLogConfig + * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType + * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers + */ + + /** + * Constructs a new AuditLogConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditLogConfig. + * @implements IAuditLogConfig + * @constructor + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + */ + function AuditLogConfig(properties) { + this.exemptedMembers = []; + 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]]; + } + + /** + * AuditLogConfig logType. + * @member {google.iam.v1.AuditLogConfig.LogType} logType + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.logType = 0; + + /** + * AuditLogConfig exemptedMembers. + * @member {Array.} exemptedMembers + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance + */ + AuditLogConfig.create = function create(properties) { + return new AuditLogConfig(properties); + }; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); + if (message.exemptedMembers != null && message.exemptedMembers.length) + for (var i = 0; i < message.exemptedMembers.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); + return writer; + }; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.logType = reader.int32(); + break; + } + case 2: { + if (!(message.exemptedMembers && message.exemptedMembers.length)) + message.exemptedMembers = []; + message.exemptedMembers.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditLogConfig message. + * @function verify + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditLogConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { + if (!Array.isArray(message.exemptedMembers)) + return "exemptedMembers: array expected"; + for (var i = 0; i < message.exemptedMembers.length; ++i) + if (!$util.isString(message.exemptedMembers[i])) + return "exemptedMembers: string[] expected"; + } + return null; + }; + + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + */ + AuditLogConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditLogConfig) + return object; + var message = new $root.google.iam.v1.AuditLogConfig(); + switch (object.logType) { + default: + if (typeof object.logType === "number") { + message.logType = object.logType; + break; + } + break; + case "LOG_TYPE_UNSPECIFIED": + case 0: + message.logType = 0; + break; + case "ADMIN_READ": + case 1: + message.logType = 1; + break; + case "DATA_WRITE": + case 2: + message.logType = 2; + break; + case "DATA_READ": + case 3: + message.logType = 3; + break; + } + if (object.exemptedMembers) { + if (!Array.isArray(object.exemptedMembers)) + throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); + message.exemptedMembers = []; + for (var i = 0; i < object.exemptedMembers.length; ++i) + message.exemptedMembers[i] = String(object.exemptedMembers[i]); + } + return message; + }; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditLogConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exemptedMembers = []; + if (options.defaults) + object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; + if (message.exemptedMembers && message.exemptedMembers.length) { + object.exemptedMembers = []; + for (var j = 0; j < message.exemptedMembers.length; ++j) + object.exemptedMembers[j] = message.exemptedMembers[j]; + } + return object; + }; + + /** + * Converts this AuditLogConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditLogConfig + * @instance + * @returns {Object.} JSON object + */ + AuditLogConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditLogConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; + }; + + /** + * LogType enum. + * @name google.iam.v1.AuditLogConfig.LogType + * @enum {number} + * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value + * @property {number} ADMIN_READ=1 ADMIN_READ value + * @property {number} DATA_WRITE=2 DATA_WRITE value + * @property {number} DATA_READ=3 DATA_READ value + */ + AuditLogConfig.LogType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADMIN_READ"] = 1; + values[valuesById[2] = "DATA_WRITE"] = 2; + values[valuesById[3] = "DATA_READ"] = 3; + return values; + })(); + + return AuditLogConfig; + })(); + + v1.PolicyDelta = (function() { + + /** + * Properties of a PolicyDelta. + * @memberof google.iam.v1 + * @interface IPolicyDelta + * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas + * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas + */ + + /** + * Constructs a new PolicyDelta. + * @memberof google.iam.v1 + * @classdesc Represents a PolicyDelta. + * @implements IPolicyDelta + * @constructor + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + */ + function PolicyDelta(properties) { + this.bindingDeltas = []; + this.auditConfigDeltas = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PolicyDelta bindingDeltas. + * @member {Array.} bindingDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.bindingDeltas = $util.emptyArray; + + /** + * PolicyDelta auditConfigDeltas. + * @member {Array.} auditConfigDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance + */ + PolicyDelta.create = function create(properties) { + return new PolicyDelta(properties); + }; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bindingDeltas != null && message.bindingDeltas.length) + for (var i = 0; i < message.bindingDeltas.length; ++i) + $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) + for (var i = 0; i < message.auditConfigDeltas.length; ++i) + $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.bindingDeltas && message.bindingDeltas.length)) + message.bindingDeltas = []; + message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) + message.auditConfigDeltas = []; + message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PolicyDelta message. + * @function verify + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolicyDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { + if (!Array.isArray(message.bindingDeltas)) + return "bindingDeltas: array expected"; + for (var i = 0; i < message.bindingDeltas.length; ++i) { + var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); + if (error) + return "bindingDeltas." + error; + } + } + if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { + if (!Array.isArray(message.auditConfigDeltas)) + return "auditConfigDeltas: array expected"; + for (var i = 0; i < message.auditConfigDeltas.length; ++i) { + var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); + if (error) + return "auditConfigDeltas." + error; + } + } + return null; + }; + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + */ + PolicyDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.PolicyDelta) + return object; + var message = new $root.google.iam.v1.PolicyDelta(); + if (object.bindingDeltas) { + if (!Array.isArray(object.bindingDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); + message.bindingDeltas = []; + for (var i = 0; i < object.bindingDeltas.length; ++i) { + if (typeof object.bindingDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); + message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); + } + } + if (object.auditConfigDeltas) { + if (!Array.isArray(object.auditConfigDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); + message.auditConfigDeltas = []; + for (var i = 0; i < object.auditConfigDeltas.length; ++i) { + if (typeof object.auditConfigDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); + message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.PolicyDelta} message PolicyDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolicyDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindingDeltas = []; + object.auditConfigDeltas = []; + } + if (message.bindingDeltas && message.bindingDeltas.length) { + object.bindingDeltas = []; + for (var j = 0; j < message.bindingDeltas.length; ++j) + object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); + } + if (message.auditConfigDeltas && message.auditConfigDeltas.length) { + object.auditConfigDeltas = []; + for (var j = 0; j < message.auditConfigDeltas.length; ++j) + object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); + } + return object; + }; + + /** + * Converts this PolicyDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.PolicyDelta + * @instance + * @returns {Object.} JSON object + */ + PolicyDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PolicyDelta + * @function getTypeUrl + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; + }; + + return PolicyDelta; + })(); + + v1.BindingDelta = (function() { + + /** + * Properties of a BindingDelta. + * @memberof google.iam.v1 + * @interface IBindingDelta + * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action + * @property {string|null} [role] BindingDelta role + * @property {string|null} [member] BindingDelta member + * @property {google.type.IExpr|null} [condition] BindingDelta condition + */ + + /** + * Constructs a new BindingDelta. + * @memberof google.iam.v1 + * @classdesc Represents a BindingDelta. + * @implements IBindingDelta + * @constructor + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + */ + function BindingDelta(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]]; + } + + /** + * BindingDelta action. + * @member {google.iam.v1.BindingDelta.Action} action + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.action = 0; + + /** + * BindingDelta role. + * @member {string} role + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.role = ""; + + /** + * BindingDelta member. + * @member {string} member + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.member = ""; + + /** + * BindingDelta condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.condition = null; + + /** + * Creates a new BindingDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + * @returns {google.iam.v1.BindingDelta} BindingDelta instance + */ + BindingDelta.create = function create(properties) { + return new BindingDelta(properties); + }; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); + if (message.member != null && Object.hasOwnProperty.call(message, "member")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.role = reader.string(); + break; + } + case 3: { + message.member = reader.string(); + break; + } + case 4: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BindingDelta message. + * @function verify + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BindingDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.member != null && message.hasOwnProperty("member")) + if (!$util.isString(message.member)) + return "member: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.BindingDelta} BindingDelta + */ + BindingDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.BindingDelta) + return object; + var message = new $root.google.iam.v1.BindingDelta(); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.role != null) + message.role = String(object.role); + if (object.member != null) + message.member = String(object.member); + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.BindingDelta} message BindingDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BindingDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.role = ""; + object.member = ""; + object.condition = null; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.member != null && message.hasOwnProperty("member")) + object.member = message.member; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this BindingDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.BindingDelta + * @instance + * @returns {Object.} JSON object + */ + BindingDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BindingDelta + * @function getTypeUrl + * @memberof google.iam.v1.BindingDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.BindingDelta"; + }; + + /** + * Action enum. + * @name google.iam.v1.BindingDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + BindingDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return BindingDelta; + })(); + + v1.AuditConfigDelta = (function() { + + /** + * Properties of an AuditConfigDelta. + * @memberof google.iam.v1 + * @interface IAuditConfigDelta + * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action + * @property {string|null} [service] AuditConfigDelta service + * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember + * @property {string|null} [logType] AuditConfigDelta logType + */ + + /** + * Constructs a new AuditConfigDelta. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfigDelta. + * @implements IAuditConfigDelta + * @constructor + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + */ + function AuditConfigDelta(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]]; + } + + /** + * AuditConfigDelta action. + * @member {google.iam.v1.AuditConfigDelta.Action} action + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.action = 0; + + /** + * AuditConfigDelta service. + * @member {string} service + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.service = ""; + + /** + * AuditConfigDelta exemptedMember. + * @member {string} exemptedMember + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.exemptedMember = ""; + + /** + * AuditConfigDelta logType. + * @member {string} logType + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.logType = ""; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance + */ + AuditConfigDelta.create = function create(properties) { + return new AuditConfigDelta(properties); + }; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); + return writer; + }; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.service = reader.string(); + break; + } + case 3: { + message.exemptedMember = reader.string(); + break; + } + case 4: { + message.logType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfigDelta message. + * @function verify + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfigDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + if (!$util.isString(message.exemptedMember)) + return "exemptedMember: string expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + if (!$util.isString(message.logType)) + return "logType: string expected"; + return null; + }; + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + */ + AuditConfigDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfigDelta) + return object; + var message = new $root.google.iam.v1.AuditConfigDelta(); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.service != null) + message.service = String(object.service); + if (object.exemptedMember != null) + message.exemptedMember = String(object.exemptedMember); + if (object.logType != null) + message.logType = String(object.logType); + return message; + }; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfigDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.service = ""; + object.exemptedMember = ""; + object.logType = ""; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + object.exemptedMember = message.exemptedMember; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = message.logType; + return object; + }; + + /** + * Converts this AuditConfigDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfigDelta + * @instance + * @returns {Object.} JSON object + */ + AuditConfigDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfigDelta + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; + }; + + /** + * Action enum. + * @name google.iam.v1.AuditConfigDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + AuditConfigDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return AuditConfigDelta; + })(); + + return v1; + })(); + + return iam; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @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 {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(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]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.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.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(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]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.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 GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.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 GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(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]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + 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 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.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.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 ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + 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 ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + 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; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + 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]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[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 ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(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]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.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 CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.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 CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(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]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.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 DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.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 DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(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]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.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.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.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.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(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]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/protos.json b/owl-bot-staging/google-devtools-artifactregistry/protos/protos.json new file mode 100644 index 00000000000..dc9bdac4d2d --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/protos/protos.json @@ -0,0 +1,7531 @@ +{ + "nested": { + "google": { + "nested": { + "devtools": { + "nested": { + "artifactregistry": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.ArtifactRegistry.V1", + "go_package": "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb", + "java_multiple_files": true, + "java_outer_classname": "YumArtifactProto", + "java_package": "com.google.devtools.artifactregistry.v1", + "php_namespace": "Google\\Cloud\\ArtifactRegistry\\V1", + "ruby_package": "Google::Cloud::ArtifactRegistry::V1", + "(google.api.resource_definition).type": "servicedirectory.googleapis.com/Service", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}" + }, + "nested": { + "AptArtifact": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/AptArtifact", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "packageName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "packageType": { + "type": "PackageType", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "architecture": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "component": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "controlFile": { + "type": "bytes", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "PackageType": { + "values": { + "PACKAGE_TYPE_UNSPECIFIED": 0, + "BINARY": 1, + "SOURCE": 2 + } + } + } + }, + "ImportAptArtifactsGcsSource": { + "fields": { + "uris": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "useWildcards": { + "type": "bool", + "id": 2 + } + } + }, + "ImportAptArtifactsRequest": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource" + ] + } + }, + "fields": { + "gcsSource": { + "type": "ImportAptArtifactsGcsSource", + "id": 2 + }, + "parent": { + "type": "string", + "id": 1 + } + } + }, + "ImportAptArtifactsErrorInfo": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource" + ] + } + }, + "fields": { + "gcsSource": { + "type": "ImportAptArtifactsGcsSource", + "id": 1 + }, + "error": { + "type": "google.rpc.Status", + "id": 2 + } + } + }, + "ImportAptArtifactsResponse": { + "fields": { + "aptArtifacts": { + "rule": "repeated", + "type": "AptArtifact", + "id": 1 + }, + "errors": { + "rule": "repeated", + "type": "ImportAptArtifactsErrorInfo", + "id": 2 + } + } + }, + "ImportAptArtifactsMetadata": { + "fields": {} + }, + "DockerImage": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/DockerImage", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "uri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "imageSizeBytes": { + "type": "int64", + "id": 4 + }, + "uploadTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "mediaType": { + "type": "string", + "id": 6 + }, + "buildTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "artifactType": { + "type": "string", + "id": 9 + }, + "imageManifests": { + "rule": "repeated", + "type": "ImageManifest", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ImageManifest": { + "fields": { + "architecture": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "os": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "digest": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mediaType": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "osVersion": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "osFeatures": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "variant": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDockerImagesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + } + } + }, + "ListDockerImagesResponse": { + "fields": { + "dockerImages": { + "rule": "repeated", + "type": "DockerImage", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetDockerImageRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/DockerImage" + } + } + } + }, + "MavenArtifact": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/MavenArtifact", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pomUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "groupId": { + "type": "string", + "id": 3 + }, + "artifactId": { + "type": "string", + "id": 4 + }, + "version": { + "type": "string", + "id": 5 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListMavenArtifactsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/MavenArtifact" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListMavenArtifactsResponse": { + "fields": { + "mavenArtifacts": { + "rule": "repeated", + "type": "MavenArtifact", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetMavenArtifactRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/MavenArtifact" + } + } + } + }, + "NpmPackage": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/NpmPackage", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "packageName": { + "type": "string", + "id": 3 + }, + "version": { + "type": "string", + "id": 4 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListNpmPackagesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/NpmPackage" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListNpmPackagesResponse": { + "fields": { + "npmPackages": { + "rule": "repeated", + "type": "NpmPackage", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetNpmPackageRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/NpmPackage" + } + } + } + }, + "PythonPackage": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/PythonPackage", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "uri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "packageName": { + "type": "string", + "id": 3 + }, + "version": { + "type": "string", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListPythonPackagesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/PythonPackage" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListPythonPackagesResponse": { + "fields": { + "pythonPackages": { + "rule": "repeated", + "type": "PythonPackage", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetPythonPackageRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/PythonPackage" + } + } + } + }, + "Attachment": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/Attachment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/attachments/{attachment}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "target": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "type": { + "type": "string", + "id": 3 + }, + "attachmentNamespace": { + "type": "string", + "id": 4 + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "files": { + "rule": "repeated", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/File" + } + }, + "ociVersionName": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListAttachmentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Attachment" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListAttachmentsResponse": { + "fields": { + "attachments": { + "rule": "repeated", + "type": "Attachment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetAttachmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Attachment" + } + } + } + }, + "CreateAttachmentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Attachment" + } + }, + "attachmentId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "attachment": { + "type": "Attachment", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteAttachmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Attachment" + } + } + } + }, + "ExportArtifactRequest": { + "oneofs": { + "sourceArtifact": { + "oneof": [ + "sourceVersion", + "sourceTag" + ] + }, + "destination": { + "oneof": [ + "gcsPath" + ] + } + }, + "fields": { + "sourceVersion": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Version" + } + }, + "sourceTag": { + "type": "string", + "id": 4, + "options": { + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Tag" + } + }, + "gcsPath": { + "type": "string", + "id": 3 + }, + "repository": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" + } + } + } + }, + "ExportArtifactResponse": { + "fields": { + "exportedVersion": { + "type": "Version", + "id": 1 + } + } + }, + "ExportArtifactMetadata": { + "fields": { + "exportedFiles": { + "rule": "repeated", + "type": "ExportedFile", + "id": 1 + } + }, + "nested": { + "ExportedFile": { + "oneofs": { + "destination": { + "oneof": [ + "gcsObjectPath" + ] + } + }, + "fields": { + "gcsObjectPath": { + "type": "string", + "id": 2 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/File" + } + }, + "hashes": { + "rule": "repeated", + "type": "Hash", + "id": 3 + } + } + } + } + }, + "Hash": { + "fields": { + "type": { + "type": "HashType", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + }, + "nested": { + "HashType": { + "values": { + "HASH_TYPE_UNSPECIFIED": 0, + "SHA256": 1, + "MD5": 2 + } + } + } + }, + "File": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/File", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/files/{file}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "sizeBytes": { + "type": "int64", + "id": 3 + }, + "hashes": { + "rule": "repeated", + "type": "Hash", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "owner": { + "type": "string", + "id": 7 + }, + "fetchTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListFilesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/File" + } + }, + "filter": { + "type": "string", + "id": 4 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListFilesResponse": { + "fields": { + "files": { + "rule": "repeated", + "type": "File", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetFileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/File" + } + } + } + }, + "DeleteFileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/File" + } + } + } + }, + "UpdateFileRequest": { + "fields": { + "file": { + "type": "File", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "VersionView": { + "values": { + "VERSION_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 2 + } + }, + "Version": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/Version", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "relatedTags": { + "rule": "repeated", + "type": "Tag", + "id": 7 + }, + "metadata": { + "type": "google.protobuf.Struct", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "fingerprints": { + "rule": "repeated", + "type": "Hash", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListVersionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "view": { + "type": "VersionView", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListVersionsResponse": { + "fields": { + "versions": { + "rule": "repeated", + "type": "Version", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetVersionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "view": { + "type": "VersionView", + "id": 2 + } + } + }, + "DeleteVersionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "BatchDeleteVersionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Version" + } + }, + "names": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Version" + } + }, + "validateOnly": { + "type": "bool", + "id": 3 + } + } + }, + "BatchDeleteVersionsMetadata": { + "fields": { + "failedVersions": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "UpdateVersionRequest": { + "fields": { + "version": { + "type": "Version", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "Tag": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/Tag", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "version": { + "type": "string", + "id": 2 + } + } + }, + "ListTagsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "filter": { + "type": "string", + "id": 4 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListTagsResponse": { + "fields": { + "tags": { + "rule": "repeated", + "type": "Tag", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetTagRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "CreateTagRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "tagId": { + "type": "string", + "id": 2 + }, + "tag": { + "type": "Tag", + "id": 3 + } + } + }, + "UpdateTagRequest": { + "fields": { + "tag": { + "type": "Tag", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "DeleteTagRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "GenericArtifact": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/GenericArtifact", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/genericArtifacts/{generic_artifact}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "version": { + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GoModule": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/GoModule", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/goModules/{go_module}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "version": { + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "KfpArtifact": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/KfpArtifact", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/kfpArtifacts/{kfp_artifact}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "version": { + "type": "string", + "id": 2 + } + } + }, + "Package": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/Package", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPackagesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Package" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPackagesResponse": { + "fields": { + "packages": { + "rule": "repeated", + "type": "Package", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetPackageRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Package" + } + } + } + }, + "DeletePackageRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Package" + } + } + } + }, + "UpdatePackageRequest": { + "fields": { + "package": { + "type": "Package", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "UpstreamPolicy": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "repository": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" + } + }, + "priority": { + "type": "int32", + "id": 3 + } + } + }, + "CleanupPolicyCondition": { + "oneofs": { + "_tagState": { + "oneof": [ + "tagState" + ] + }, + "_olderThan": { + "oneof": [ + "olderThan" + ] + }, + "_newerThan": { + "oneof": [ + "newerThan" + ] + } + }, + "fields": { + "tagState": { + "type": "TagState", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "tagPrefixes": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "versionNamePrefixes": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "packageNamePrefixes": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "olderThan": { + "type": "google.protobuf.Duration", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "newerThan": { + "type": "google.protobuf.Duration", + "id": 7, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "TagState": { + "values": { + "TAG_STATE_UNSPECIFIED": 0, + "TAGGED": 1, + "UNTAGGED": 2, + "ANY": 3 + } + } + } + }, + "CleanupPolicyMostRecentVersions": { + "oneofs": { + "_keepCount": { + "oneof": [ + "keepCount" + ] + } + }, + "fields": { + "packageNamePrefixes": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "keepCount": { + "type": "int32", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "CleanupPolicy": { + "oneofs": { + "conditionType": { + "oneof": [ + "condition", + "mostRecentVersions" + ] + } + }, + "fields": { + "condition": { + "type": "CleanupPolicyCondition", + "id": 2 + }, + "mostRecentVersions": { + "type": "CleanupPolicyMostRecentVersions", + "id": 4 + }, + "id": { + "type": "string", + "id": 1 + }, + "action": { + "type": "Action", + "id": 3 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "DELETE": 1, + "KEEP": 2 + } + } + } + }, + "VirtualRepositoryConfig": { + "fields": { + "upstreamPolicies": { + "rule": "repeated", + "type": "UpstreamPolicy", + "id": 1 + } + } + }, + "RemoteRepositoryConfig": { + "oneofs": { + "remoteSource": { + "oneof": [ + "dockerRepository", + "mavenRepository", + "npmRepository", + "pythonRepository", + "aptRepository", + "yumRepository", + "commonRepository" + ] + } + }, + "fields": { + "dockerRepository": { + "type": "DockerRepository", + "id": 2 + }, + "mavenRepository": { + "type": "MavenRepository", + "id": 3 + }, + "npmRepository": { + "type": "NpmRepository", + "id": 4 + }, + "pythonRepository": { + "type": "PythonRepository", + "id": 5 + }, + "aptRepository": { + "type": "AptRepository", + "id": 6 + }, + "yumRepository": { + "type": "YumRepository", + "id": 7 + }, + "commonRepository": { + "type": "CommonRemoteRepository", + "id": 14 + }, + "description": { + "type": "string", + "id": 1 + }, + "upstreamCredentials": { + "type": "UpstreamCredentials", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableUpstreamValidation": { + "type": "bool", + "id": 12, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + } + }, + "nested": { + "UpstreamCredentials": { + "oneofs": { + "credentials": { + "oneof": [ + "usernamePasswordCredentials" + ] + } + }, + "fields": { + "usernamePasswordCredentials": { + "type": "UsernamePasswordCredentials", + "id": 1 + } + }, + "nested": { + "UsernamePasswordCredentials": { + "fields": { + "username": { + "type": "string", + "id": 1 + }, + "passwordSecretVersion": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + } + } + } + } + }, + "DockerRepository": { + "oneofs": { + "upstream": { + "oneof": [ + "publicRepository", + "customRepository" + ] + } + }, + "fields": { + "publicRepository": { + "type": "PublicRepository", + "id": 1 + }, + "customRepository": { + "type": "CustomRepository", + "id": 3 + } + }, + "nested": { + "CustomRepository": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "PublicRepository": { + "values": { + "PUBLIC_REPOSITORY_UNSPECIFIED": 0, + "DOCKER_HUB": 1 + } + } + } + }, + "MavenRepository": { + "oneofs": { + "upstream": { + "oneof": [ + "publicRepository", + "customRepository" + ] + } + }, + "fields": { + "publicRepository": { + "type": "PublicRepository", + "id": 1 + }, + "customRepository": { + "type": "CustomRepository", + "id": 3 + } + }, + "nested": { + "CustomRepository": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "PublicRepository": { + "values": { + "PUBLIC_REPOSITORY_UNSPECIFIED": 0, + "MAVEN_CENTRAL": 1 + } + } + } + }, + "NpmRepository": { + "oneofs": { + "upstream": { + "oneof": [ + "publicRepository", + "customRepository" + ] + } + }, + "fields": { + "publicRepository": { + "type": "PublicRepository", + "id": 1 + }, + "customRepository": { + "type": "CustomRepository", + "id": 3 + } + }, + "nested": { + "CustomRepository": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "PublicRepository": { + "values": { + "PUBLIC_REPOSITORY_UNSPECIFIED": 0, + "NPMJS": 1 + } + } + } + }, + "PythonRepository": { + "oneofs": { + "upstream": { + "oneof": [ + "publicRepository", + "customRepository" + ] + } + }, + "fields": { + "publicRepository": { + "type": "PublicRepository", + "id": 1 + }, + "customRepository": { + "type": "CustomRepository", + "id": 3 + } + }, + "nested": { + "CustomRepository": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "PublicRepository": { + "values": { + "PUBLIC_REPOSITORY_UNSPECIFIED": 0, + "PYPI": 1 + } + } + } + }, + "AptRepository": { + "oneofs": { + "upstream": { + "oneof": [ + "publicRepository", + "customRepository" + ] + } + }, + "fields": { + "publicRepository": { + "type": "PublicRepository", + "id": 1 + }, + "customRepository": { + "type": "CustomRepository", + "id": 3 + } + }, + "nested": { + "PublicRepository": { + "fields": { + "repositoryBase": { + "type": "RepositoryBase", + "id": 1 + }, + "repositoryPath": { + "type": "string", + "id": 2 + } + }, + "nested": { + "RepositoryBase": { + "values": { + "REPOSITORY_BASE_UNSPECIFIED": 0, + "DEBIAN": 1, + "UBUNTU": 2, + "DEBIAN_SNAPSHOT": 3 + } + } + } + }, + "CustomRepository": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + } + } + }, + "YumRepository": { + "oneofs": { + "upstream": { + "oneof": [ + "publicRepository", + "customRepository" + ] + } + }, + "fields": { + "publicRepository": { + "type": "PublicRepository", + "id": 1 + }, + "customRepository": { + "type": "CustomRepository", + "id": 3 + } + }, + "nested": { + "PublicRepository": { + "fields": { + "repositoryBase": { + "type": "RepositoryBase", + "id": 1 + }, + "repositoryPath": { + "type": "string", + "id": 2 + } + }, + "nested": { + "RepositoryBase": { + "values": { + "REPOSITORY_BASE_UNSPECIFIED": 0, + "CENTOS": 1, + "CENTOS_DEBUG": 2, + "CENTOS_VAULT": 3, + "CENTOS_STREAM": 4, + "ROCKY": 5, + "EPEL": 6 + } + } + } + }, + "CustomRepository": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + } + } + }, + "CommonRemoteRepository": { + "fields": { + "uri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "Repository": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/Repository", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}" + }, + "oneofs": { + "formatConfig": { + "oneof": [ + "mavenConfig", + "dockerConfig" + ] + }, + "modeConfig": { + "oneof": [ + "virtualRepositoryConfig", + "remoteRepositoryConfig" + ] + } + }, + "fields": { + "mavenConfig": { + "type": "MavenRepositoryConfig", + "id": 9 + }, + "dockerConfig": { + "type": "DockerRepositoryConfig", + "id": 17 + }, + "virtualRepositoryConfig": { + "type": "VirtualRepositoryConfig", + "id": 14 + }, + "remoteRepositoryConfig": { + "type": "RemoteRepositoryConfig", + "id": 15 + }, + "name": { + "type": "string", + "id": 1 + }, + "format": { + "type": "Format", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 3 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "kmsKeyName": { + "type": "string", + "id": 8 + }, + "mode": { + "type": "Mode", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cleanupPolicies": { + "keyType": "string", + "type": "CleanupPolicy", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "sizeBytes": { + "type": "int64", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzs": { + "type": "bool", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cleanupPolicyDryRun": { + "type": "bool", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "vulnerabilityScanningConfig": { + "type": "VulnerabilityScanningConfig", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disallowUnspecifiedMode": { + "type": "bool", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "registryUri": { + "type": "string", + "id": 26, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "MavenRepositoryConfig": { + "fields": { + "allowSnapshotOverwrites": { + "type": "bool", + "id": 1 + }, + "versionPolicy": { + "type": "VersionPolicy", + "id": 2 + } + }, + "nested": { + "VersionPolicy": { + "values": { + "VERSION_POLICY_UNSPECIFIED": 0, + "RELEASE": 1, + "SNAPSHOT": 2 + } + } + } + }, + "DockerRepositoryConfig": { + "fields": { + "immutableTags": { + "type": "bool", + "id": 1 + } + } + }, + "VulnerabilityScanningConfig": { + "fields": { + "enablementConfig": { + "type": "EnablementConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "lastEnableTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "enablementState": { + "type": "EnablementState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "enablementStateReason": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "EnablementConfig": { + "values": { + "ENABLEMENT_CONFIG_UNSPECIFIED": 0, + "INHERITED": 1, + "DISABLED": 2 + } + }, + "EnablementState": { + "values": { + "ENABLEMENT_STATE_UNSPECIFIED": 0, + "SCANNING_UNSUPPORTED": 1, + "SCANNING_DISABLED": 2, + "SCANNING_ACTIVE": 3 + } + } + } + }, + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "DOCKER": 1, + "MAVEN": 2, + "NPM": 3, + "APT": 5, + "YUM": 6, + "PYTHON": 8, + "KFP": 9, + "GO": 10, + "GENERIC": 11, + "RUBY": 12 + } + }, + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "STANDARD_REPOSITORY": 1, + "VIRTUAL_REPOSITORY": 2, + "REMOTE_REPOSITORY": 3 + } + } + } + }, + "ListRepositoriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListRepositoriesResponse": { + "fields": { + "repositories": { + "rule": "repeated", + "type": "Repository", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" + } + } + } + }, + "CreateRepositoryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Repository" + } + }, + "repositoryId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "repository": { + "type": "Repository", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateRepositoryRequest": { + "fields": { + "repository": { + "type": "Repository", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "DeleteRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" + } + } + } + }, + "Rule": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/Rule", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/rules/{rule}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "action": { + "type": "Action", + "id": 2 + }, + "operation": { + "type": "Operation", + "id": 3 + }, + "condition": { + "type": "google.type.Expr", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "packageId": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ALLOW": 1, + "DENY": 2 + } + }, + "Operation": { + "values": { + "OPERATION_UNSPECIFIED": 0, + "DOWNLOAD": 1 + } + } + } + }, + "ListRulesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Rule" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListRulesResponse": { + "fields": { + "rules": { + "rule": "repeated", + "type": "Rule", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetRuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Rule" + } + } + } + }, + "CreateRuleRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Rule" + } + }, + "ruleId": { + "type": "string", + "id": 2 + }, + "rule": { + "type": "Rule", + "id": 3 + } + } + }, + "UpdateRuleRequest": { + "fields": { + "rule": { + "type": "Rule", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "DeleteRuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Rule" + } + } + } + }, + "ArtifactRegistry": { + "options": { + "(google.api.default_host)": "artifactregistry.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only" + }, + "methods": { + "ListDockerImages": { + "requestType": "ListDockerImagesRequest", + "responseType": "ListDockerImagesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDockerImage": { + "requestType": "GetDockerImageRequest", + "responseType": "DockerImage", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListMavenArtifacts": { + "requestType": "ListMavenArtifactsRequest", + "responseType": "ListMavenArtifactsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/mavenArtifacts", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*}/mavenArtifacts" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetMavenArtifact": { + "requestType": "GetMavenArtifactRequest", + "responseType": "MavenArtifact", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/mavenArtifacts/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/mavenArtifacts/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListNpmPackages": { + "requestType": "ListNpmPackagesRequest", + "responseType": "ListNpmPackagesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/npmPackages", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*}/npmPackages" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetNpmPackage": { + "requestType": "GetNpmPackageRequest", + "responseType": "NpmPackage", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/npmPackages/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/npmPackages/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPythonPackages": { + "requestType": "ListPythonPackagesRequest", + "responseType": "ListPythonPackagesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/pythonPackages", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*}/pythonPackages" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetPythonPackage": { + "requestType": "GetPythonPackageRequest", + "responseType": "PythonPackage", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/pythonPackages/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/pythonPackages/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ImportAptArtifacts": { + "requestType": "ImportAptArtifactsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1.ImportAptArtifactsResponse", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.devtools.artifactregistry.v1.ImportAptArtifactsResponse", + "metadata_type": "google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata" + } + } + ] + }, + "ImportYumArtifacts": { + "requestType": "ImportYumArtifactsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1.ImportYumArtifactsResponse", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.devtools.artifactregistry.v1.ImportYumArtifactsResponse", + "metadata_type": "google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata" + } + } + ] + }, + "ListRepositories": { + "requestType": "ListRepositoriesRequest", + "responseType": "ListRepositoriesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/repositories", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/repositories" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetRepository": { + "requestType": "GetRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateRepository": { + "requestType": "CreateRepositoryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/repositories", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "parent,repository,repository_id", + "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1.Repository", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/repositories", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "parent,repository,repository_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.devtools.artifactregistry.v1.Repository", + "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + } + } + ] + }, + "UpdateRepository": { + "requestType": "UpdateRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).patch": "/v1/{repository.name=projects/*/locations/*/repositories/*}", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "repository,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{repository.name=projects/*/locations/*/repositories/*}", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "repository,update_mask" + } + ] + }, + "DeleteRepository": { + "requestType": "DeleteRepositoryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + } + } + ] + }, + "ListPackages": { + "requestType": "ListPackagesRequest", + "responseType": "ListPackagesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/packages", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*}/packages" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetPackage": { + "requestType": "GetPackageRequest", + "responseType": "Package", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeletePackage": { + "requestType": "DeletePackageRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + } + } + ] + }, + "ListVersions": { + "requestType": "ListVersionsRequest", + "responseType": "ListVersionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetVersion": { + "requestType": "GetVersionRequest", + "responseType": "Version", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteVersion": { + "requestType": "DeleteVersionRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + } + } + ] + }, + "BatchDeleteVersions": { + "requestType": "BatchDeleteVersionsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions:batchDelete", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,names", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions:batchDelete", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,names" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata" + } + } + ] + }, + "UpdateVersion": { + "requestType": "UpdateVersionRequest", + "responseType": "Version", + "options": { + "(google.api.http).patch": "/v1/{version.name=projects/*/locations/*/repositories/*/packages/*/versions/*}", + "(google.api.http).body": "version", + "(google.api.method_signature)": "version,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{version.name=projects/*/locations/*/repositories/*/packages/*/versions/*}", + "body": "version" + } + }, + { + "(google.api.method_signature)": "version,update_mask" + } + ] + }, + "ListFiles": { + "requestType": "ListFilesRequest", + "responseType": "ListFilesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/files", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*}/files" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetFile": { + "requestType": "GetFileRequest", + "responseType": "File", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/files/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/files/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteFile": { + "requestType": "DeleteFileRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/files/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/repositories/*/files/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + } + } + ] + }, + "UpdateFile": { + "requestType": "UpdateFileRequest", + "responseType": "File", + "options": { + "(google.api.http).patch": "/v1/{file.name=projects/*/locations/*/repositories/*/files/*}", + "(google.api.http).body": "file", + "(google.api.method_signature)": "file,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{file.name=projects/*/locations/*/repositories/*/files/*}", + "body": "file" + } + }, + { + "(google.api.method_signature)": "file,update_mask" + } + ] + }, + "ListTags": { + "requestType": "ListTagsRequest", + "responseType": "ListTagsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetTag": { + "requestType": "GetTagRequest", + "responseType": "Tag", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateTag": { + "requestType": "CreateTagRequest", + "responseType": "Tag", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", + "(google.api.http).body": "tag", + "(google.api.method_signature)": "parent,tag,tag_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", + "body": "tag" + } + }, + { + "(google.api.method_signature)": "parent,tag,tag_id" + } + ] + }, + "UpdateTag": { + "requestType": "UpdateTagRequest", + "responseType": "Tag", + "options": { + "(google.api.http).patch": "/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}", + "(google.api.http).body": "tag", + "(google.api.method_signature)": "tag,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}", + "body": "tag" + } + }, + { + "(google.api.method_signature)": "tag,update_mask" + } + ] + }, + "DeleteTag": { + "requestType": "DeleteTagRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateRule": { + "requestType": "CreateRuleRequest", + "responseType": "Rule", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*}/rules", + "(google.api.http).body": "rule", + "(google.api.method_signature)": "parent,rule,rule_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/repositories/*}/rules", + "body": "rule" + } + }, + { + "(google.api.method_signature)": "parent,rule,rule_id" + } + ] + }, + "ListRules": { + "requestType": "ListRulesRequest", + "responseType": "ListRulesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/rules", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*}/rules" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetRule": { + "requestType": "GetRuleRequest", + "responseType": "Rule", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/rules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/rules/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateRule": { + "requestType": "UpdateRuleRequest", + "responseType": "Rule", + "options": { + "(google.api.http).patch": "/v1/{rule.name=projects/*/locations/*/repositories/*/rules/*}", + "(google.api.http).body": "rule", + "(google.api.method_signature)": "rule,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{rule.name=projects/*/locations/*/repositories/*/rules/*}", + "body": "rule" + } + }, + { + "(google.api.method_signature)": "rule,update_mask" + } + ] + }, + "DeleteRule": { + "requestType": "DeleteRuleRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/rules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/repositories/*/rules/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy", + "body": "*" + } + } + ] + }, + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).get": "/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" + } + } + ] + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions", + "body": "*" + } + } + ] + }, + "GetProjectSettings": { + "requestType": "GetProjectSettingsRequest", + "responseType": "ProjectSettings", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/projectSettings}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/projectSettings}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateProjectSettings": { + "requestType": "UpdateProjectSettingsRequest", + "responseType": "ProjectSettings", + "options": { + "(google.api.http).patch": "/v1/{project_settings.name=projects/*/projectSettings}", + "(google.api.http).body": "project_settings", + "(google.api.method_signature)": "project_settings,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{project_settings.name=projects/*/projectSettings}", + "body": "project_settings" + } + }, + { + "(google.api.method_signature)": "project_settings,update_mask" + } + ] + }, + "GetVPCSCConfig": { + "requestType": "GetVPCSCConfigRequest", + "responseType": "VPCSCConfig", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/vpcscConfig}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/vpcscConfig}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateVPCSCConfig": { + "requestType": "UpdateVPCSCConfigRequest", + "responseType": "VPCSCConfig", + "options": { + "(google.api.http).patch": "/v1/{vpcsc_config.name=projects/*/locations/*/vpcscConfig}", + "(google.api.http).body": "vpcsc_config", + "(google.api.method_signature)": "vpcsc_config,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{vpcsc_config.name=projects/*/locations/*/vpcscConfig}", + "body": "vpcsc_config" + } + }, + { + "(google.api.method_signature)": "vpcsc_config,update_mask" + } + ] + }, + "UpdatePackage": { + "requestType": "UpdatePackageRequest", + "responseType": "Package", + "options": { + "(google.api.http).patch": "/v1/{package.name=projects/*/locations/*/repositories/*/packages/*}", + "(google.api.http).body": "package", + "(google.api.method_signature)": "package,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{package.name=projects/*/locations/*/repositories/*/packages/*}", + "body": "package" + } + }, + { + "(google.api.method_signature)": "package,update_mask" + } + ] + }, + "ListAttachments": { + "requestType": "ListAttachmentsRequest", + "responseType": "ListAttachmentsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/attachments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*}/attachments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetAttachment": { + "requestType": "GetAttachmentRequest", + "responseType": "Attachment", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/attachments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/attachments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateAttachment": { + "requestType": "CreateAttachmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*}/attachments", + "(google.api.http).body": "attachment", + "(google.api.method_signature)": "parent,attachment,attachment_id", + "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1.Attachment", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/repositories/*}/attachments", + "body": "attachment" + } + }, + { + "(google.api.method_signature)": "parent,attachment,attachment_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.devtools.artifactregistry.v1.Attachment", + "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + } + } + ] + }, + "DeleteAttachment": { + "requestType": "DeleteAttachmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/attachments/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/repositories/*/attachments/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + } + } + ] + }, + "ExportArtifact": { + "requestType": "ExportArtifactRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{repository=projects/*/locations/*/repositories/*}:exportArtifact", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1.ExportArtifactResponse", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.ExportArtifactMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{repository=projects/*/locations/*/repositories/*}:exportArtifact", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.devtools.artifactregistry.v1.ExportArtifactResponse", + "metadata_type": "google.devtools.artifactregistry.v1.ExportArtifactMetadata" + } + } + ] + } + } + }, + "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 + }, + "pullPercent": { + "type": "int32", + "id": 3 + } + }, + "nested": { + "RedirectionState": { + "valuesOptions": { + "REDIRECTION_FROM_GCR_IO_FINALIZED": { + "deprecated": true + } + }, + "values": { + "REDIRECTION_STATE_UNSPECIFIED": 0, + "REDIRECTION_FROM_GCR_IO_DISABLED": 1, + "REDIRECTION_FROM_GCR_IO_ENABLED": 2, + "REDIRECTION_FROM_GCR_IO_FINALIZED": 3, + "REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING": 5, + "REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING": 6 + } + } + } + }, + "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 + } + } + }, + "VPCSCConfig": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/VpcscConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/vpcscConfig" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "vpcscPolicy": { + "type": "VPCSCPolicy", + "id": 2 + } + }, + "nested": { + "VPCSCPolicy": { + "values": { + "VPCSC_POLICY_UNSPECIFIED": 0, + "DENY": 1, + "ALLOW": 2 + } + } + } + }, + "GetVPCSCConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/VpcscConfig" + } + } + } + }, + "UpdateVPCSCConfigRequest": { + "fields": { + "vpcscConfig": { + "type": "VPCSCConfig", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "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": {} + } + } + }, + "v1beta2": { + "options": { + "csharp_namespace": "Google.Cloud.ArtifactRegistry.V1Beta2", + "go_package": "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb", + "java_multiple_files": true, + "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": { + "type": "HashType", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + }, + "nested": { + "HashType": { + "values": { + "HASH_TYPE_UNSPECIFIED": 0, + "SHA256": 1, + "MD5": 2 + } + } + } + }, + "File": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/File", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/files/{file}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "sizeBytes": { + "type": "int64", + "id": 3 + }, + "hashes": { + "rule": "repeated", + "type": "Hash", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "owner": { + "type": "string", + "id": 7 + } + } + }, + "ListFilesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "filter": { + "type": "string", + "id": 4 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListFilesResponse": { + "fields": { + "files": { + "rule": "repeated", + "type": "File", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetFileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "Package": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + } + } + }, + "ListPackagesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListPackagesResponse": { + "fields": { + "packages": { + "rule": "repeated", + "type": "Package", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetPackageRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeletePackageRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "Repository": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/Repository", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}" + }, + "oneofs": { + "formatConfig": { + "oneof": [ + "mavenConfig" + ] + } + }, + "fields": { + "mavenConfig": { + "type": "MavenRepositoryConfig", + "id": 9 + }, + "name": { + "type": "string", + "id": 1 + }, + "format": { + "type": "Format", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "kmsKeyName": { + "type": "string", + "id": 8 + } + }, + "nested": { + "MavenRepositoryConfig": { + "fields": { + "allowSnapshotOverwrites": { + "type": "bool", + "id": 1 + }, + "versionPolicy": { + "type": "VersionPolicy", + "id": 2 + } + }, + "nested": { + "VersionPolicy": { + "values": { + "VERSION_POLICY_UNSPECIFIED": 0, + "RELEASE": 1, + "SNAPSHOT": 2 + } + } + } + }, + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "DOCKER": 1, + "MAVEN": 2, + "NPM": 3, + "APT": 5, + "YUM": 6, + "PYTHON": 8 + } + } + } + }, + "ListRepositoriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListRepositoriesResponse": { + "fields": { + "repositories": { + "rule": "repeated", + "type": "Repository", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" + } + } + } + }, + "CreateRepositoryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Repository" + } + }, + "repositoryId": { + "type": "string", + "id": 2 + }, + "repository": { + "type": "Repository", + "id": 3 + } + } + }, + "UpdateRepositoryRequest": { + "fields": { + "repository": { + "type": "Repository", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "DeleteRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" + } + } + } + }, + "ArtifactRegistry": { + "options": { + "(google.api.default_host)": "artifactregistry.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only" + }, + "methods": { + "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", + "options": { + "(google.api.http).get": "/v1beta2/{parent=projects/*/locations/*}/repositories", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta2/{parent=projects/*/locations/*}/repositories" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetRepository": { + "requestType": "GetRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).get": "/v1beta2/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta2/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateRepository": { + "requestType": "CreateRepositoryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(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": "google.devtools.artifactregistry.v1beta2.Repository", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/{parent=projects/*/locations/*}/repositories", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "parent,repository,repository_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.devtools.artifactregistry.v1beta2.Repository", + "metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" + } + } + ] + }, + "UpdateRepository": { + "requestType": "UpdateRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).patch": "/v1beta2/{repository.name=projects/*/locations/*/repositories/*}", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "repository,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta2/{repository.name=projects/*/locations/*/repositories/*}", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "repository,update_mask" + } + ] + }, + "DeleteRepository": { + "requestType": "DeleteRepositoryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/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": "google.devtools.artifactregistry.v1beta2.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta2/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" + } + } + ] + }, + "ListPackages": { + "requestType": "ListPackagesRequest", + "responseType": "ListPackagesResponse", + "options": { + "(google.api.http).get": "/v1beta2/{parent=projects/*/locations/*/repositories/*}/packages", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta2/{parent=projects/*/locations/*/repositories/*}/packages" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetPackage": { + "requestType": "GetPackageRequest", + "responseType": "Package", + "options": { + "(google.api.http).get": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeletePackage": { + "requestType": "DeletePackageRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(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": "google.devtools.artifactregistry.v1beta2.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" + } + } + ] + }, + "ListVersions": { + "requestType": "ListVersionsRequest", + "responseType": "ListVersionsResponse", + "options": { + "(google.api.http).get": "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/versions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/versions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetVersion": { + "requestType": "GetVersionRequest", + "responseType": "Version", + "options": { + "(google.api.http).get": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteVersion": { + "requestType": "DeleteVersionRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(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": "google.devtools.artifactregistry.v1beta2.OperationMetadata" + }, + "parsedOptions": [ + { + "(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", + "metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" + } + } + ] + }, + "ListFiles": { + "requestType": "ListFilesRequest", + "responseType": "ListFilesResponse", + "options": { + "(google.api.http).get": "/v1beta2/{parent=projects/*/locations/*/repositories/*}/files", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta2/{parent=projects/*/locations/*/repositories/*}/files" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetFile": { + "requestType": "GetFileRequest", + "responseType": "File", + "options": { + "(google.api.http).get": "/v1beta2/{name=projects/*/locations/*/repositories/*/files/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta2/{name=projects/*/locations/*/repositories/*/files/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListTags": { + "requestType": "ListTagsRequest", + "responseType": "ListTagsResponse", + "options": { + "(google.api.http).get": "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetTag": { + "requestType": "GetTagRequest", + "responseType": "Tag", + "options": { + "(google.api.http).get": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateTag": { + "requestType": "CreateTagRequest", + "responseType": "Tag", + "options": { + "(google.api.http).post": "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", + "(google.api.http).body": "tag", + "(google.api.method_signature)": "parent,tag,tag_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", + "body": "tag" + } + }, + { + "(google.api.method_signature)": "parent,tag,tag_id" + } + ] + }, + "UpdateTag": { + "requestType": "UpdateTagRequest", + "responseType": "Tag", + "options": { + "(google.api.http).patch": "/v1beta2/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}", + "(google.api.http).body": "tag", + "(google.api.method_signature)": "tag,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta2/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}", + "body": "tag" + } + }, + { + "(google.api.method_signature)": "tag,update_mask" + } + ] + }, + "DeleteTag": { + "requestType": "DeleteTagRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1beta2/{resource=projects/*/locations/*/repositories/*}:setIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/{resource=projects/*/locations/*/repositories/*}:setIamPolicy", + "body": "*" + } + } + ] + }, + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).get": "/v1beta2/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta2/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" + } + } + ] + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1beta2/{resource=projects/*/locations/*/repositories/*}:testIamPermissions", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/{resource=projects/*/locations/*/repositories/*}:testIamPermissions", + "body": "*" + } + } + ] + }, + "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", + "id": 1 + }, + "version": { + "type": "string", + "id": 2 + } + } + }, + "ListTagsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "filter": { + "type": "string", + "id": 4 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListTagsResponse": { + "fields": { + "tags": { + "rule": "repeated", + "type": "Tag", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetTagRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "CreateTagRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "tagId": { + "type": "string", + "id": 2 + }, + "tag": { + "type": "Tag", + "id": 3 + } + } + }, + "UpdateTagRequest": { + "fields": { + "tag": { + "type": "Tag", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "DeleteTagRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "VersionView": { + "values": { + "VERSION_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 2 + } + }, + "Version": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/Version", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "relatedTags": { + "rule": "repeated", + "type": "Tag", + "id": 7 + }, + "metadata": { + "type": "google.protobuf.Struct", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListVersionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "view": { + "type": "VersionView", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListVersionsResponse": { + "fields": { + "versions": { + "rule": "repeated", + "type": "Version", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetVersionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "view": { + "type": "VersionView", + "id": 2 + } + } + }, + "DeleteVersionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "force": { + "type": "bool", + "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": {} + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api;api", + "java_multiple_files": true, + "java_outer_classname": "LaunchStageProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "edition": "proto2", + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "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 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", + "java_multiple_files": true, + "java_outer_classname": "ExprProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Expr": { + "fields": { + "expression": { + "type": "string", + "id": 1 + }, + "title": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "location": { + "type": "string", + "id": 4 + } + } + } + } + }, + "iam": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Iam.V1", + "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", + "java_multiple_files": true, + "java_outer_classname": "PolicyProto", + "java_package": "com.google.iam.v1", + "php_namespace": "Google\\Cloud\\Iam\\V1" + }, + "nested": { + "IAMPolicy": { + "options": { + "(google.api.default_host)": "iam-meta-api.googleapis.com" + }, + "methods": { + "SetIamPolicy": { + "requestType": "SetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:setIamPolicy", + "body": "*" + } + } + ] + }, + "GetIamPolicy": { + "requestType": "GetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:getIamPolicy", + "body": "*" + } + } + ] + }, + "TestIamPermissions": { + "requestType": "TestIamPermissionsRequest", + "responseType": "TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:testIamPermissions", + "body": "*" + } + } + ] + } + } + }, + "SetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "policy": { + "type": "Policy", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "GetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "options": { + "type": "GetPolicyOptions", + "id": 2 + } + } + }, + "TestIamPermissionsRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "permissions": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TestIamPermissionsResponse": { + "fields": { + "permissions": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "GetPolicyOptions": { + "fields": { + "requestedPolicyVersion": { + "type": "int32", + "id": 1 + } + } + }, + "Policy": { + "fields": { + "version": { + "type": "int32", + "id": 1 + }, + "bindings": { + "rule": "repeated", + "type": "Binding", + "id": 4 + }, + "auditConfigs": { + "rule": "repeated", + "type": "AuditConfig", + "id": 6 + }, + "etag": { + "type": "bytes", + "id": 3 + } + } + }, + "Binding": { + "fields": { + "role": { + "type": "string", + "id": 1 + }, + "members": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "condition": { + "type": "google.type.Expr", + "id": 3 + } + } + }, + "AuditConfig": { + "fields": { + "service": { + "type": "string", + "id": 1 + }, + "auditLogConfigs": { + "rule": "repeated", + "type": "AuditLogConfig", + "id": 3 + } + } + }, + "AuditLogConfig": { + "fields": { + "logType": { + "type": "LogType", + "id": 1 + }, + "exemptedMembers": { + "rule": "repeated", + "type": "string", + "id": 2 + } + }, + "nested": { + "LogType": { + "values": { + "LOG_TYPE_UNSPECIFIED": 0, + "ADMIN_READ": 1, + "DATA_WRITE": 2, + "DATA_READ": 3 + } + } + } + }, + "PolicyDelta": { + "fields": { + "bindingDeltas": { + "rule": "repeated", + "type": "BindingDelta", + "id": 1 + }, + "auditConfigDeltas": { + "rule": "repeated", + "type": "AuditConfigDelta", + "id": 2 + } + } + }, + "BindingDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "role": { + "type": "string", + "id": 2 + }, + "member": { + "type": "string", + "id": 3 + }, + "condition": { + "type": "google.type.Expr", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + }, + "AuditConfigDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "service": { + "type": "string", + "id": 2 + }, + "exemptedMember": { + "type": "string", + "id": 3 + }, + "logType": { + "type": "string", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.batch_delete_versions.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.batch_delete_versions.js new file mode 100644 index 00000000000..c129fb47c4f --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.batch_delete_versions.js @@ -0,0 +1,72 @@ +// Copyright 2025 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(names) { + // [START artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the repository holding all requested versions. + */ + // const parent = 'abc123' + /** + * Required. The names of the versions to delete. + * The maximum number of versions deleted per batch is determined by the + * service and is dependent on the available resources in the region. + */ + // const names = ['abc','def'] + /** + * If true, the request is performed without deleting data, following AIP-163. + */ + // const validateOnly = true + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callBatchDeleteVersions() { + // Construct request + const request = { + names, + }; + + // Run request + const [operation] = await artifactregistryClient.batchDeleteVersions(request); + const [response] = await operation.promise(); + console.log(response); + } + + callBatchDeleteVersions(); + // [END artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_attachment.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_attachment.js new file mode 100644 index 00000000000..db6ba5317c5 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_attachment.js @@ -0,0 +1,73 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, attachmentId, attachment) { + // [START artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent resource where the attachment will be + * created. + */ + // const parent = 'abc123' + /** + * Required. The attachment id to use for this attachment. + */ + // const attachmentId = 'abc123' + /** + * Required. The attachment to be created. + */ + // const attachment = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callCreateAttachment() { + // Construct request + const request = { + parent, + attachmentId, + attachment, + }; + + // Run request + const [operation] = await artifactregistryClient.createAttachment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAttachment(); + // [END artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_repository.js new file mode 100644 index 00000000000..c0d281f76a0 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_repository.js @@ -0,0 +1,73 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, repositoryId, repository) { + // [START artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent resource where the repository will be + * created. + */ + // const parent = 'abc123' + /** + * Required. The repository id to use for this repository. + */ + // const repositoryId = 'abc123' + /** + * Required. The repository to be created. + */ + // const repository = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callCreateRepository() { + // Construct request + const request = { + parent, + repositoryId, + repository, + }; + + // Run request + const [operation] = await artifactregistryClient.createRepository(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateRepository(); + // [END artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_rule.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_rule.js new file mode 100644 index 00000000000..c708e095c47 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_rule.js @@ -0,0 +1,69 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START artifactregistry_v1_generated_ArtifactRegistry_CreateRule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent resource where the rule will be created. + */ + // const parent = 'abc123' + /** + * The rule id to use for this repository. + */ + // const ruleId = 'abc123' + /** + * The rule to be created. + */ + // const rule = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callCreateRule() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await artifactregistryClient.createRule(request); + console.log(response); + } + + callCreateRule(); + // [END artifactregistry_v1_generated_ArtifactRegistry_CreateRule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_tag.js new file mode 100644 index 00000000000..7d8973cadbe --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_tag.js @@ -0,0 +1,68 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the parent resource where the tag will be created. + */ + // const parent = 'abc123' + /** + * The tag id to use for this repository. + */ + // const tagId = 'abc123' + /** + * The tag to be created. + */ + // const tag = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callCreateTag() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.createTag(request); + console.log(response); + } + + callCreateTag(); + // [END artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_attachment.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_attachment.js new file mode 100644 index 00000000000..48f92cde27c --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_attachment.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the attachment to delete. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeleteAttachment() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await artifactregistryClient.deleteAttachment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteAttachment(); + // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_file.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_file.js new file mode 100644 index 00000000000..c08f79c2112 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_file.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the file to delete. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeleteFile() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await artifactregistryClient.deleteFile(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteFile(); + // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_package.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_package.js new file mode 100644 index 00000000000..4bff2421198 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_package.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the package to delete. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeletePackage() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await artifactregistryClient.deletePackage(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeletePackage(); + // [END artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_repository.js new file mode 100644 index 00000000000..f358eb1d876 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_repository.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the repository to delete. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeleteRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await artifactregistryClient.deleteRepository(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteRepository(); + // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_rule.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_rule.js new file mode 100644 index 00000000000..67934a2ed6b --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_rule.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the rule to delete. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeleteRule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.deleteRule(request); + console.log(response); + } + + callDeleteRule(); + // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_tag.js new file mode 100644 index 00000000000..a4543173c68 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_tag.js @@ -0,0 +1,60 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the tag to delete. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeleteTag() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.deleteTag(request); + console.log(response); + } + + callDeleteTag(); + // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_version.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_version.js new file mode 100644 index 00000000000..a90d9010b88 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_version.js @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the version to delete. + */ + // const name = 'abc123' + /** + * By default, a version that is tagged may not be deleted. If force=true, the + * version and any tags pointing to the version are deleted. + */ + // const force = true + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeleteVersion() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await artifactregistryClient.deleteVersion(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteVersion(); + // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.export_artifact.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.export_artifact.js new file mode 100644 index 00000000000..c00bfb6caa3 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.export_artifact.js @@ -0,0 +1,81 @@ +// Copyright 2025 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(repository) { + // [START artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The artifact version to export. + * Format: + * projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version} + */ + // const sourceVersion = 'abc123' + /** + * The artifact tag to export. + * Format:projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag} + */ + // const sourceTag = 'abc123' + /** + * The Cloud Storage path to export the artifact to. Should start with the + * bucket name, and optionally have a directory path. Examples: + * `dst_bucket`, `dst_bucket/sub_dir`. + * Existing objects with the same path will be overwritten. + */ + // const gcsPath = 'abc123' + /** + * Required. The repository of the artifact to export. + * Format: projects/{project}/locations/{location}/repositories/{repository} + */ + // const repository = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callExportArtifact() { + // Construct request + const request = { + repository, + }; + + // Run request + const [operation] = await artifactregistryClient.exportArtifact(request); + const [response] = await operation.promise(); + console.log(response); + } + + callExportArtifact(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_attachment.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_attachment.js new file mode 100644 index 00000000000..8f26f77f2c7 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_attachment.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the attachment to retrieve. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetAttachment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getAttachment(request); + console.log(response); + } + + callGetAttachment(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_docker_image.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_docker_image.js new file mode 100644 index 00000000000..9e4cc34921d --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_docker_image.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the docker images. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetDockerImage() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getDockerImage(request); + console.log(response); + } + + callGetDockerImage(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_file.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_file.js new file mode 100644 index 00000000000..5243c918b26 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_file.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetFile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the file to retrieve. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetFile() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getFile(request); + console.log(response); + } + + callGetFile(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_iam_policy.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_iam_policy.js new file mode 100644 index 00000000000..894c9f6dad7 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource) { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + */ + // const options = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetIamPolicy() { + // Construct request + const request = { + resource, + }; + + // Run request + const response = await artifactregistryClient.getIamPolicy(request); + console.log(response); + } + + callGetIamPolicy(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_maven_artifact.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_maven_artifact.js new file mode 100644 index 00000000000..4d40455814d --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_maven_artifact.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the maven artifact. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetMavenArtifact() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getMavenArtifact(request); + console.log(response); + } + + callGetMavenArtifact(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_npm_package.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_npm_package.js new file mode 100644 index 00000000000..79f11e76a4a --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_npm_package.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the npm package. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetNpmPackage() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getNpmPackage(request); + console.log(response); + } + + callGetNpmPackage(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_package.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_package.js new file mode 100644 index 00000000000..9a8f9b5b95c --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_package.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetPackage_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the package to retrieve. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetPackage() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getPackage(request); + console.log(response); + } + + callGetPackage(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetPackage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_project_settings.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_project_settings.js new file mode 100644 index 00000000000..64ea59f24d2 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_project_settings.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the projectSettings resource. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetProjectSettings() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getProjectSettings(request); + console.log(response); + } + + callGetProjectSettings(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_python_package.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_python_package.js new file mode 100644 index 00000000000..80dd50b699a --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_python_package.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the python package. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetPythonPackage() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getPythonPackage(request); + console.log(response); + } + + callGetPythonPackage(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_repository.js new file mode 100644 index 00000000000..ed33370df1a --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_repository.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the repository to retrieve. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getRepository(request); + console.log(response); + } + + callGetRepository(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_rule.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_rule.js new file mode 100644 index 00000000000..575d3554436 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_rule.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetRule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the rule to retrieve. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetRule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getRule(request); + console.log(response); + } + + callGetRule(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetRule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_tag.js new file mode 100644 index 00000000000..d4b78ce093d --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_tag.js @@ -0,0 +1,60 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetTag_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the tag to retrieve. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetTag() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.getTag(request); + console.log(response); + } + + callGetTag(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetTag_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_v_p_c_s_c_config.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_v_p_c_s_c_config.js new file mode 100644 index 00000000000..37bd3b49156 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_v_p_c_s_c_config.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the VPCSCConfig resource. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetVPCSCConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getVPCSCConfig(request); + console.log(response); + } + + callGetVPCSCConfig(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_version.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_version.js new file mode 100644 index 00000000000..46b353978b6 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_version.js @@ -0,0 +1,64 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the version to retrieve. + */ + // const name = 'abc123' + /** + * The view that should be returned in the response. + */ + // const view = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetVersion() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.getVersion(request); + console.log(response); + } + + callGetVersion(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_apt_artifacts.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_apt_artifacts.js new file mode 100644 index 00000000000..15925534853 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_apt_artifacts.js @@ -0,0 +1,65 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Google Cloud Storage location where input content is located. + */ + // const gcsSource = {} + /** + * The name of the parent resource where the artifacts will be imported. + */ + // const parent = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callImportAptArtifacts() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await artifactregistryClient.importAptArtifacts(request); + const [response] = await operation.promise(); + console.log(response); + } + + callImportAptArtifacts(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_yum_artifacts.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_yum_artifacts.js new file mode 100644 index 00000000000..f2311011039 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_yum_artifacts.js @@ -0,0 +1,65 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Google Cloud Storage location where input content is located. + */ + // const gcsSource = {} + /** + * The name of the parent resource where the artifacts will be imported. + */ + // const parent = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callImportYumArtifacts() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await artifactregistryClient.importYumArtifacts(request); + const [response] = await operation.promise(); + console.log(response); + } + + callImportYumArtifacts(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_attachments.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_attachments.js new file mode 100644 index 00000000000..b85fd44a651 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_attachments.js @@ -0,0 +1,79 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent resource whose attachments will be listed. + */ + // const parent = 'abc123' + /** + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * * `target` + * * `type` + * * `attachment_namespace` + */ + // const filter = 'abc123' + /** + * The maximum number of attachments to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListAttachments() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = artifactregistryClient.listAttachmentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAttachments(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_docker_images.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_docker_images.js new file mode 100644 index 00000000000..f9c3fd90a92 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_docker_images.js @@ -0,0 +1,76 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent resource whose docker images will be + * listed. + */ + // const parent = 'abc123' + /** + * The maximum number of artifacts to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + /** + * The field to order the results by. + */ + // const orderBy = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListDockerImages() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = artifactregistryClient.listDockerImagesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDockerImages(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_files.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_files.js new file mode 100644 index 00000000000..332b3461bdc --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_files.js @@ -0,0 +1,113 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the repository whose files will be listed. For + * example: "projects/p1/locations/us-central1/repositories/repo1 + */ + // const parent = 'abc123' + /** + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * * `name` + * * `owner` + * * `annotations` + * Examples of using a filter: + * To filter the results of your request to files with the name `my_file.txt` + * in project `my-project` in the `us-central` region, in repository + * `my-repo`, append the following filter expression to your request: + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` + * You can also use wildcards to match any number of characters before or + * after the value: + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` + * To filter the results of your request to files owned by the version `1.0` + * in package `pkg1`, append the following filter expression to your request: + * * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + * To filter the results of your request to files with the annotation + * key-value pair `external_link`: `external_link_value`, append the + * following filter expression to your request: + * * `"annotations.external_link:external_link_value"` + * To filter just for a specific annotation key `external_link`, append the + * following filter expression to your request: + * * `"annotations.external_link"` + * If the annotation key or value contains special characters, you can escape + * them by surrounding the value with backticks. For example, to filter the + * results of your request to files with the annotation key-value pair + * `external.link`:`https://example.com/my-file`, append the following + * filter expression to your request: + * * `` "annotations.`external.link`:`https://example.com/my-file`" `` + * You can also filter with annotations with a wildcard to + * match any number of characters before or after the value: + * * `` "annotations.*_link:`*example.com*`" `` + */ + // const filter = 'abc123' + /** + * The maximum number of files to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + /** + * The field to order the results by. + */ + // const orderBy = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListFiles() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = artifactregistryClient.listFilesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFiles(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_maven_artifacts.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_maven_artifacts.js new file mode 100644 index 00000000000..e74f4adcd85 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_maven_artifacts.js @@ -0,0 +1,72 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent resource whose maven artifacts will be + * listed. + */ + // const parent = 'abc123' + /** + * The maximum number of artifacts to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListMavenArtifacts() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = artifactregistryClient.listMavenArtifactsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMavenArtifacts(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_npm_packages.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_npm_packages.js new file mode 100644 index 00000000000..2daaee7b937 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_npm_packages.js @@ -0,0 +1,72 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent resource whose npm packages will be + * listed. + */ + // const parent = 'abc123' + /** + * The maximum number of artifacts to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListNpmPackages() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = artifactregistryClient.listNpmPackagesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListNpmPackages(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_packages.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_packages.js new file mode 100644 index 00000000000..ea3db2c3ee5 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_packages.js @@ -0,0 +1,109 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent resource whose packages will be listed. + */ + // const parent = 'abc123' + /** + * The maximum number of packages to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + /** + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * * `name` + * * `annotations` + * Examples of using a filter: + * To filter the results of your request to packages with the name + * `my-package` in project `my-project` in the `us-central` region, in + * repository `my-repo`, append the following filter expression to your + * request: + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` + * You can also use wildcards to match any number of characters before or + * after the value: + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` + * To filter the results of your request to packages with the annotation + * key-value pair `external_link`: `external_link_value`, append the + * following filter expression to your request": + * * `"annotations.external_link:external_link_value"` + * To filter the results just for a specific annotation key `external_link`, + * append the following filter expression to your request: + * * `"annotations.external_link"` + * If the annotation key or value contains special characters, you can escape + * them by surrounding the value with backticks. For example, to filter the + * results of your request to packages with the annotation key-value pair + * `external.link`:`https://example.com/my-package`, append the following + * filter expression to your request: + * * `` "annotations.`external.link`:`https://example.com/my-package`" `` + * You can also filter with annotations with a wildcard to + * match any number of characters before or after the value: + * * `` "annotations.*_link:`*example.com*`" `` + */ + // const filter = 'abc123' + /** + * Optional. The field to order the results by. + */ + // const orderBy = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListPackages() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = artifactregistryClient.listPackagesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPackages(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_python_packages.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_python_packages.js new file mode 100644 index 00000000000..6dce37328e7 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_python_packages.js @@ -0,0 +1,72 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent resource whose python packages will be + * listed. + */ + // const parent = 'abc123' + /** + * The maximum number of artifacts to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListPythonPackages() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = artifactregistryClient.listPythonPackagesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPythonPackages(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js new file mode 100644 index 00000000000..63ef48d93ad --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js @@ -0,0 +1,92 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent resource whose repositories will be + * listed. + */ + // const parent = 'abc123' + /** + * The maximum number of repositories to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + /** + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * * `name` + * Examples of using a filter: + * To filter the results of your request to repositories with the name + * `my-repo` in project `my-project` in the `us-central` region, append the + * following filter expression to your request: + * * `name="projects/my-project/locations/us-central1/repositories/my-repo"` + * You can also use wildcards to match any number of characters before or + * after the value: + * * `name="projects/my-project/locations/us-central1/repositories/my-*"` + * * `name="projects/my-project/locations/us-central1/repositories/*repo"` + * * `name="projects/my-project/locations/us-central1/repositories/*repo*"` + */ + // const filter = 'abc123' + /** + * Optional. The field to order the results by. + */ + // const orderBy = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListRepositories() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = artifactregistryClient.listRepositoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRepositories(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_rules.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_rules.js new file mode 100644 index 00000000000..eccf07ebd11 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_rules.js @@ -0,0 +1,73 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START artifactregistry_v1_generated_ArtifactRegistry_ListRules_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent repository whose rules will be listed. + * For example: + * `projects/p1/locations/us-central1/repositories/repo1`. + */ + // const parent = 'abc123' + /** + * The maximum number of rules to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListRules() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = artifactregistryClient.listRulesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRules(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListRules_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_tags.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_tags.js new file mode 100644 index 00000000000..c0197c250c3 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_tags.js @@ -0,0 +1,94 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_ListTags_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the parent package whose tags will be listed. + * For example: + * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. + */ + // const parent = 'abc123' + /** + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * * `name` + * * `version` + * Examples of using a filter: + * To filter the results of your request to tags with the name `my-tag` in + * package `my-package` in repository `my-repo` in project "`y-project` in + * the us-central region, append the following filter expression to your + * request: + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` + * You can also use wildcards to match any number of characters before or + * after the value: + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` + * To filter the results of your request to tags applied to the version + * `1.0` in package `my-package`, append the following filter expression to + * your request: + * * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + */ + // const filter = 'abc123' + /** + * The maximum number of tags to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListTags() { + // Construct request + const request = { + }; + + // Run request + const iterable = artifactregistryClient.listTagsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListTags(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListTags_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_versions.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_versions.js new file mode 100644 index 00000000000..29674b2e3d9 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_versions.js @@ -0,0 +1,112 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the parent resource whose versions will be listed. + */ + // const parent = 'abc123' + /** + * The maximum number of versions to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + /** + * The view that should be returned in the response. + */ + // const view = {} + /** + * Optional. The field to order the results by. + */ + // const orderBy = 'abc123' + /** + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * * `name` + * * `annotations` + * Examples of using a filter: + * To filter the results of your request to versions with the name + * `my-version` in project `my-project` in the `us-central` region, in + * repository `my-repo`, append the following filter expression to your + * request: + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` + * You can also use wildcards to match any number of characters before or + * after the value: + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` + * To filter the results of your request to versions with the annotation + * key-value pair `external_link`: `external_link_value`, append the + * following filter expression to your request: + * * `"annotations.external_link:external_link_value"` + * To filter just for a specific annotation key `external_link`, append the + * following filter expression to your request: + * * `"annotations.external_link"` + * If the annotation key or value contains special characters, you can escape + * them by surrounding the value with backticks. For example, to filter the + * results of your request to versions with the annotation key-value pair + * `external.link`:`https://example.com/my-version`, append the following + * filter expression to your request: + * * `` "annotations.`external.link`:`https://example.com/my-version`" `` + * You can also filter with annotations with a wildcard to + * match any number of characters before or after the value: + * * `` "annotations.*_link:`*example.com*`" `` + */ + // const filter = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListVersions() { + // Construct request + const request = { + }; + + // Run request + const iterable = artifactregistryClient.listVersionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListVersions(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.set_iam_policy.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.set_iam_policy.js new file mode 100644 index 00000000000..a5ef179ba23 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, policy) { + // [START artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + */ + // const policy = {} + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * `paths: "bindings, etag"` + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callSetIamPolicy() { + // Construct request + const request = { + resource, + policy, + }; + + // Run request + const response = await artifactregistryClient.setIamPolicy(request); + console.log(response); + } + + callSetIamPolicy(); + // [END artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.test_iam_permissions.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.test_iam_permissions.js new file mode 100644 index 00000000000..aeee15f724f --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.test_iam_permissions.js @@ -0,0 +1,70 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, permissions) { + // [START artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). + */ + // const permissions = ['abc','def'] + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callTestIamPermissions() { + // Construct request + const request = { + resource, + permissions, + }; + + // Run request + const response = await artifactregistryClient.testIamPermissions(request); + console.log(response); + } + + callTestIamPermissions(); + // [END artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_file.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_file.js new file mode 100644 index 00000000000..9c85e991392 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_file.js @@ -0,0 +1,68 @@ +// Copyright 2025 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(file, updateMask) { + // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The File that replaces the resource on the server. + */ + // const file = {} + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callUpdateFile() { + // Construct request + const request = { + file, + updateMask, + }; + + // Run request + const response = await artifactregistryClient.updateFile(request); + console.log(response); + } + + callUpdateFile(); + // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_package.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_package.js new file mode 100644 index 00000000000..803ed2926a7 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_package.js @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The package that replaces the resource on the server. + */ + // const package = {} + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callUpdatePackage() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.updatePackage(request); + console.log(response); + } + + callUpdatePackage(); + // [END artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_project_settings.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_project_settings.js new file mode 100644 index 00000000000..a74d8d24b72 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_project_settings.js @@ -0,0 +1,64 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The project settings. + */ + // const projectSettings = {} + /** + * Field mask to support partial updates. + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callUpdateProjectSettings() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.updateProjectSettings(request); + console.log(response); + } + + callUpdateProjectSettings(); + // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_repository.js new file mode 100644 index 00000000000..c9017b0da64 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_repository.js @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The repository that replaces the resource on the server. + */ + // const repository = {} + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callUpdateRepository() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.updateRepository(request); + console.log(response); + } + + callUpdateRepository(); + // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_rule.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_rule.js new file mode 100644 index 00000000000..91e95b1fb0f --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_rule.js @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The rule that replaces the resource on the server. + */ + // const rule = {} + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callUpdateRule() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.updateRule(request); + console.log(response); + } + + callUpdateRule(); + // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_tag.js new file mode 100644 index 00000000000..d18f893e356 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_tag.js @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The tag that replaces the resource on the server. + */ + // const tag = {} + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callUpdateTag() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.updateTag(request); + console.log(response); + } + + callUpdateTag(); + // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_v_p_c_s_c_config.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_v_p_c_s_c_config.js new file mode 100644 index 00000000000..3bfb32ef9a9 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_v_p_c_s_c_config.js @@ -0,0 +1,64 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The project config. + */ + // const vpcscConfig = {} + /** + * Field mask to support partial updates. + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callUpdateVPCSCConfig() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.updateVPCSCConfig(request); + console.log(response); + } + + callUpdateVPCSCConfig(); + // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_version.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_version.js new file mode 100644 index 00000000000..ad50d44f239 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_version.js @@ -0,0 +1,67 @@ +// Copyright 2025 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(version) { + // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Version that replaces the resource on the server. + */ + // const version = {} + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callUpdateVersion() { + // Construct request + const request = { + version, + }; + + // Run request + const response = await artifactregistryClient.updateVersion(request); + console.log(response); + } + + callUpdateVersion(); + // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json new file mode 100644 index 00000000000..a8ffbe34418 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json @@ -0,0 +1,2267 @@ +{ + "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": 68, + "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" + }, + { + "name": "order_by", + "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_GetDockerImage_async", + "title": "ArtifactRegistry getDockerImage Sample", + "origin": "API_DEFINITION", + "description": " Gets a docker image.", + "canonical": true, + "file": "artifact_registry.get_docker_image.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDockerImage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.DockerImage", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetDockerImage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImage", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_async", + "title": "ArtifactRegistry listMavenArtifacts Sample", + "origin": "API_DEFINITION", + "description": " Lists maven artifacts.", + "canonical": true, + "file": "artifact_registry.list_maven_artifacts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMavenArtifacts", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListMavenArtifacts", + "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.ListMavenArtifactsResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListMavenArtifacts", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListMavenArtifacts", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_async", + "title": "ArtifactRegistry getMavenArtifact Sample", + "origin": "API_DEFINITION", + "description": " Gets a maven artifact.", + "canonical": true, + "file": "artifact_registry.get_maven_artifact.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMavenArtifact", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetMavenArtifact", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.MavenArtifact", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetMavenArtifact", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetMavenArtifact", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_async", + "title": "ArtifactRegistry listNpmPackages Sample", + "origin": "API_DEFINITION", + "description": " Lists npm packages.", + "canonical": true, + "file": "artifact_registry.list_npm_packages.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListNpmPackages", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListNpmPackages", + "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.ListNpmPackagesResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListNpmPackages", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListNpmPackages", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_async", + "title": "ArtifactRegistry getNpmPackage Sample", + "origin": "API_DEFINITION", + "description": " Gets a npm package.", + "canonical": true, + "file": "artifact_registry.get_npm_package.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetNpmPackage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetNpmPackage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.NpmPackage", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetNpmPackage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetNpmPackage", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_async", + "title": "ArtifactRegistry listPythonPackages Sample", + "origin": "API_DEFINITION", + "description": " Lists python packages.", + "canonical": true, + "file": "artifact_registry.list_python_packages.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPythonPackages", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPythonPackages", + "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.ListPythonPackagesResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListPythonPackages", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPythonPackages", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_async", + "title": "ArtifactRegistry getPythonPackage Sample", + "origin": "API_DEFINITION", + "description": " Gets a python package.", + "canonical": true, + "file": "artifact_registry.get_python_package.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPythonPackage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPythonPackage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.PythonPackage", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetPythonPackage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPythonPackage", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async", + "title": "ArtifactRegistry importAptArtifacts Sample", + "origin": "API_DEFINITION", + "description": " Imports Apt artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.", + "canonical": true, + "file": "artifact_registry.import_apt_artifacts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportAptArtifacts", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifacts", + "async": true, + "parameters": [ + { + "name": "gcs_source", + "type": ".google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ImportAptArtifacts", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifacts", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async", + "title": "ArtifactRegistry importYumArtifacts Sample", + "origin": "API_DEFINITION", + "description": " Imports Yum (RPM) artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.", + "canonical": true, + "file": "artifact_registry.import_yum_artifacts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportYumArtifacts", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifacts", + "async": true, + "parameters": [ + { + "name": "gcs_source", + "type": ".google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ImportYumArtifacts", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifacts", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async", + "title": "ArtifactRegistry listRepositories Sample", + "origin": "API_DEFINITION", + "description": " Lists repositories.", + "canonical": true, + "file": "artifact_registry.list_repositories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "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" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "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": 53, + "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" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async", + "title": "ArtifactRegistry createRepository Sample", + "origin": "API_DEFINITION", + "description": " Creates a repository. The returned Operation will finish once the repository has been created. Its response will be the created Repository.", + "canonical": true, + "file": "artifact_registry.create_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRepository", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepository", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "repository_id", + "type": "TYPE_STRING" + }, + { + "name": "repository", + "type": ".google.devtools.artifactregistry.v1.Repository" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "CreateRepository", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepository", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async", + "title": "ArtifactRegistry updateRepository Sample", + "origin": "API_DEFINITION", + "description": " Updates a repository.", + "canonical": true, + "file": "artifact_registry.update_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateRepository", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepository", + "async": true, + "parameters": [ + { + "name": "repository", + "type": ".google.devtools.artifactregistry.v1.Repository" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Repository", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "UpdateRepository", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepository", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async", + "title": "ArtifactRegistry deleteRepository Sample", + "origin": "API_DEFINITION", + "description": " Deletes a repository and all of its contents. The returned Operation will finish once the repository has been deleted. It will not have any Operation metadata and will return a google.protobuf.Empty response.", + "canonical": true, + "file": "artifact_registry.delete_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteRepository", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeleteRepository", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepository", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async", + "title": "ArtifactRegistry listPackages Sample", + "origin": "API_DEFINITION", + "description": " Lists packages.", + "canonical": true, + "file": "artifact_registry.list_packages.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 101, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPackages", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackages", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.ListPackagesResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListPackages", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackages", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetPackage_async", + "title": "ArtifactRegistry getPackage Sample", + "origin": "API_DEFINITION", + "description": " Gets a package.", + "canonical": true, + "file": "artifact_registry.get_package.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPackage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Package", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetPackage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackage", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async", + "title": "ArtifactRegistry deletePackage Sample", + "origin": "API_DEFINITION", + "description": " Deletes a package and all of its versions and tags. The returned operation will complete once the package has been deleted.", + "canonical": true, + "file": "artifact_registry.delete_package.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePackage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeletePackage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackage", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async", + "title": "ArtifactRegistry listVersions Sample", + "origin": "API_DEFINITION", + "description": " Lists versions.", + "canonical": true, + "file": "artifact_registry.list_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 104, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListVersions", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.devtools.artifactregistry.v1.VersionView" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.ListVersionsResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListVersions", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersions", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async", + "title": "ArtifactRegistry getVersion Sample", + "origin": "API_DEFINITION", + "description": " Gets a version", + "canonical": true, + "file": "artifact_registry.get_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVersion", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.devtools.artifactregistry.v1.VersionView" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Version", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetVersion", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersion", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async", + "title": "ArtifactRegistry deleteVersion Sample", + "origin": "API_DEFINITION", + "description": " Deletes a version and all of its content. The returned operation will complete once the version has been deleted.", + "canonical": true, + "file": "artifact_registry.delete_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteVersion", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeleteVersion", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersion", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_async", + "title": "ArtifactRegistry batchDeleteVersions Sample", + "origin": "API_DEFINITION", + "description": " Deletes multiple versions across a repository. The returned operation will complete once the versions have been deleted.", + "canonical": true, + "file": "artifact_registry.batch_delete_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchDeleteVersions", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.BatchDeleteVersions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "names", + "type": "TYPE_STRING[]" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "BatchDeleteVersions", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.BatchDeleteVersions", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_async", + "title": "ArtifactRegistry updateVersion Sample", + "origin": "API_DEFINITION", + "description": " Updates a version.", + "canonical": true, + "file": "artifact_registry.update_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateVersion", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVersion", + "async": true, + "parameters": [ + { + "name": "version", + "type": ".google.devtools.artifactregistry.v1.Version" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Version", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "UpdateVersion", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVersion", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async", + "title": "ArtifactRegistry listFiles Sample", + "origin": "API_DEFINITION", + "description": " Lists files.", + "canonical": true, + "file": "artifact_registry.list_files.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 105, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFiles", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListFiles", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.ListFilesResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListFiles", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListFiles", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetFile_async", + "title": "ArtifactRegistry getFile Sample", + "origin": "API_DEFINITION", + "description": " Gets a file.", + "canonical": true, + "file": "artifact_registry.get_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetFile", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetFile", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.File", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetFile", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetFile", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_async", + "title": "ArtifactRegistry deleteFile Sample", + "origin": "API_DEFINITION", + "description": " Deletes a file and all of its content. It is only allowed on generic repositories. The returned operation will complete once the file has been deleted.", + "canonical": true, + "file": "artifact_registry.delete_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteFile", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteFile", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeleteFile", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteFile", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_async", + "title": "ArtifactRegistry updateFile Sample", + "origin": "API_DEFINITION", + "description": " Updates a file.", + "canonical": true, + "file": "artifact_registry.update_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateFile", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateFile", + "async": true, + "parameters": [ + { + "name": "file", + "type": ".google.devtools.artifactregistry.v1.File" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.File", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "UpdateFile", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateFile", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListTags_async", + "title": "ArtifactRegistry listTags Sample", + "origin": "API_DEFINITION", + "description": " Lists tags.", + "canonical": true, + "file": "artifact_registry.list_tags.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTags", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListTags", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.ListTagsResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListTags", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListTags", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetTag_async", + "title": "ArtifactRegistry getTag Sample", + "origin": "API_DEFINITION", + "description": " Gets a tag.", + "canonical": true, + "file": "artifact_registry.get_tag.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetTag", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Tag", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetTag", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async", + "title": "ArtifactRegistry createTag Sample", + "origin": "API_DEFINITION", + "description": " Creates a tag.", + "canonical": true, + "file": "artifact_registry.create_tag.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTag", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "tag_id", + "type": "TYPE_STRING" + }, + { + "name": "tag", + "type": ".google.devtools.artifactregistry.v1.Tag" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Tag", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "CreateTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTag", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async", + "title": "ArtifactRegistry updateTag Sample", + "origin": "API_DEFINITION", + "description": " Updates a tag.", + "canonical": true, + "file": "artifact_registry.update_tag.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTag", + "async": true, + "parameters": [ + { + "name": "tag", + "type": ".google.devtools.artifactregistry.v1.Tag" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Tag", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "UpdateTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTag", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async", + "title": "ArtifactRegistry deleteTag Sample", + "origin": "API_DEFINITION", + "description": " Deletes a tag.", + "canonical": true, + "file": "artifact_registry.delete_tag.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTag", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeleteTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTag", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRule_async", + "title": "ArtifactRegistry createRule Sample", + "origin": "API_DEFINITION", + "description": " Creates a rule.", + "canonical": true, + "file": "artifact_registry.create_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRule", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRule", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "rule_id", + "type": "TYPE_STRING" + }, + { + "name": "rule", + "type": ".google.devtools.artifactregistry.v1.Rule" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Rule", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "CreateRule", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRule", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListRules_async", + "title": "ArtifactRegistry listRules Sample", + "origin": "API_DEFINITION", + "description": " Lists rules.", + "canonical": true, + "file": "artifact_registry.list_rules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRules", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRules", + "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.ListRulesResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListRules", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRules", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetRule_async", + "title": "ArtifactRegistry getRule Sample", + "origin": "API_DEFINITION", + "description": " Gets a rule.", + "canonical": true, + "file": "artifact_registry.get_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRule", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Rule", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetRule", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRule", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_async", + "title": "ArtifactRegistry updateRule Sample", + "origin": "API_DEFINITION", + "description": " Updates a rule.", + "canonical": true, + "file": "artifact_registry.update_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateRule", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRule", + "async": true, + "parameters": [ + { + "name": "rule", + "type": ".google.devtools.artifactregistry.v1.Rule" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Rule", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "UpdateRule", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRule", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_async", + "title": "ArtifactRegistry deleteRule Sample", + "origin": "API_DEFINITION", + "description": " Deletes a rule.", + "canonical": true, + "file": "artifact_registry.delete_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteRule", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeleteRule", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRule", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async", + "title": "ArtifactRegistry setIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Updates the IAM policy for a given resource.", + "canonical": true, + "file": "artifact_registry.set_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "policy", + "type": ".google.iam.v1.Policy" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicy", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async", + "title": "ArtifactRegistry getIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets the IAM policy for a given resource.", + "canonical": true, + "file": "artifact_registry.get_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "options", + "type": ".google.iam.v1.GetPolicyOptions" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicy", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async", + "title": "ArtifactRegistry testIamPermissions Sample", + "origin": "API_DEFINITION", + "description": " Tests if the caller has a list of permissions on a resource.", + "canonical": true, + "file": "artifact_registry.test_iam_permissions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissions", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "permissions", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.iam.v1.TestIamPermissionsResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissions", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_async", + "title": "ArtifactRegistry getProjectSettings Sample", + "origin": "API_DEFINITION", + "description": " Retrieves the Settings for the Project.", + "canonical": true, + "file": "artifact_registry.get_project_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetProjectSettings", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.ProjectSettings", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetProjectSettings", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettings", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async", + "title": "ArtifactRegistry updateProjectSettings Sample", + "origin": "API_DEFINITION", + "description": " Updates the Settings for the Project.", + "canonical": true, + "file": "artifact_registry.update_project_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateProjectSettings", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettings", + "async": true, + "parameters": [ + { + "name": "project_settings", + "type": ".google.devtools.artifactregistry.v1.ProjectSettings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.ProjectSettings", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "UpdateProjectSettings", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettings", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_async", + "title": "ArtifactRegistry getVPCSCConfig Sample", + "origin": "API_DEFINITION", + "description": " Retrieves the VPCSC Config for the Project.", + "canonical": true, + "file": "artifact_registry.get_v_p_c_s_c_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVPCSCConfig", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVPCSCConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.VPCSCConfig", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetVPCSCConfig", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVPCSCConfig", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_async", + "title": "ArtifactRegistry updateVPCSCConfig Sample", + "origin": "API_DEFINITION", + "description": " Updates the VPCSC Config for the Project.", + "canonical": true, + "file": "artifact_registry.update_v_p_c_s_c_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateVPCSCConfig", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVPCSCConfig", + "async": true, + "parameters": [ + { + "name": "vpcsc_config", + "type": ".google.devtools.artifactregistry.v1.VPCSCConfig" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.VPCSCConfig", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "UpdateVPCSCConfig", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVPCSCConfig", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_async", + "title": "ArtifactRegistry updatePackage Sample", + "origin": "API_DEFINITION", + "description": " Updates a package.", + "canonical": true, + "file": "artifact_registry.update_package.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdatePackage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdatePackage", + "async": true, + "parameters": [ + { + "name": "package", + "type": ".google.devtools.artifactregistry.v1.Package" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Package", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "UpdatePackage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdatePackage", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_async", + "title": "ArtifactRegistry listAttachments Sample", + "origin": "API_DEFINITION", + "description": " Lists attachments.", + "canonical": true, + "file": "artifact_registry.list_attachments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAttachments", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListAttachments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.ListAttachmentsResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListAttachments", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListAttachments", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_async", + "title": "ArtifactRegistry getAttachment Sample", + "origin": "API_DEFINITION", + "description": " Gets an attachment.", + "canonical": true, + "file": "artifact_registry.get_attachment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAttachment", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetAttachment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Attachment", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetAttachment", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetAttachment", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_async", + "title": "ArtifactRegistry createAttachment Sample", + "origin": "API_DEFINITION", + "description": " Creates an attachment. The returned Operation will finish once the attachment has been created. Its response will be the created attachment.", + "canonical": true, + "file": "artifact_registry.create_attachment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAttachment", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateAttachment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "attachment_id", + "type": "TYPE_STRING" + }, + { + "name": "attachment", + "type": ".google.devtools.artifactregistry.v1.Attachment" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "CreateAttachment", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateAttachment", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_async", + "title": "ArtifactRegistry deleteAttachment Sample", + "origin": "API_DEFINITION", + "description": " Deletes an attachment. The returned Operation will finish once the attachments has been deleted. It will not have any Operation metadata and will return a `google.protobuf.Empty` response.", + "canonical": true, + "file": "artifact_registry.delete_attachment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAttachment", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteAttachment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeleteAttachment", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteAttachment", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_async", + "title": "ArtifactRegistry exportArtifact Sample", + "origin": "API_DEFINITION", + "description": " Exports an artifact to a Cloud Storage bucket.", + "canonical": true, + "file": "artifact_registry.export_artifact.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExportArtifact", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ExportArtifact", + "async": true, + "parameters": [ + { + "name": "source_version", + "type": "TYPE_STRING" + }, + { + "name": "source_tag", + "type": "TYPE_STRING" + }, + { + "name": "gcs_path", + "type": "TYPE_STRING" + }, + { + "name": "repository", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ExportArtifact", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ExportArtifact", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_repository.js new file mode 100644 index 00000000000..30fec0fcc3a --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_repository.js @@ -0,0 +1,70 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent resource where the repository will be created. + */ + // const parent = 'abc123' + /** + * The repository id to use for this repository. + */ + // const repositoryId = 'abc123' + /** + * The repository to be created. + */ + // const repository = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callCreateRepository() { + // Construct request + const request = { + parent, + }; + + // Run request + const [operation] = await artifactregistryClient.createRepository(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateRepository(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_tag.js new file mode 100644 index 00000000000..b89ebda0596 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_tag.js @@ -0,0 +1,68 @@ +// Copyright 2025 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_CreateTag_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the parent resource where the tag will be created. + */ + // const parent = 'abc123' + /** + * The tag id to use for this repository. + */ + // const tagId = 'abc123' + /** + * The tag to be created. + */ + // const tag = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callCreateTag() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.createTag(request); + console.log(response); + } + + callCreateTag(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_package.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_package.js new file mode 100644 index 00000000000..5d76d786420 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_package.js @@ -0,0 +1,61 @@ +// Copyright 2025 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_DeletePackage_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the package to delete. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeletePackage() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await artifactregistryClient.deletePackage(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeletePackage(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_repository.js new file mode 100644 index 00000000000..c8114b1ca80 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_repository.js @@ -0,0 +1,62 @@ +// Copyright 2025 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_DeleteRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the repository to delete. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeleteRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await artifactregistryClient.deleteRepository(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteRepository(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_tag.js new file mode 100644 index 00000000000..9978d2c366f --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_tag.js @@ -0,0 +1,60 @@ +// Copyright 2025 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_DeleteTag_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the tag to delete. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeleteTag() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.deleteTag(request); + console.log(response); + } + + callDeleteTag(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_version.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_version.js new file mode 100644 index 00000000000..33ce3aaf395 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_version.js @@ -0,0 +1,66 @@ +// Copyright 2025 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_DeleteVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the version to delete. + */ + // const name = 'abc123' + /** + * By default, a version that is tagged may not be deleted. If force=true, the + * version and any tags pointing to the version are deleted. + */ + // const force = true + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeleteVersion() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await artifactregistryClient.deleteVersion(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteVersion(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_file.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_file.js new file mode 100644 index 00000000000..7cbd738db0d --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_file.js @@ -0,0 +1,60 @@ +// Copyright 2025 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_GetFile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the file to retrieve. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetFile() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.getFile(request); + console.log(response); + } + + callGetFile(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_iam_policy.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_iam_policy.js new file mode 100644 index 00000000000..30fed02a494 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource) { + // [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + */ + // const options = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetIamPolicy() { + // Construct request + const request = { + resource, + }; + + // Run request + const response = await artifactregistryClient.getIamPolicy(request); + console.log(response); + } + + callGetIamPolicy(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_package.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_package.js new file mode 100644 index 00000000000..135f58689c4 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_package.js @@ -0,0 +1,60 @@ +// Copyright 2025 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_GetPackage_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the package to retrieve. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetPackage() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.getPackage(request); + console.log(response); + } + + callGetPackage(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_project_settings.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_project_settings.js new file mode 100644 index 00000000000..c77c05f4db9 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_project_settings.js @@ -0,0 +1,61 @@ +// Copyright 2025 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] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the 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/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_repository.js new file mode 100644 index 00000000000..5989b7a273b --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_repository.js @@ -0,0 +1,61 @@ +// Copyright 2025 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_GetRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the repository to retrieve. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getRepository(request); + console.log(response); + } + + callGetRepository(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_tag.js new file mode 100644 index 00000000000..1770bc9f358 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_tag.js @@ -0,0 +1,60 @@ +// Copyright 2025 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_GetTag_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the tag to retrieve. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetTag() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.getTag(request); + console.log(response); + } + + callGetTag(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_version.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_version.js new file mode 100644 index 00000000000..12de2aac873 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_version.js @@ -0,0 +1,64 @@ +// Copyright 2025 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_GetVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the version to retrieve. + */ + // const name = 'abc123' + /** + * The view that should be returned in the response. + */ + // const view = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetVersion() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.getVersion(request); + console.log(response); + } + + callGetVersion(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_apt_artifacts.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_apt_artifacts.js new file mode 100644 index 00000000000..2ddbd0e6671 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_apt_artifacts.js @@ -0,0 +1,65 @@ +// Copyright 2025 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] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * 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/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_yum_artifacts.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_yum_artifacts.js new file mode 100644 index 00000000000..79b826fdfd5 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_yum_artifacts.js @@ -0,0 +1,65 @@ +// Copyright 2025 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] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * 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/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_files.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_files.js new file mode 100644 index 00000000000..a721f756cb5 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_files.js @@ -0,0 +1,83 @@ +// Copyright 2025 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_ListFiles_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the repository whose files will be listed. For example: + * "projects/p1/locations/us-central1/repositories/repo1 + */ + // const parent = 'abc123' + /** + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * * `name` + * * `owner` + * An example of using a filter: + * * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + * ID starting with "a/b/". + * * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + * Files owned by the version `1.0` in package `pkg1`. + */ + // const filter = 'abc123' + /** + * The maximum number of files to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListFiles() { + // Construct request + const request = { + }; + + // Run request + const iterable = artifactregistryClient.listFilesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFiles(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_packages.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_packages.js new file mode 100644 index 00000000000..b663fc504a6 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_packages.js @@ -0,0 +1,71 @@ +// Copyright 2025 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_ListPackages_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the parent resource whose packages will be listed. + */ + // const parent = 'abc123' + /** + * The maximum number of packages to return. + * Maximum page size is 10,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListPackages() { + // Construct request + const request = { + }; + + // Run request + const iterable = artifactregistryClient.listPackagesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPackages(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_repositories.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_repositories.js new file mode 100644 index 00000000000..b9cd6340bc5 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_repositories.js @@ -0,0 +1,71 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent resource whose repositories will be listed. + */ + // const parent = 'abc123' + /** + * The maximum number of repositories to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListRepositories() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = artifactregistryClient.listRepositoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRepositories(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_tags.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_tags.js new file mode 100644 index 00000000000..eb53062c293 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_tags.js @@ -0,0 +1,79 @@ +// Copyright 2025 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_ListTags_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the parent resource whose tags will be listed. + */ + // const parent = 'abc123' + /** + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * * `version` + * An example of using a filter: + * * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + * --> Tags that are applied to the version `1.0` in package `pkg1`. + */ + // const filter = 'abc123' + /** + * The maximum number of tags to return. Maximum page size is 10,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListTags() { + // Construct request + const request = { + }; + + // Run request + const iterable = artifactregistryClient.listTagsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListTags(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_versions.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_versions.js new file mode 100644 index 00000000000..2ddb1a887e0 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_versions.js @@ -0,0 +1,78 @@ +// Copyright 2025 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_ListVersions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the parent resource whose versions will be listed. + */ + // const parent = 'abc123' + /** + * The maximum number of versions to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + /** + * The view that should be returned in the response. + */ + // const view = {} + /** + * Optional. The field to order the results by. + */ + // const orderBy = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListVersions() { + // Construct request + const request = { + }; + + // Run request + const iterable = artifactregistryClient.listVersionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListVersions(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.set_iam_policy.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.set_iam_policy.js new file mode 100644 index 00000000000..67410fb8ab4 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, policy) { + // [START artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + */ + // const policy = {} + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * `paths: "bindings, etag"` + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callSetIamPolicy() { + // Construct request + const request = { + resource, + policy, + }; + + // Run request + const response = await artifactregistryClient.setIamPolicy(request); + console.log(response); + } + + callSetIamPolicy(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js new file mode 100644 index 00000000000..09dfb247caa --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js @@ -0,0 +1,70 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, permissions) { + // [START artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). + */ + // const permissions = ['abc','def'] + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callTestIamPermissions() { + // Construct request + const request = { + resource, + permissions, + }; + + // Run request + const response = await artifactregistryClient.testIamPermissions(request); + console.log(response); + } + + callTestIamPermissions(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_project_settings.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_project_settings.js new file mode 100644 index 00000000000..62d4b45c5e1 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_project_settings.js @@ -0,0 +1,64 @@ +// Copyright 2025 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] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * 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/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_repository.js new file mode 100644 index 00000000000..dc3a1818b47 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_repository.js @@ -0,0 +1,66 @@ +// Copyright 2025 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_UpdateRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The repository that replaces the resource on the server. + */ + // const repository = {} + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callUpdateRepository() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.updateRepository(request); + console.log(response); + } + + callUpdateRepository(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_tag.js new file mode 100644 index 00000000000..209ff76b8cb --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_tag.js @@ -0,0 +1,66 @@ +// Copyright 2025 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_UpdateTag_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The tag that replaces the resource on the server. + */ + // const tag = {} + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callUpdateTag() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.updateTag(request); + console.log(response); + } + + callUpdateTag(); + // [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json new file mode 100644 index 00000000000..e51d58b7b1b --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json @@ -0,0 +1,1131 @@ +{ + "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": 57, + "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": 57, + "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": 63, + "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": 53, + "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": 62, + "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": 58, + "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": 54, + "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": 63, + "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": 52, + "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": 53, + "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": 70, + "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": 56, + "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": 58, + "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": 75, + "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": 52, + "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": 71, + "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": 52, + "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": 60, + "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": 58, + "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": 52, + "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": 69, + "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" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "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": 59, + "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": 62, + "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": 53, + "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": 56, + "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/owl-bot-staging/google-devtools-artifactregistry/src/index.ts b/owl-bot-staging/google-devtools-artifactregistry/src/index.ts new file mode 100644 index 00000000000..8348feb7be0 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/src/index.ts @@ -0,0 +1,28 @@ +// Copyright 2025 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 synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; +import * as v1beta2 from './v1beta2'; + +const ArtifactRegistryClient = v1.ArtifactRegistryClient; +type ArtifactRegistryClient = v1.ArtifactRegistryClient; + +export {v1, v1beta2, ArtifactRegistryClient}; +export default {v1, v1beta2, ArtifactRegistryClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts b/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts new file mode 100644 index 00000000000..18a7ea0ae36 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts @@ -0,0 +1,8608 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/artifact_registry_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './artifact_registry_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The Artifact Registry API service. + * + * Artifact Registry is an artifact management system for storing artifacts + * from different package management systems. + * + * The resources managed by this API are: + * + * * Repositories, which group packages and their data. + * * Packages, which group versions and their tags. + * * Versions, which are specific forms of a package. + * * Tags, which represent alternative names for versions. + * * Files, which contain content and are optionally associated with a Package + * or Version. + * @class + * @memberof v1 + */ +export class ArtifactRegistryClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('artifact-registry'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + artifactRegistryStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ArtifactRegistryClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ArtifactRegistryClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ArtifactRegistryClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'artifactregistry.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + aptArtifactPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}' + ), + attachmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/attachments/{attachment}' + ), + dockerImagePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}' + ), + filePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/files/{file}' + ), + genericArtifactPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/genericArtifacts/{generic_artifact}' + ), + goModulePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/goModules/{go_module}' + ), + kfpArtifactPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/kfpArtifacts/{kfp_artifact}' + ), + mavenArtifactPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}' + ), + npmPackagePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}' + ), + packagePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/packages/{package}' + ), + projectSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/projectSettings' + ), + pythonPackagePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}' + ), + repositoryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}' + ), + rulePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/rules/{rule}' + ), + 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}' + ), + vpcscConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/vpcscConfig' + ), + yumArtifactPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listDockerImages: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dockerImages'), + listMavenArtifacts: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'mavenArtifacts'), + listNpmPackages: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'npmPackages'), + listPythonPackages: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'pythonPackages'), + listRepositories: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'repositories'), + listPackages: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'packages'), + listVersions: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'versions'), + listFiles: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'files'), + listTags: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'tags'), + listRules: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'rules'), + listAttachments: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'attachments') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const importAptArtifactsResponse = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.ImportAptArtifactsResponse') as gax.protobuf.Type; + const importAptArtifactsMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata') as gax.protobuf.Type; + const importYumArtifactsResponse = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.ImportYumArtifactsResponse') as gax.protobuf.Type; + const importYumArtifactsMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata') as gax.protobuf.Type; + const createRepositoryResponse = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.Repository') as gax.protobuf.Type; + const createRepositoryMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.OperationMetadata') as gax.protobuf.Type; + const deleteRepositoryResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteRepositoryMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.OperationMetadata') as gax.protobuf.Type; + const deletePackageResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deletePackageMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.OperationMetadata') as gax.protobuf.Type; + const deleteVersionResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteVersionMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.OperationMetadata') as gax.protobuf.Type; + const batchDeleteVersionsResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const batchDeleteVersionsMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata') as gax.protobuf.Type; + const deleteFileResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteFileMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.OperationMetadata') as gax.protobuf.Type; + const createAttachmentResponse = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.Attachment') as gax.protobuf.Type; + const createAttachmentMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.OperationMetadata') as gax.protobuf.Type; + const deleteAttachmentResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteAttachmentMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.OperationMetadata') as gax.protobuf.Type; + const exportArtifactResponse = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.ExportArtifactResponse') as gax.protobuf.Type; + const exportArtifactMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.ExportArtifactMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + importAptArtifacts: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + importAptArtifactsResponse.decode.bind(importAptArtifactsResponse), + importAptArtifactsMetadata.decode.bind(importAptArtifactsMetadata)), + importYumArtifacts: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + importYumArtifactsResponse.decode.bind(importYumArtifactsResponse), + importYumArtifactsMetadata.decode.bind(importYumArtifactsMetadata)), + createRepository: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createRepositoryResponse.decode.bind(createRepositoryResponse), + createRepositoryMetadata.decode.bind(createRepositoryMetadata)), + deleteRepository: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteRepositoryResponse.decode.bind(deleteRepositoryResponse), + deleteRepositoryMetadata.decode.bind(deleteRepositoryMetadata)), + deletePackage: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deletePackageResponse.decode.bind(deletePackageResponse), + deletePackageMetadata.decode.bind(deletePackageMetadata)), + deleteVersion: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteVersionResponse.decode.bind(deleteVersionResponse), + deleteVersionMetadata.decode.bind(deleteVersionMetadata)), + batchDeleteVersions: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + batchDeleteVersionsResponse.decode.bind(batchDeleteVersionsResponse), + batchDeleteVersionsMetadata.decode.bind(batchDeleteVersionsMetadata)), + deleteFile: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteFileResponse.decode.bind(deleteFileResponse), + deleteFileMetadata.decode.bind(deleteFileMetadata)), + createAttachment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAttachmentResponse.decode.bind(createAttachmentResponse), + createAttachmentMetadata.decode.bind(createAttachmentMetadata)), + deleteAttachment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAttachmentResponse.decode.bind(deleteAttachmentResponse), + deleteAttachmentMetadata.decode.bind(deleteAttachmentMetadata)), + exportArtifact: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + exportArtifactResponse.decode.bind(exportArtifactResponse), + exportArtifactMetadata.decode.bind(exportArtifactMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.devtools.artifactregistry.v1.ArtifactRegistry', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.artifactRegistryStub) { + return this.artifactRegistryStub; + } + + // Put together the "service stub" for + // google.devtools.artifactregistry.v1.ArtifactRegistry. + this.artifactRegistryStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.devtools.artifactregistry.v1.ArtifactRegistry') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.devtools.artifactregistry.v1.ArtifactRegistry, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const artifactRegistryStubMethods = + ['listDockerImages', 'getDockerImage', 'listMavenArtifacts', 'getMavenArtifact', 'listNpmPackages', 'getNpmPackage', 'listPythonPackages', 'getPythonPackage', 'importAptArtifacts', 'importYumArtifacts', 'listRepositories', 'getRepository', 'createRepository', 'updateRepository', 'deleteRepository', 'listPackages', 'getPackage', 'deletePackage', 'listVersions', 'getVersion', 'deleteVersion', 'batchDeleteVersions', 'updateVersion', 'listFiles', 'getFile', 'deleteFile', 'updateFile', 'listTags', 'getTag', 'createTag', 'updateTag', 'deleteTag', 'createRule', 'listRules', 'getRule', 'updateRule', 'deleteRule', 'setIamPolicy', 'getIamPolicy', 'testIamPermissions', 'getProjectSettings', 'updateProjectSettings', 'getVpcscConfig', 'updateVpcscConfig', 'updatePackage', 'listAttachments', 'getAttachment', 'createAttachment', 'deleteAttachment', 'exportArtifact']; + for (const methodName of artifactRegistryStubMethods) { + const callPromise = this.artifactRegistryStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.artifactRegistryStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'artifactregistry.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'artifactregistry.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Gets a docker image. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the docker images. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.DockerImage|DockerImage}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_docker_image.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_async + */ + getDockerImage( + request?: protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IDockerImage, + protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|undefined, {}|undefined + ]>; + getDockerImage( + request: protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IDockerImage, + protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|null|undefined, + {}|null|undefined>): void; + getDockerImage( + request: protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IDockerImage, + protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|null|undefined, + {}|null|undefined>): void; + getDockerImage( + request?: protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IDockerImage, + protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IDockerImage, + protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IDockerImage, + protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getDockerImage request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IDockerImage, + protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDockerImage response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getDockerImage(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IDockerImage, + protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|undefined, + {}|undefined + ]) => { + this._log.info('getDockerImage response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets a maven artifact. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the maven artifact. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.MavenArtifact|MavenArtifact}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_maven_artifact.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_async + */ + getMavenArtifact( + request?: protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IMavenArtifact, + protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|undefined, {}|undefined + ]>; + getMavenArtifact( + request: protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IMavenArtifact, + protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|null|undefined, + {}|null|undefined>): void; + getMavenArtifact( + request: protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IMavenArtifact, + protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|null|undefined, + {}|null|undefined>): void; + getMavenArtifact( + request?: protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IMavenArtifact, + protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IMavenArtifact, + protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IMavenArtifact, + protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getMavenArtifact request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IMavenArtifact, + protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMavenArtifact response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getMavenArtifact(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IMavenArtifact, + protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|undefined, + {}|undefined + ]) => { + this._log.info('getMavenArtifact response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets a npm package. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the npm package. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.NpmPackage|NpmPackage}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_npm_package.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_async + */ + getNpmPackage( + request?: protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.INpmPackage, + protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|undefined, {}|undefined + ]>; + getNpmPackage( + request: protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.INpmPackage, + protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|null|undefined, + {}|null|undefined>): void; + getNpmPackage( + request: protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.INpmPackage, + protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|null|undefined, + {}|null|undefined>): void; + getNpmPackage( + request?: protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.INpmPackage, + protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.INpmPackage, + protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.INpmPackage, + protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getNpmPackage request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.INpmPackage, + protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getNpmPackage response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getNpmPackage(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.INpmPackage, + protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|undefined, + {}|undefined + ]) => { + this._log.info('getNpmPackage response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets a python package. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the python package. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.PythonPackage|PythonPackage}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_python_package.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_async + */ + getPythonPackage( + request?: protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IPythonPackage, + protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|undefined, {}|undefined + ]>; + getPythonPackage( + request: protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IPythonPackage, + protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|null|undefined, + {}|null|undefined>): void; + getPythonPackage( + request: protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IPythonPackage, + protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|null|undefined, + {}|null|undefined>): void; + getPythonPackage( + request?: protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IPythonPackage, + protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IPythonPackage, + protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IPythonPackage, + protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getPythonPackage request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IPythonPackage, + protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getPythonPackage response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getPythonPackage(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IPythonPackage, + protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|undefined, + {}|undefined + ]) => { + this._log.info('getPythonPackage response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets a repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * 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. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Repository|Repository}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_repository.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetRepository_async + */ + getRepository( + request?: protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|undefined, {}|undefined + ]>; + getRepository( + request: protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|null|undefined, + {}|null|undefined>): void; + getRepository( + request: protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|null|undefined, + {}|null|undefined>): void; + getRepository( + request?: protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getRepository request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getRepository response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getRepository(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|undefined, + {}|undefined + ]) => { + this._log.info('getRepository response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates a repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1.Repository} request.repository + * The repository that replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Repository|Repository}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.update_repository.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async + */ + updateRepository( + request?: protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|undefined, {}|undefined + ]>; + updateRepository( + request: protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|null|undefined, + {}|null|undefined>): void; + updateRepository( + request: protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|null|undefined, + {}|null|undefined>): void; + updateRepository( + request?: protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'repository.name': request.repository!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateRepository request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateRepository response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateRepository(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateRepository response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets a package. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the package to retrieve. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Package|Package}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_package.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetPackage_async + */ + getPackage( + request?: protos.google.devtools.artifactregistry.v1.IGetPackageRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IGetPackageRequest|undefined, {}|undefined + ]>; + getPackage( + request: protos.google.devtools.artifactregistry.v1.IGetPackageRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IGetPackageRequest|null|undefined, + {}|null|undefined>): void; + getPackage( + request: protos.google.devtools.artifactregistry.v1.IGetPackageRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IGetPackageRequest|null|undefined, + {}|null|undefined>): void; + getPackage( + request?: protos.google.devtools.artifactregistry.v1.IGetPackageRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IGetPackageRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IGetPackageRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IGetPackageRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getPackage request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IGetPackageRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getPackage response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getPackage(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IGetPackageRequest|undefined, + {}|undefined + ]) => { + this._log.info('getPackage response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets a version + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the version to retrieve. + * @param {google.devtools.artifactregistry.v1.VersionView} request.view + * The view that should be returned in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Version|Version}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_version.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async + */ + getVersion( + request?: protos.google.devtools.artifactregistry.v1.IGetVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IGetVersionRequest|undefined, {}|undefined + ]>; + getVersion( + request: protos.google.devtools.artifactregistry.v1.IGetVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>): void; + getVersion( + request: protos.google.devtools.artifactregistry.v1.IGetVersionRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>): void; + getVersion( + request?: protos.google.devtools.artifactregistry.v1.IGetVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IGetVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getVersion request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IGetVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('getVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates a version. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1.Version} request.version + * Required. The Version that replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Version|Version}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.update_version.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_async + */ + updateVersion( + request?: protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|undefined, {}|undefined + ]>; + updateVersion( + request: protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|null|undefined, + {}|null|undefined>): void; + updateVersion( + request: protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|null|undefined, + {}|null|undefined>): void; + updateVersion( + request?: protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'version.name': request.version!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateVersion request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets a file. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the file to retrieve. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.File|File}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_file.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetFile_async + */ + getFile( + request?: protos.google.devtools.artifactregistry.v1.IGetFileRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IGetFileRequest|undefined, {}|undefined + ]>; + getFile( + request: protos.google.devtools.artifactregistry.v1.IGetFileRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IGetFileRequest|null|undefined, + {}|null|undefined>): void; + getFile( + request: protos.google.devtools.artifactregistry.v1.IGetFileRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IGetFileRequest|null|undefined, + {}|null|undefined>): void; + getFile( + request?: protos.google.devtools.artifactregistry.v1.IGetFileRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IGetFileRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IGetFileRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IGetFileRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getFile request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IGetFileRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getFile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getFile(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IGetFileRequest|undefined, + {}|undefined + ]) => { + this._log.info('getFile response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates a file. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1.File} request.file + * Required. The File that replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.File|File}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.update_file.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_async + */ + updateFile( + request?: protos.google.devtools.artifactregistry.v1.IUpdateFileRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|undefined, {}|undefined + ]>; + updateFile( + request: protos.google.devtools.artifactregistry.v1.IUpdateFileRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|null|undefined, + {}|null|undefined>): void; + updateFile( + request: protos.google.devtools.artifactregistry.v1.IUpdateFileRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|null|undefined, + {}|null|undefined>): void; + updateFile( + request?: protos.google.devtools.artifactregistry.v1.IUpdateFileRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'file.name': request.file!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateFile request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateFile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateFile(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateFile response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets a tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the tag to retrieve. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Tag|Tag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_tag.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetTag_async + */ + getTag( + request?: protos.google.devtools.artifactregistry.v1.IGetTagRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IGetTagRequest|undefined, {}|undefined + ]>; + getTag( + request: protos.google.devtools.artifactregistry.v1.IGetTagRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IGetTagRequest|null|undefined, + {}|null|undefined>): void; + getTag( + request: protos.google.devtools.artifactregistry.v1.IGetTagRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IGetTagRequest|null|undefined, + {}|null|undefined>): void; + getTag( + request?: protos.google.devtools.artifactregistry.v1.IGetTagRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IGetTagRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IGetTagRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IGetTagRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getTag request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IGetTagRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getTag response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getTag(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IGetTagRequest|undefined, + {}|undefined + ]) => { + this._log.info('getTag response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Creates a tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource where the tag will be created. + * @param {string} request.tagId + * The tag id to use for this repository. + * @param {google.devtools.artifactregistry.v1.Tag} request.tag + * The tag to be created. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Tag|Tag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.create_tag.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async + */ + createTag( + request?: protos.google.devtools.artifactregistry.v1.ICreateTagRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.ICreateTagRequest|undefined, {}|undefined + ]>; + createTag( + request: protos.google.devtools.artifactregistry.v1.ICreateTagRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.ICreateTagRequest|null|undefined, + {}|null|undefined>): void; + createTag( + request: protos.google.devtools.artifactregistry.v1.ICreateTagRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.ICreateTagRequest|null|undefined, + {}|null|undefined>): void; + createTag( + request?: protos.google.devtools.artifactregistry.v1.ICreateTagRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.ICreateTagRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.ICreateTagRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.ICreateTagRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createTag request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.ICreateTagRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createTag response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createTag(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.ICreateTagRequest|undefined, + {}|undefined + ]) => { + this._log.info('createTag response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates a tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1.Tag} request.tag + * The tag that replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Tag|Tag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.update_tag.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async + */ + updateTag( + request?: protos.google.devtools.artifactregistry.v1.IUpdateTagRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|undefined, {}|undefined + ]>; + updateTag( + request: protos.google.devtools.artifactregistry.v1.IUpdateTagRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|null|undefined, + {}|null|undefined>): void; + updateTag( + request: protos.google.devtools.artifactregistry.v1.IUpdateTagRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|null|undefined, + {}|null|undefined>): void; + updateTag( + request?: protos.google.devtools.artifactregistry.v1.IUpdateTagRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'tag.name': request.tag!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateTag request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateTag response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateTag(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateTag response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deletes a tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the tag to delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_tag.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async + */ + deleteTag( + request?: protos.google.devtools.artifactregistry.v1.IDeleteTagRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|undefined, {}|undefined + ]>; + deleteTag( + request: protos.google.devtools.artifactregistry.v1.IDeleteTagRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|null|undefined, + {}|null|undefined>): void; + deleteTag( + request: protos.google.devtools.artifactregistry.v1.IDeleteTagRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|null|undefined, + {}|null|undefined>): void; + deleteTag( + request?: protos.google.devtools.artifactregistry.v1.IDeleteTagRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteTag request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteTag response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteTag(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteTag response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Creates a rule. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource where the rule will be created. + * @param {string} request.ruleId + * The rule id to use for this repository. + * @param {google.devtools.artifactregistry.v1.Rule} request.rule + * The rule to be created. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Rule|Rule}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.create_rule.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateRule_async + */ + createRule( + request?: protos.google.devtools.artifactregistry.v1.ICreateRuleRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|undefined, {}|undefined + ]>; + createRule( + request: protos.google.devtools.artifactregistry.v1.ICreateRuleRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|null|undefined, + {}|null|undefined>): void; + createRule( + request: protos.google.devtools.artifactregistry.v1.ICreateRuleRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|null|undefined, + {}|null|undefined>): void; + createRule( + request?: protos.google.devtools.artifactregistry.v1.ICreateRuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createRule request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createRule response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createRule(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|undefined, + {}|undefined + ]) => { + this._log.info('createRule response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets a rule. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the rule to retrieve. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Rule|Rule}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_rule.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetRule_async + */ + getRule( + request?: protos.google.devtools.artifactregistry.v1.IGetRuleRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IGetRuleRequest|undefined, {}|undefined + ]>; + getRule( + request: protos.google.devtools.artifactregistry.v1.IGetRuleRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IGetRuleRequest|null|undefined, + {}|null|undefined>): void; + getRule( + request: protos.google.devtools.artifactregistry.v1.IGetRuleRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IGetRuleRequest|null|undefined, + {}|null|undefined>): void; + getRule( + request?: protos.google.devtools.artifactregistry.v1.IGetRuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IGetRuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IGetRuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IGetRuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getRule request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IGetRuleRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getRule response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getRule(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IGetRuleRequest|undefined, + {}|undefined + ]) => { + this._log.info('getRule response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates a rule. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1.Rule} request.rule + * The rule that replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Rule|Rule}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.update_rule.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_async + */ + updateRule( + request?: protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|undefined, {}|undefined + ]>; + updateRule( + request: protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|null|undefined, + {}|null|undefined>): void; + updateRule( + request: protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|null|undefined, + {}|null|undefined>): void; + updateRule( + request?: protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'rule.name': request.rule!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateRule request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateRule response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateRule(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IRule, + protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateRule response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deletes a rule. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the rule to delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_rule.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_async + */ + deleteRule( + request?: protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|undefined, {}|undefined + ]>; + deleteRule( + request: protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|null|undefined, + {}|null|undefined>): void; + deleteRule( + request: protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|null|undefined, + {}|null|undefined>): void; + deleteRule( + request?: protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteRule request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteRule response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteRule(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteRule response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates the IAM policy for a given resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.Policy} request.policy + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param {google.protobuf.FieldMask} request.updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.set_iam_policy.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async + */ + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined + ]>; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'resource': request.resource ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('setIamPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('setIamPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.setIamPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('setIamPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets the IAM policy for a given resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.GetPolicyOptions} request.options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_iam_policy.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async + */ + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined + ]>; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'resource': request.resource ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getIamPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getIamPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getIamPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('getIamPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Tests if the caller has a list of permissions on a resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.test_iam_permissions.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async + */ + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + options?: CallOptions): + Promise<[ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined + ]>; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): void; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): void; + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'resource': request.resource ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('testIamPermissions request %j', request); + const wrappedCallback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('testIamPermissions response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.testIamPermissions(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|undefined, + {}|undefined + ]) => { + this._log.info('testIamPermissions response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * 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 {@link protos.google.devtools.artifactregistry.v1.ProjectSettings|ProjectSettings}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_project_settings.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_async + */ + getProjectSettings( + request?: protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|undefined, {}|undefined + ]>; + getProjectSettings( + request: protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|null|undefined, + {}|null|undefined>): void; + getProjectSettings( + request: protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|null|undefined, + {}|null|undefined>): void; + getProjectSettings( + request?: protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getProjectSettings request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getProjectSettings response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getProjectSettings(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|undefined, + {}|undefined + ]) => { + this._log.info('getProjectSettings response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates the Settings for the Project. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1.ProjectSettings} request.projectSettings + * The project settings. + * @param {google.protobuf.FieldMask} request.updateMask + * Field mask to support partial updates. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.ProjectSettings|ProjectSettings}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.update_project_settings.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async + */ + updateProjectSettings( + request?: protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|undefined, {}|undefined + ]>; + updateProjectSettings( + request: protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|null|undefined, + {}|null|undefined>): void; + updateProjectSettings( + request: protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|null|undefined, + {}|null|undefined>): void; + updateProjectSettings( + request?: protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'project_settings.name': request.projectSettings!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateProjectSettings request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateProjectSettings response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateProjectSettings(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IProjectSettings, + protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateProjectSettings response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves the VPCSC Config for the Project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the VPCSCConfig 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 {@link protos.google.devtools.artifactregistry.v1.VPCSCConfig|VPCSCConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_v_p_c_s_c_config.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_async + */ + getVPCSCConfig( + request?: protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|undefined, {}|undefined + ]>; + getVPCSCConfig( + request: protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|null|undefined, + {}|null|undefined>): void; + getVPCSCConfig( + request: protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|null|undefined, + {}|null|undefined>): void; + getVPCSCConfig( + request?: protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getVPCSCConfig request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getVPCSCConfig response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getVpcscConfig(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|undefined, + {}|undefined + ]) => { + this._log.info('getVPCSCConfig response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates the VPCSC Config for the Project. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1.VPCSCConfig} request.vpcscConfig + * The project config. + * @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 {@link protos.google.devtools.artifactregistry.v1.VPCSCConfig|VPCSCConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.update_v_p_c_s_c_config.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_async + */ + updateVPCSCConfig( + request?: protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|undefined, {}|undefined + ]>; + updateVPCSCConfig( + request: protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|null|undefined, + {}|null|undefined>): void; + updateVPCSCConfig( + request: protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|null|undefined, + {}|null|undefined>): void; + updateVPCSCConfig( + request?: protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'vpcsc_config.name': request.vpcscConfig!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateVPCSCConfig request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateVPCSCConfig response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateVpcscConfig(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IVPCSCConfig, + protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateVPCSCConfig response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates a package. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1.Package} request.package + * The package that replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Package|Package}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.update_package.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_async + */ + updatePackage( + request?: protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|undefined, {}|undefined + ]>; + updatePackage( + request: protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|null|undefined, + {}|null|undefined>): void; + updatePackage( + request: protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|null|undefined, + {}|null|undefined>): void; + updatePackage( + request?: protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'package.name': request.package!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updatePackage request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updatePackage response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updatePackage(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|undefined, + {}|undefined + ]) => { + this._log.info('updatePackage response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets an attachment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the attachment to retrieve. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Attachment|Attachment}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_attachment.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_async + */ + getAttachment( + request?: protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IAttachment, + protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|undefined, {}|undefined + ]>; + getAttachment( + request: protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IAttachment, + protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|null|undefined, + {}|null|undefined>): void; + getAttachment( + request: protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IAttachment, + protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|null|undefined, + {}|null|undefined>): void; + getAttachment( + request?: protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1.IAttachment, + protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IAttachment, + protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IAttachment, + protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getAttachment request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1.IAttachment, + protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getAttachment response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getAttachment(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1.IAttachment, + protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|undefined, + {}|undefined + ]) => { + this._log.info('getAttachment response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Imports Apt artifacts. The returned Operation will complete once the + * resources are imported. Package, Version, and File resources are created + * based on the imported artifacts. Imported artifacts that conflict with + * existing resources are ignored. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} request.gcsSource + * Google Cloud Storage location where input content is located. + * @param {string} request.parent + * The name of the parent resource where the artifacts will be imported. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.import_apt_artifacts.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async + */ + importAptArtifacts( + request?: protos.google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + importAptArtifacts( + request: protos.google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + importAptArtifacts( + request: protos.google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + importAptArtifacts( + request?: protos.google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('importAptArtifacts response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('importAptArtifacts request %j', request); + return this.innerApiCalls.importAptArtifacts(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('importAptArtifacts response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.import_apt_artifacts.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async + */ + async checkImportAptArtifactsProgress(name: string): Promise>{ + this._log.info('importAptArtifacts long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importAptArtifacts, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Imports Yum (RPM) artifacts. The returned Operation will complete once the + * resources are imported. Package, Version, and File resources are created + * based on the imported artifacts. Imported artifacts that conflict with + * existing resources are ignored. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} request.gcsSource + * Google Cloud Storage location where input content is located. + * @param {string} request.parent + * The name of the parent resource where the artifacts will be imported. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.import_yum_artifacts.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async + */ + importYumArtifacts( + request?: protos.google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + importYumArtifacts( + request: protos.google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + importYumArtifacts( + request: protos.google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + importYumArtifacts( + request?: protos.google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('importYumArtifacts response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('importYumArtifacts request %j', request); + return this.innerApiCalls.importYumArtifacts(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('importYumArtifacts response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.import_yum_artifacts.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async + */ + async checkImportYumArtifactsProgress(name: string): Promise>{ + this._log.info('importYumArtifacts long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importYumArtifacts, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a repository. The returned Operation will finish once the + * repository has been created. Its response will be the created Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource where the repository will be + * created. + * @param {string} request.repositoryId + * Required. The repository id to use for this repository. + * @param {google.devtools.artifactregistry.v1.Repository} request.repository + * Required. The repository to be created. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.create_repository.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async + */ + createRepository( + request?: protos.google.devtools.artifactregistry.v1.ICreateRepositoryRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createRepository( + request: protos.google.devtools.artifactregistry.v1.ICreateRepositoryRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createRepository( + request: protos.google.devtools.artifactregistry.v1.ICreateRepositoryRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createRepository( + request?: protos.google.devtools.artifactregistry.v1.ICreateRepositoryRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createRepository response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createRepository request %j', request); + return this.innerApiCalls.createRepository(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createRepository response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createRepository()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.create_repository.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async + */ + async checkCreateRepositoryProgress(name: string): Promise>{ + this._log.info('createRepository long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createRepository, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a repository and all of its contents. The returned Operation will + * finish once the repository has been deleted. It will not have any Operation + * metadata and will return a google.protobuf.Empty response. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the repository to delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_repository.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async + */ + deleteRepository( + request?: protos.google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteRepository( + request: protos.google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteRepository( + request: protos.google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteRepository( + request?: protos.google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteRepository response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteRepository request %j', request); + return this.innerApiCalls.deleteRepository(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteRepository response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteRepository()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_repository.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async + */ + async checkDeleteRepositoryProgress(name: string): Promise>{ + this._log.info('deleteRepository long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteRepository, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a package and all of its versions and tags. The returned operation + * will complete once the package has been deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the package to delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_package.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async + */ + deletePackage( + request?: protos.google.devtools.artifactregistry.v1.IDeletePackageRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deletePackage( + request: protos.google.devtools.artifactregistry.v1.IDeletePackageRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deletePackage( + request: protos.google.devtools.artifactregistry.v1.IDeletePackageRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deletePackage( + request?: protos.google.devtools.artifactregistry.v1.IDeletePackageRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deletePackage response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deletePackage request %j', request); + return this.innerApiCalls.deletePackage(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deletePackage response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deletePackage()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_package.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async + */ + async checkDeletePackageProgress(name: string): Promise>{ + this._log.info('deletePackage long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deletePackage, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a version and all of its content. The returned operation will + * complete once the version has been deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the version to delete. + * @param {boolean} request.force + * By default, a version that is tagged may not be deleted. If force=true, the + * version and any tags pointing to the version are deleted. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_version.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async + */ + deleteVersion( + request?: protos.google.devtools.artifactregistry.v1.IDeleteVersionRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteVersion( + request: protos.google.devtools.artifactregistry.v1.IDeleteVersionRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteVersion( + request: protos.google.devtools.artifactregistry.v1.IDeleteVersionRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteVersion( + request?: protos.google.devtools.artifactregistry.v1.IDeleteVersionRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteVersion response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteVersion request %j', request); + return this.innerApiCalls.deleteVersion(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteVersion response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteVersion()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_version.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async + */ + async checkDeleteVersionProgress(name: string): Promise>{ + this._log.info('deleteVersion long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteVersion, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes multiple versions across a repository. The returned operation will + * complete once the versions have been deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the repository holding all requested versions. + * @param {string[]} request.names + * Required. The names of the versions to delete. + * The maximum number of versions deleted per batch is determined by the + * service and is dependent on the available resources in the region. + * @param {boolean} request.validateOnly + * If true, the request is performed without deleting data, following AIP-163. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.batch_delete_versions.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_async + */ + batchDeleteVersions( + request?: protos.google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + batchDeleteVersions( + request: protos.google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + batchDeleteVersions( + request: protos.google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + batchDeleteVersions( + request?: protos.google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('batchDeleteVersions response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('batchDeleteVersions request %j', request); + return this.innerApiCalls.batchDeleteVersions(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('batchDeleteVersions response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `batchDeleteVersions()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.batch_delete_versions.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_async + */ + async checkBatchDeleteVersionsProgress(name: string): Promise>{ + this._log.info('batchDeleteVersions long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.batchDeleteVersions, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a file and all of its content. It is only allowed on generic + * repositories. The returned operation will complete once the file has been + * deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the file to delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_file.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_async + */ + deleteFile( + request?: protos.google.devtools.artifactregistry.v1.IDeleteFileRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteFile( + request: protos.google.devtools.artifactregistry.v1.IDeleteFileRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteFile( + request: protos.google.devtools.artifactregistry.v1.IDeleteFileRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteFile( + request?: protos.google.devtools.artifactregistry.v1.IDeleteFileRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteFile response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteFile request %j', request); + return this.innerApiCalls.deleteFile(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteFile response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteFile()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_file.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_async + */ + async checkDeleteFileProgress(name: string): Promise>{ + this._log.info('deleteFile long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteFile, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates an attachment. The returned Operation will finish once the + * attachment has been created. Its response will be the created attachment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource where the attachment will be + * created. + * @param {string} request.attachmentId + * Required. The attachment id to use for this attachment. + * @param {google.devtools.artifactregistry.v1.Attachment} request.attachment + * Required. The attachment to be created. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.create_attachment.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_async + */ + createAttachment( + request?: protos.google.devtools.artifactregistry.v1.ICreateAttachmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAttachment( + request: protos.google.devtools.artifactregistry.v1.ICreateAttachmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAttachment( + request: protos.google.devtools.artifactregistry.v1.ICreateAttachmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAttachment( + request?: protos.google.devtools.artifactregistry.v1.ICreateAttachmentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createAttachment response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createAttachment request %j', request); + return this.innerApiCalls.createAttachment(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createAttachment response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createAttachment()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.create_attachment.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_async + */ + async checkCreateAttachmentProgress(name: string): Promise>{ + this._log.info('createAttachment long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createAttachment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes an attachment. The returned Operation will + * finish once the attachments has been deleted. It will not have any + * Operation metadata and will return a `google.protobuf.Empty` response. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the attachment to delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_attachment.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_async + */ + deleteAttachment( + request?: protos.google.devtools.artifactregistry.v1.IDeleteAttachmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteAttachment( + request: protos.google.devtools.artifactregistry.v1.IDeleteAttachmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAttachment( + request: protos.google.devtools.artifactregistry.v1.IDeleteAttachmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAttachment( + request?: protos.google.devtools.artifactregistry.v1.IDeleteAttachmentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteAttachment response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteAttachment request %j', request); + return this.innerApiCalls.deleteAttachment(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteAttachment response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteAttachment()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_attachment.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_async + */ + async checkDeleteAttachmentProgress(name: string): Promise>{ + this._log.info('deleteAttachment long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteAttachment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Exports an artifact to a Cloud Storage bucket. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.sourceVersion + * The artifact version to export. + * Format: + * projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version} + * @param {string} request.sourceTag + * The artifact tag to export. + * Format:projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag} + * @param {string} request.gcsPath + * The Cloud Storage path to export the artifact to. Should start with the + * bucket name, and optionally have a directory path. Examples: + * `dst_bucket`, `dst_bucket/sub_dir`. + * Existing objects with the same path will be overwritten. + * @param {string} request.repository + * Required. The repository of the artifact to export. + * Format: projects/{project}/locations/{location}/repositories/{repository} + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.export_artifact.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_async + */ + exportArtifact( + request?: protos.google.devtools.artifactregistry.v1.IExportArtifactRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + exportArtifact( + request: protos.google.devtools.artifactregistry.v1.IExportArtifactRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + exportArtifact( + request: protos.google.devtools.artifactregistry.v1.IExportArtifactRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + exportArtifact( + request?: protos.google.devtools.artifactregistry.v1.IExportArtifactRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'repository': request.repository ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('exportArtifact response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('exportArtifact request %j', request); + return this.innerApiCalls.exportArtifact(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('exportArtifact response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `exportArtifact()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.export_artifact.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_async + */ + async checkExportArtifactProgress(name: string): Promise>{ + this._log.info('exportArtifact long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.exportArtifact, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists docker images. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose docker images will be + * listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {string} request.orderBy + * The field to order the results by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.DockerImage|DockerImage}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listDockerImagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDockerImages( + request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IDockerImage[], + protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest|null, + protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + ]>; + listDockerImages( + request: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IDockerImage>): void; + listDockerImages( + request: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IDockerImage>): void; + listDockerImages( + request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IDockerImage>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IDockerImage>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IDockerImage[], + protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest|null, + protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IDockerImage>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDockerImages values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDockerImages request %j', request); + return this.innerApiCalls + .listDockerImages(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1.IDockerImage[], + protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest|null, + protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + ]) => { + this._log.info('listDockerImages values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listDockerImages`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose docker images will be + * listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {string} request.orderBy + * The field to order the results by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.DockerImage|DockerImage} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listDockerImagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDockerImagesStream( + request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDockerImages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDockerImages stream %j', request); + return this.descriptors.page.listDockerImages.createStream( + this.innerApiCalls.listDockerImages as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDockerImages`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose docker images will be + * listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {string} request.orderBy + * The field to order the results by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1.DockerImage|DockerImage}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.list_docker_images.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_async + */ + listDockerImagesAsync( + request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDockerImages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDockerImages iterate %j', request); + return this.descriptors.page.listDockerImages.asyncIterate( + this.innerApiCalls['listDockerImages'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists maven artifacts. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose maven artifacts will be + * listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.MavenArtifact|MavenArtifact}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listMavenArtifactsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMavenArtifacts( + request?: protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IMavenArtifact[], + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest|null, + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse + ]>; + listMavenArtifacts( + request: protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IMavenArtifact>): void; + listMavenArtifacts( + request: protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IMavenArtifact>): void; + listMavenArtifacts( + request?: protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IMavenArtifact>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IMavenArtifact>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IMavenArtifact[], + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest|null, + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IMavenArtifact>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listMavenArtifacts values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listMavenArtifacts request %j', request); + return this.innerApiCalls + .listMavenArtifacts(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1.IMavenArtifact[], + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest|null, + protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse + ]) => { + this._log.info('listMavenArtifacts values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listMavenArtifacts`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose maven artifacts will be + * listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.MavenArtifact|MavenArtifact} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listMavenArtifactsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMavenArtifactsStream( + request?: protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMavenArtifacts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMavenArtifacts stream %j', request); + return this.descriptors.page.listMavenArtifacts.createStream( + this.innerApiCalls.listMavenArtifacts as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listMavenArtifacts`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose maven artifacts will be + * listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1.MavenArtifact|MavenArtifact}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.list_maven_artifacts.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_async + */ + listMavenArtifactsAsync( + request?: protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMavenArtifacts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMavenArtifacts iterate %j', request); + return this.descriptors.page.listMavenArtifacts.asyncIterate( + this.innerApiCalls['listMavenArtifacts'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists npm packages. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose npm packages will be + * listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.NpmPackage|NpmPackage}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listNpmPackagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listNpmPackages( + request?: protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.INpmPackage[], + protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest|null, + protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse + ]>; + listNpmPackages( + request: protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.INpmPackage>): void; + listNpmPackages( + request: protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.INpmPackage>): void; + listNpmPackages( + request?: protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.INpmPackage>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.INpmPackage>): + Promise<[ + protos.google.devtools.artifactregistry.v1.INpmPackage[], + protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest|null, + protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.INpmPackage>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listNpmPackages values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listNpmPackages request %j', request); + return this.innerApiCalls + .listNpmPackages(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1.INpmPackage[], + protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest|null, + protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse + ]) => { + this._log.info('listNpmPackages values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listNpmPackages`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose npm packages will be + * listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.NpmPackage|NpmPackage} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listNpmPackagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listNpmPackagesStream( + request?: protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listNpmPackages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listNpmPackages stream %j', request); + return this.descriptors.page.listNpmPackages.createStream( + this.innerApiCalls.listNpmPackages as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listNpmPackages`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose npm packages will be + * listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1.NpmPackage|NpmPackage}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.list_npm_packages.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_async + */ + listNpmPackagesAsync( + request?: protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listNpmPackages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listNpmPackages iterate %j', request); + return this.descriptors.page.listNpmPackages.asyncIterate( + this.innerApiCalls['listNpmPackages'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists python packages. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose python packages will be + * listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.PythonPackage|PythonPackage}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listPythonPackagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPythonPackages( + request?: protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IPythonPackage[], + protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest|null, + protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse + ]>; + listPythonPackages( + request: protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IPythonPackage>): void; + listPythonPackages( + request: protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IPythonPackage>): void; + listPythonPackages( + request?: protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IPythonPackage>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IPythonPackage>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IPythonPackage[], + protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest|null, + protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IPythonPackage>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listPythonPackages values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listPythonPackages request %j', request); + return this.innerApiCalls + .listPythonPackages(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1.IPythonPackage[], + protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest|null, + protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse + ]) => { + this._log.info('listPythonPackages values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listPythonPackages`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose python packages will be + * listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.PythonPackage|PythonPackage} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listPythonPackagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPythonPackagesStream( + request?: protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPythonPackages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPythonPackages stream %j', request); + return this.descriptors.page.listPythonPackages.createStream( + this.innerApiCalls.listPythonPackages as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listPythonPackages`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose python packages will be + * listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1.PythonPackage|PythonPackage}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.list_python_packages.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_async + */ + listPythonPackagesAsync( + request?: protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPythonPackages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPythonPackages iterate %j', request); + return this.descriptors.page.listPythonPackages.asyncIterate( + this.innerApiCalls['listPythonPackages'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists repositories. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose repositories will be + * listed. + * @param {number} request.pageSize + * The maximum number of repositories to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * + * * `name` + * + * Examples of using a filter: + * + * To filter the results of your request to repositories with the name + * `my-repo` in project `my-project` in the `us-central` region, append the + * following filter expression to your request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-*"` + * * `name="projects/my-project/locations/us-central1/repositories/*repo"` + * * `name="projects/my-project/locations/us-central1/repositories/*repo*"` + * @param {string} [request.orderBy] + * Optional. The field to order the results by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.Repository|Repository}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRepositories( + request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IRepository[], + protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest|null, + protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + ]>; + listRepositories( + request: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IRepository>): void; + listRepositories( + request: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IRepository>): void; + listRepositories( + request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IRepository>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IRepository>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IRepository[], + protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest|null, + protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IRepository>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listRepositories values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listRepositories request %j', request); + return this.innerApiCalls + .listRepositories(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1.IRepository[], + protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest|null, + protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + ]) => { + this._log.info('listRepositories values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listRepositories`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose repositories will be + * listed. + * @param {number} request.pageSize + * The maximum number of repositories to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * + * * `name` + * + * Examples of using a filter: + * + * To filter the results of your request to repositories with the name + * `my-repo` in project `my-project` in the `us-central` region, append the + * following filter expression to your request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-*"` + * * `name="projects/my-project/locations/us-central1/repositories/*repo"` + * * `name="projects/my-project/locations/us-central1/repositories/*repo*"` + * @param {string} [request.orderBy] + * Optional. The field to order the results by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.Repository|Repository} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRepositoriesStream( + request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listRepositories stream %j', request); + return this.descriptors.page.listRepositories.createStream( + this.innerApiCalls.listRepositories as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listRepositories`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose repositories will be + * listed. + * @param {number} request.pageSize + * The maximum number of repositories to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * + * * `name` + * + * Examples of using a filter: + * + * To filter the results of your request to repositories with the name + * `my-repo` in project `my-project` in the `us-central` region, append the + * following filter expression to your request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-*"` + * * `name="projects/my-project/locations/us-central1/repositories/*repo"` + * * `name="projects/my-project/locations/us-central1/repositories/*repo*"` + * @param {string} [request.orderBy] + * Optional. The field to order the results by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1.Repository|Repository}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.list_repositories.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async + */ + listRepositoriesAsync( + request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listRepositories iterate %j', request); + return this.descriptors.page.listRepositories.asyncIterate( + this.innerApiCalls['listRepositories'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists packages. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose packages will be listed. + * @param {number} request.pageSize + * The maximum number of packages to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `annotations` + * + * Examples of using a filter: + * + * To filter the results of your request to packages with the name + * `my-package` in project `my-project` in the `us-central` region, in + * repository `my-repo`, append the following filter expression to your + * request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` + * + * To filter the results of your request to packages with the annotation + * key-value pair [`external_link`: `external_link_value`], append the + * following filter expression to your request": + * + * * `"annotations.external_link:external_link_value"` + * + * To filter the results just for a specific annotation key `external_link`, + * append the following filter expression to your request: + * + * * `"annotations.external_link"` + * + * If the annotation key or value contains special characters, you can escape + * them by surrounding the value with backticks. For example, to filter the + * results of your request to packages with the annotation key-value pair + * [`external.link`:`https://example.com/my-package`], append the following + * filter expression to your request: + * + * * `` "annotations.`external.link`:`https://example.com/my-package`" `` + * + * You can also filter with annotations with a wildcard to + * match any number of characters before or after the value: + * + * * `` "annotations.*_link:`*example.com*`" `` + * @param {string} [request.orderBy] + * Optional. The field to order the results by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.Package|Package}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listPackagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPackages( + request?: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IPackage[], + protos.google.devtools.artifactregistry.v1.IListPackagesRequest|null, + protos.google.devtools.artifactregistry.v1.IListPackagesResponse + ]>; + listPackages( + request: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IPackage>): void; + listPackages( + request: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IPackage>): void; + listPackages( + request?: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IPackage>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IPackage>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IPackage[], + protos.google.devtools.artifactregistry.v1.IListPackagesRequest|null, + protos.google.devtools.artifactregistry.v1.IListPackagesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + protos.google.devtools.artifactregistry.v1.IListPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IPackage>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listPackages values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listPackages request %j', request); + return this.innerApiCalls + .listPackages(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1.IPackage[], + protos.google.devtools.artifactregistry.v1.IListPackagesRequest|null, + protos.google.devtools.artifactregistry.v1.IListPackagesResponse + ]) => { + this._log.info('listPackages values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listPackages`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose packages will be listed. + * @param {number} request.pageSize + * The maximum number of packages to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `annotations` + * + * Examples of using a filter: + * + * To filter the results of your request to packages with the name + * `my-package` in project `my-project` in the `us-central` region, in + * repository `my-repo`, append the following filter expression to your + * request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` + * + * To filter the results of your request to packages with the annotation + * key-value pair [`external_link`: `external_link_value`], append the + * following filter expression to your request": + * + * * `"annotations.external_link:external_link_value"` + * + * To filter the results just for a specific annotation key `external_link`, + * append the following filter expression to your request: + * + * * `"annotations.external_link"` + * + * If the annotation key or value contains special characters, you can escape + * them by surrounding the value with backticks. For example, to filter the + * results of your request to packages with the annotation key-value pair + * [`external.link`:`https://example.com/my-package`], append the following + * filter expression to your request: + * + * * `` "annotations.`external.link`:`https://example.com/my-package`" `` + * + * You can also filter with annotations with a wildcard to + * match any number of characters before or after the value: + * + * * `` "annotations.*_link:`*example.com*`" `` + * @param {string} [request.orderBy] + * Optional. The field to order the results by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.Package|Package} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listPackagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPackagesStream( + request?: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPackages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPackages stream %j', request); + return this.descriptors.page.listPackages.createStream( + this.innerApiCalls.listPackages as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listPackages`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose packages will be listed. + * @param {number} request.pageSize + * The maximum number of packages to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `annotations` + * + * Examples of using a filter: + * + * To filter the results of your request to packages with the name + * `my-package` in project `my-project` in the `us-central` region, in + * repository `my-repo`, append the following filter expression to your + * request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` + * + * To filter the results of your request to packages with the annotation + * key-value pair [`external_link`: `external_link_value`], append the + * following filter expression to your request": + * + * * `"annotations.external_link:external_link_value"` + * + * To filter the results just for a specific annotation key `external_link`, + * append the following filter expression to your request: + * + * * `"annotations.external_link"` + * + * If the annotation key or value contains special characters, you can escape + * them by surrounding the value with backticks. For example, to filter the + * results of your request to packages with the annotation key-value pair + * [`external.link`:`https://example.com/my-package`], append the following + * filter expression to your request: + * + * * `` "annotations.`external.link`:`https://example.com/my-package`" `` + * + * You can also filter with annotations with a wildcard to + * match any number of characters before or after the value: + * + * * `` "annotations.*_link:`*example.com*`" `` + * @param {string} [request.orderBy] + * Optional. The field to order the results by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1.Package|Package}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.list_packages.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async + */ + listPackagesAsync( + request?: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPackages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPackages iterate %j', request); + return this.descriptors.page.listPackages.asyncIterate( + this.innerApiCalls['listPackages'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists versions. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource whose versions will be listed. + * @param {number} request.pageSize + * The maximum number of versions to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {google.devtools.artifactregistry.v1.VersionView} request.view + * The view that should be returned in the response. + * @param {string} [request.orderBy] + * Optional. The field to order the results by. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `annotations` + * + * Examples of using a filter: + * + * To filter the results of your request to versions with the name + * `my-version` in project `my-project` in the `us-central` region, in + * repository `my-repo`, append the following filter expression to your + * request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` + * + * To filter the results of your request to versions with the annotation + * key-value pair [`external_link`: `external_link_value`], append the + * following filter expression to your request: + * + * * `"annotations.external_link:external_link_value"` + * + * To filter just for a specific annotation key `external_link`, append the + * following filter expression to your request: + * + * * `"annotations.external_link"` + * + * If the annotation key or value contains special characters, you can escape + * them by surrounding the value with backticks. For example, to filter the + * results of your request to versions with the annotation key-value pair + * [`external.link`:`https://example.com/my-version`], append the following + * filter expression to your request: + * + * * `` "annotations.`external.link`:`https://example.com/my-version`" `` + * + * You can also filter with annotations with a wildcard to + * match any number of characters before or after the value: + * + * * `` "annotations.*_link:`*example.com*`" `` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.Version|Version}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listVersionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listVersions( + request?: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IVersion[], + protos.google.devtools.artifactregistry.v1.IListVersionsRequest|null, + protos.google.devtools.artifactregistry.v1.IListVersionsResponse + ]>; + listVersions( + request: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + protos.google.devtools.artifactregistry.v1.IListVersionsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IVersion>): void; + listVersions( + request: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + protos.google.devtools.artifactregistry.v1.IListVersionsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IVersion>): void; + listVersions( + request?: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + protos.google.devtools.artifactregistry.v1.IListVersionsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IVersion>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + protos.google.devtools.artifactregistry.v1.IListVersionsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IVersion>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IVersion[], + protos.google.devtools.artifactregistry.v1.IListVersionsRequest|null, + protos.google.devtools.artifactregistry.v1.IListVersionsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + protos.google.devtools.artifactregistry.v1.IListVersionsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IVersion>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listVersions values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listVersions request %j', request); + return this.innerApiCalls + .listVersions(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1.IVersion[], + protos.google.devtools.artifactregistry.v1.IListVersionsRequest|null, + protos.google.devtools.artifactregistry.v1.IListVersionsResponse + ]) => { + this._log.info('listVersions values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listVersions`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource whose versions will be listed. + * @param {number} request.pageSize + * The maximum number of versions to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {google.devtools.artifactregistry.v1.VersionView} request.view + * The view that should be returned in the response. + * @param {string} [request.orderBy] + * Optional. The field to order the results by. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `annotations` + * + * Examples of using a filter: + * + * To filter the results of your request to versions with the name + * `my-version` in project `my-project` in the `us-central` region, in + * repository `my-repo`, append the following filter expression to your + * request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` + * + * To filter the results of your request to versions with the annotation + * key-value pair [`external_link`: `external_link_value`], append the + * following filter expression to your request: + * + * * `"annotations.external_link:external_link_value"` + * + * To filter just for a specific annotation key `external_link`, append the + * following filter expression to your request: + * + * * `"annotations.external_link"` + * + * If the annotation key or value contains special characters, you can escape + * them by surrounding the value with backticks. For example, to filter the + * results of your request to versions with the annotation key-value pair + * [`external.link`:`https://example.com/my-version`], append the following + * filter expression to your request: + * + * * `` "annotations.`external.link`:`https://example.com/my-version`" `` + * + * You can also filter with annotations with a wildcard to + * match any number of characters before or after the value: + * + * * `` "annotations.*_link:`*example.com*`" `` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.Version|Version} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listVersionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listVersionsStream( + request?: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listVersions stream %j', request); + return this.descriptors.page.listVersions.createStream( + this.innerApiCalls.listVersions as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listVersions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource whose versions will be listed. + * @param {number} request.pageSize + * The maximum number of versions to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {google.devtools.artifactregistry.v1.VersionView} request.view + * The view that should be returned in the response. + * @param {string} [request.orderBy] + * Optional. The field to order the results by. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `annotations` + * + * Examples of using a filter: + * + * To filter the results of your request to versions with the name + * `my-version` in project `my-project` in the `us-central` region, in + * repository `my-repo`, append the following filter expression to your + * request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` + * + * To filter the results of your request to versions with the annotation + * key-value pair [`external_link`: `external_link_value`], append the + * following filter expression to your request: + * + * * `"annotations.external_link:external_link_value"` + * + * To filter just for a specific annotation key `external_link`, append the + * following filter expression to your request: + * + * * `"annotations.external_link"` + * + * If the annotation key or value contains special characters, you can escape + * them by surrounding the value with backticks. For example, to filter the + * results of your request to versions with the annotation key-value pair + * [`external.link`:`https://example.com/my-version`], append the following + * filter expression to your request: + * + * * `` "annotations.`external.link`:`https://example.com/my-version`" `` + * + * You can also filter with annotations with a wildcard to + * match any number of characters before or after the value: + * + * * `` "annotations.*_link:`*example.com*`" `` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1.Version|Version}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.list_versions.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async + */ + listVersionsAsync( + request?: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listVersions iterate %j', request); + return this.descriptors.page.listVersions.asyncIterate( + this.innerApiCalls['listVersions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists files. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the repository whose files will be listed. For + * example: "projects/p1/locations/us-central1/repositories/repo1 + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `owner` + * * `annotations` + * + * Examples of using a filter: + * + * To filter the results of your request to files with the name `my_file.txt` + * in project `my-project` in the `us-central` region, in repository + * `my-repo`, append the following filter expression to your request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` + * + * To filter the results of your request to files owned by the version `1.0` + * in package `pkg1`, append the following filter expression to your request: + * + * * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + * + * To filter the results of your request to files with the annotation + * key-value pair [`external_link`: `external_link_value`], append the + * following filter expression to your request: + * + * * `"annotations.external_link:external_link_value"` + * + * To filter just for a specific annotation key `external_link`, append the + * following filter expression to your request: + * + * * `"annotations.external_link"` + * + * If the annotation key or value contains special characters, you can escape + * them by surrounding the value with backticks. For example, to filter the + * results of your request to files with the annotation key-value pair + * [`external.link`:`https://example.com/my-file`], append the following + * filter expression to your request: + * + * * `` "annotations.`external.link`:`https://example.com/my-file`" `` + * + * You can also filter with annotations with a wildcard to + * match any number of characters before or after the value: + * + * * `` "annotations.*_link:`*example.com*`" `` + * @param {number} request.pageSize + * The maximum number of files 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 {string} request.orderBy + * The field to order the results by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.File|File}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listFilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFiles( + request?: protos.google.devtools.artifactregistry.v1.IListFilesRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IFile[], + protos.google.devtools.artifactregistry.v1.IListFilesRequest|null, + protos.google.devtools.artifactregistry.v1.IListFilesResponse + ]>; + listFiles( + request: protos.google.devtools.artifactregistry.v1.IListFilesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListFilesRequest, + protos.google.devtools.artifactregistry.v1.IListFilesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IFile>): void; + listFiles( + request: protos.google.devtools.artifactregistry.v1.IListFilesRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListFilesRequest, + protos.google.devtools.artifactregistry.v1.IListFilesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IFile>): void; + listFiles( + request?: protos.google.devtools.artifactregistry.v1.IListFilesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListFilesRequest, + protos.google.devtools.artifactregistry.v1.IListFilesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IFile>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListFilesRequest, + protos.google.devtools.artifactregistry.v1.IListFilesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IFile>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IFile[], + protos.google.devtools.artifactregistry.v1.IListFilesRequest|null, + protos.google.devtools.artifactregistry.v1.IListFilesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListFilesRequest, + protos.google.devtools.artifactregistry.v1.IListFilesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IFile>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listFiles values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listFiles request %j', request); + return this.innerApiCalls + .listFiles(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1.IFile[], + protos.google.devtools.artifactregistry.v1.IListFilesRequest|null, + protos.google.devtools.artifactregistry.v1.IListFilesResponse + ]) => { + this._log.info('listFiles values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listFiles`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the repository whose files will be listed. For + * example: "projects/p1/locations/us-central1/repositories/repo1 + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `owner` + * * `annotations` + * + * Examples of using a filter: + * + * To filter the results of your request to files with the name `my_file.txt` + * in project `my-project` in the `us-central` region, in repository + * `my-repo`, append the following filter expression to your request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` + * + * To filter the results of your request to files owned by the version `1.0` + * in package `pkg1`, append the following filter expression to your request: + * + * * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + * + * To filter the results of your request to files with the annotation + * key-value pair [`external_link`: `external_link_value`], append the + * following filter expression to your request: + * + * * `"annotations.external_link:external_link_value"` + * + * To filter just for a specific annotation key `external_link`, append the + * following filter expression to your request: + * + * * `"annotations.external_link"` + * + * If the annotation key or value contains special characters, you can escape + * them by surrounding the value with backticks. For example, to filter the + * results of your request to files with the annotation key-value pair + * [`external.link`:`https://example.com/my-file`], append the following + * filter expression to your request: + * + * * `` "annotations.`external.link`:`https://example.com/my-file`" `` + * + * You can also filter with annotations with a wildcard to + * match any number of characters before or after the value: + * + * * `` "annotations.*_link:`*example.com*`" `` + * @param {number} request.pageSize + * The maximum number of files 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 {string} request.orderBy + * The field to order the results by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.File|File} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listFilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFilesStream( + request?: protos.google.devtools.artifactregistry.v1.IListFilesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFiles stream %j', request); + return this.descriptors.page.listFiles.createStream( + this.innerApiCalls.listFiles as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listFiles`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the repository whose files will be listed. For + * example: "projects/p1/locations/us-central1/repositories/repo1 + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `owner` + * * `annotations` + * + * Examples of using a filter: + * + * To filter the results of your request to files with the name `my_file.txt` + * in project `my-project` in the `us-central` region, in repository + * `my-repo`, append the following filter expression to your request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` + * + * To filter the results of your request to files owned by the version `1.0` + * in package `pkg1`, append the following filter expression to your request: + * + * * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + * + * To filter the results of your request to files with the annotation + * key-value pair [`external_link`: `external_link_value`], append the + * following filter expression to your request: + * + * * `"annotations.external_link:external_link_value"` + * + * To filter just for a specific annotation key `external_link`, append the + * following filter expression to your request: + * + * * `"annotations.external_link"` + * + * If the annotation key or value contains special characters, you can escape + * them by surrounding the value with backticks. For example, to filter the + * results of your request to files with the annotation key-value pair + * [`external.link`:`https://example.com/my-file`], append the following + * filter expression to your request: + * + * * `` "annotations.`external.link`:`https://example.com/my-file`" `` + * + * You can also filter with annotations with a wildcard to + * match any number of characters before or after the value: + * + * * `` "annotations.*_link:`*example.com*`" `` + * @param {number} request.pageSize + * The maximum number of files 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 {string} request.orderBy + * The field to order the results by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1.File|File}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.list_files.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async + */ + listFilesAsync( + request?: protos.google.devtools.artifactregistry.v1.IListFilesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFiles iterate %j', request); + return this.descriptors.page.listFiles.asyncIterate( + this.innerApiCalls['listFiles'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists tags. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent package whose tags will be listed. + * For example: + * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `version` + * + * Examples of using a filter: + * + * To filter the results of your request to tags with the name `my-tag` in + * package `my-package` in repository `my-repo` in project "`y-project` in + * the us-central region, append the following filter expression to your + * request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` + * + * To filter the results of your request to tags applied to the version + * `1.0` in package `my-package`, append the following filter expression to + * your request: + * + * * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + * @param {number} request.pageSize + * The maximum number of tags to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.Tag|Tag}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listTagsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTags( + request?: protos.google.devtools.artifactregistry.v1.IListTagsRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.ITag[], + protos.google.devtools.artifactregistry.v1.IListTagsRequest|null, + protos.google.devtools.artifactregistry.v1.IListTagsResponse + ]>; + listTags( + request: protos.google.devtools.artifactregistry.v1.IListTagsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListTagsRequest, + protos.google.devtools.artifactregistry.v1.IListTagsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.ITag>): void; + listTags( + request: protos.google.devtools.artifactregistry.v1.IListTagsRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListTagsRequest, + protos.google.devtools.artifactregistry.v1.IListTagsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.ITag>): void; + listTags( + request?: protos.google.devtools.artifactregistry.v1.IListTagsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListTagsRequest, + protos.google.devtools.artifactregistry.v1.IListTagsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.ITag>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListTagsRequest, + protos.google.devtools.artifactregistry.v1.IListTagsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.ITag>): + Promise<[ + protos.google.devtools.artifactregistry.v1.ITag[], + protos.google.devtools.artifactregistry.v1.IListTagsRequest|null, + protos.google.devtools.artifactregistry.v1.IListTagsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListTagsRequest, + protos.google.devtools.artifactregistry.v1.IListTagsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.ITag>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listTags values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listTags request %j', request); + return this.innerApiCalls + .listTags(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1.ITag[], + protos.google.devtools.artifactregistry.v1.IListTagsRequest|null, + protos.google.devtools.artifactregistry.v1.IListTagsResponse + ]) => { + this._log.info('listTags values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listTags`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent package whose tags will be listed. + * For example: + * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `version` + * + * Examples of using a filter: + * + * To filter the results of your request to tags with the name `my-tag` in + * package `my-package` in repository `my-repo` in project "`y-project` in + * the us-central region, append the following filter expression to your + * request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` + * + * To filter the results of your request to tags applied to the version + * `1.0` in package `my-package`, append the following filter expression to + * your request: + * + * * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + * @param {number} request.pageSize + * The maximum number of tags to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.Tag|Tag} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listTagsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTagsStream( + request?: protos.google.devtools.artifactregistry.v1.IListTagsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTags']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listTags stream %j', request); + return this.descriptors.page.listTags.createStream( + this.innerApiCalls.listTags as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listTags`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent package whose tags will be listed. + * For example: + * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `version` + * + * Examples of using a filter: + * + * To filter the results of your request to tags with the name `my-tag` in + * package `my-package` in repository `my-repo` in project "`y-project` in + * the us-central region, append the following filter expression to your + * request: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` + * + * You can also use wildcards to match any number of characters before or + * after the value: + * + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` + * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` + * + * To filter the results of your request to tags applied to the version + * `1.0` in package `my-package`, append the following filter expression to + * your request: + * + * * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + * @param {number} request.pageSize + * The maximum number of tags to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1.Tag|Tag}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.list_tags.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListTags_async + */ + listTagsAsync( + request?: protos.google.devtools.artifactregistry.v1.IListTagsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTags']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listTags iterate %j', request); + return this.descriptors.page.listTags.asyncIterate( + this.innerApiCalls['listTags'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists rules. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent repository whose rules will be listed. + * For example: + * `projects/p1/locations/us-central1/repositories/repo1`. + * @param {number} request.pageSize + * The maximum number of rules to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.Rule|Rule}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listRulesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRules( + request?: protos.google.devtools.artifactregistry.v1.IListRulesRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IRule[], + protos.google.devtools.artifactregistry.v1.IListRulesRequest|null, + protos.google.devtools.artifactregistry.v1.IListRulesResponse + ]>; + listRules( + request: protos.google.devtools.artifactregistry.v1.IListRulesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListRulesRequest, + protos.google.devtools.artifactregistry.v1.IListRulesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IRule>): void; + listRules( + request: protos.google.devtools.artifactregistry.v1.IListRulesRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListRulesRequest, + protos.google.devtools.artifactregistry.v1.IListRulesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IRule>): void; + listRules( + request?: protos.google.devtools.artifactregistry.v1.IListRulesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListRulesRequest, + protos.google.devtools.artifactregistry.v1.IListRulesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IRule>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListRulesRequest, + protos.google.devtools.artifactregistry.v1.IListRulesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IRule>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IRule[], + protos.google.devtools.artifactregistry.v1.IListRulesRequest|null, + protos.google.devtools.artifactregistry.v1.IListRulesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListRulesRequest, + protos.google.devtools.artifactregistry.v1.IListRulesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IRule>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listRules values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listRules request %j', request); + return this.innerApiCalls + .listRules(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1.IRule[], + protos.google.devtools.artifactregistry.v1.IListRulesRequest|null, + protos.google.devtools.artifactregistry.v1.IListRulesResponse + ]) => { + this._log.info('listRules values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listRules`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent repository whose rules will be listed. + * For example: + * `projects/p1/locations/us-central1/repositories/repo1`. + * @param {number} request.pageSize + * The maximum number of rules to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.Rule|Rule} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listRulesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRulesStream( + request?: protos.google.devtools.artifactregistry.v1.IListRulesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listRules stream %j', request); + return this.descriptors.page.listRules.createStream( + this.innerApiCalls.listRules as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listRules`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent repository whose rules will be listed. + * For example: + * `projects/p1/locations/us-central1/repositories/repo1`. + * @param {number} request.pageSize + * The maximum number of rules to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1.Rule|Rule}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.list_rules.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListRules_async + */ + listRulesAsync( + request?: protos.google.devtools.artifactregistry.v1.IListRulesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listRules iterate %j', request); + return this.descriptors.page.listRules.asyncIterate( + this.innerApiCalls['listRules'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists attachments. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose attachments will be listed. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * + * * `target` + * * `type` + * * `attachment_namespace` + * @param {number} request.pageSize + * The maximum number of attachments to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.Attachment|Attachment}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listAttachmentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAttachments( + request?: protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1.IAttachment[], + protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest|null, + protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse + ]>; + listAttachments( + request: protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, + protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IAttachment>): void; + listAttachments( + request: protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, + protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IAttachment>): void; + listAttachments( + request?: protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, + protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IAttachment>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, + protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IAttachment>): + Promise<[ + protos.google.devtools.artifactregistry.v1.IAttachment[], + protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest|null, + protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, + protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1.IAttachment>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAttachments values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAttachments request %j', request); + return this.innerApiCalls + .listAttachments(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1.IAttachment[], + protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest|null, + protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse + ]) => { + this._log.info('listAttachments values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listAttachments`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose attachments will be listed. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * + * * `target` + * * `type` + * * `attachment_namespace` + * @param {number} request.pageSize + * The maximum number of attachments to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.Attachment|Attachment} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listAttachmentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAttachmentsStream( + request?: protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAttachments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAttachments stream %j', request); + return this.descriptors.page.listAttachments.createStream( + this.innerApiCalls.listAttachments as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAttachments`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose attachments will be listed. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the request. Filter + * rules are case insensitive. The fields eligible for filtering are: + * + * * `target` + * * `type` + * * `attachment_namespace` + * @param {number} request.pageSize + * The maximum number of attachments to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1.Attachment|Attachment}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.list_attachments.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_async + */ + listAttachmentsAsync( + request?: protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAttachments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAttachments iterate %j', request); + return this.descriptors.page.listAttachments.asyncIterate( + this.innerApiCalls['listAttachments'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- 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 attachment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} attachment + * @returns {string} Resource name string. + */ + attachmentPath(project:string,location:string,repository:string,attachment:string) { + return this.pathTemplates.attachmentPathTemplate.render({ + project: project, + location: location, + repository: repository, + attachment: attachment, + }); + } + + /** + * Parse the project from Attachment resource. + * + * @param {string} attachmentName + * A fully-qualified path representing Attachment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAttachmentName(attachmentName: string) { + return this.pathTemplates.attachmentPathTemplate.match(attachmentName).project; + } + + /** + * Parse the location from Attachment resource. + * + * @param {string} attachmentName + * A fully-qualified path representing Attachment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAttachmentName(attachmentName: string) { + return this.pathTemplates.attachmentPathTemplate.match(attachmentName).location; + } + + /** + * Parse the repository from Attachment resource. + * + * @param {string} attachmentName + * A fully-qualified path representing Attachment resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromAttachmentName(attachmentName: string) { + return this.pathTemplates.attachmentPathTemplate.match(attachmentName).repository; + } + + /** + * Parse the attachment from Attachment resource. + * + * @param {string} attachmentName + * A fully-qualified path representing Attachment resource. + * @returns {string} A string representing the attachment. + */ + matchAttachmentFromAttachmentName(attachmentName: string) { + return this.pathTemplates.attachmentPathTemplate.match(attachmentName).attachment; + } + + /** + * Return a fully-qualified dockerImage resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} docker_image + * @returns {string} Resource name string. + */ + dockerImagePath(project:string,location:string,repository:string,dockerImage:string) { + return this.pathTemplates.dockerImagePathTemplate.render({ + project: project, + location: location, + repository: repository, + docker_image: dockerImage, + }); + } + + /** + * Parse the project from DockerImage resource. + * + * @param {string} dockerImageName + * A fully-qualified path representing DockerImage resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDockerImageName(dockerImageName: string) { + return this.pathTemplates.dockerImagePathTemplate.match(dockerImageName).project; + } + + /** + * Parse the location from DockerImage resource. + * + * @param {string} dockerImageName + * A fully-qualified path representing DockerImage resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDockerImageName(dockerImageName: string) { + return this.pathTemplates.dockerImagePathTemplate.match(dockerImageName).location; + } + + /** + * Parse the repository from DockerImage resource. + * + * @param {string} dockerImageName + * A fully-qualified path representing DockerImage resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromDockerImageName(dockerImageName: string) { + return this.pathTemplates.dockerImagePathTemplate.match(dockerImageName).repository; + } + + /** + * Parse the docker_image from DockerImage resource. + * + * @param {string} dockerImageName + * A fully-qualified path representing DockerImage resource. + * @returns {string} A string representing the docker_image. + */ + matchDockerImageFromDockerImageName(dockerImageName: string) { + return this.pathTemplates.dockerImagePathTemplate.match(dockerImageName).docker_image; + } + + /** + * Return a fully-qualified file resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} file + * @returns {string} Resource name string. + */ + filePath(project:string,location:string,repository:string,file:string) { + return this.pathTemplates.filePathTemplate.render({ + project: project, + location: location, + repository: repository, + file: file, + }); + } + + /** + * Parse the project from File resource. + * + * @param {string} fileName + * A fully-qualified path representing File resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFileName(fileName: string) { + return this.pathTemplates.filePathTemplate.match(fileName).project; + } + + /** + * Parse the location from File resource. + * + * @param {string} fileName + * A fully-qualified path representing File resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFileName(fileName: string) { + return this.pathTemplates.filePathTemplate.match(fileName).location; + } + + /** + * Parse the repository from File resource. + * + * @param {string} fileName + * A fully-qualified path representing File resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromFileName(fileName: string) { + return this.pathTemplates.filePathTemplate.match(fileName).repository; + } + + /** + * Parse the file from File resource. + * + * @param {string} fileName + * A fully-qualified path representing File resource. + * @returns {string} A string representing the file. + */ + matchFileFromFileName(fileName: string) { + return this.pathTemplates.filePathTemplate.match(fileName).file; + } + + /** + * Return a fully-qualified genericArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} generic_artifact + * @returns {string} Resource name string. + */ + genericArtifactPath(project:string,location:string,repository:string,genericArtifact:string) { + return this.pathTemplates.genericArtifactPathTemplate.render({ + project: project, + location: location, + repository: repository, + generic_artifact: genericArtifact, + }); + } + + /** + * Parse the project from GenericArtifact resource. + * + * @param {string} genericArtifactName + * A fully-qualified path representing GenericArtifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromGenericArtifactName(genericArtifactName: string) { + return this.pathTemplates.genericArtifactPathTemplate.match(genericArtifactName).project; + } + + /** + * Parse the location from GenericArtifact resource. + * + * @param {string} genericArtifactName + * A fully-qualified path representing GenericArtifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromGenericArtifactName(genericArtifactName: string) { + return this.pathTemplates.genericArtifactPathTemplate.match(genericArtifactName).location; + } + + /** + * Parse the repository from GenericArtifact resource. + * + * @param {string} genericArtifactName + * A fully-qualified path representing GenericArtifact resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromGenericArtifactName(genericArtifactName: string) { + return this.pathTemplates.genericArtifactPathTemplate.match(genericArtifactName).repository; + } + + /** + * Parse the generic_artifact from GenericArtifact resource. + * + * @param {string} genericArtifactName + * A fully-qualified path representing GenericArtifact resource. + * @returns {string} A string representing the generic_artifact. + */ + matchGenericArtifactFromGenericArtifactName(genericArtifactName: string) { + return this.pathTemplates.genericArtifactPathTemplate.match(genericArtifactName).generic_artifact; + } + + /** + * Return a fully-qualified goModule resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} go_module + * @returns {string} Resource name string. + */ + goModulePath(project:string,location:string,repository:string,goModule:string) { + return this.pathTemplates.goModulePathTemplate.render({ + project: project, + location: location, + repository: repository, + go_module: goModule, + }); + } + + /** + * Parse the project from GoModule resource. + * + * @param {string} goModuleName + * A fully-qualified path representing GoModule resource. + * @returns {string} A string representing the project. + */ + matchProjectFromGoModuleName(goModuleName: string) { + return this.pathTemplates.goModulePathTemplate.match(goModuleName).project; + } + + /** + * Parse the location from GoModule resource. + * + * @param {string} goModuleName + * A fully-qualified path representing GoModule resource. + * @returns {string} A string representing the location. + */ + matchLocationFromGoModuleName(goModuleName: string) { + return this.pathTemplates.goModulePathTemplate.match(goModuleName).location; + } + + /** + * Parse the repository from GoModule resource. + * + * @param {string} goModuleName + * A fully-qualified path representing GoModule resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromGoModuleName(goModuleName: string) { + return this.pathTemplates.goModulePathTemplate.match(goModuleName).repository; + } + + /** + * Parse the go_module from GoModule resource. + * + * @param {string} goModuleName + * A fully-qualified path representing GoModule resource. + * @returns {string} A string representing the go_module. + */ + matchGoModuleFromGoModuleName(goModuleName: string) { + return this.pathTemplates.goModulePathTemplate.match(goModuleName).go_module; + } + + /** + * Return a fully-qualified kfpArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} kfp_artifact + * @returns {string} Resource name string. + */ + kfpArtifactPath(project:string,location:string,repository:string,kfpArtifact:string) { + return this.pathTemplates.kfpArtifactPathTemplate.render({ + project: project, + location: location, + repository: repository, + kfp_artifact: kfpArtifact, + }); + } + + /** + * Parse the project from KfpArtifact resource. + * + * @param {string} kfpArtifactName + * A fully-qualified path representing KfpArtifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromKfpArtifactName(kfpArtifactName: string) { + return this.pathTemplates.kfpArtifactPathTemplate.match(kfpArtifactName).project; + } + + /** + * Parse the location from KfpArtifact resource. + * + * @param {string} kfpArtifactName + * A fully-qualified path representing KfpArtifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromKfpArtifactName(kfpArtifactName: string) { + return this.pathTemplates.kfpArtifactPathTemplate.match(kfpArtifactName).location; + } + + /** + * Parse the repository from KfpArtifact resource. + * + * @param {string} kfpArtifactName + * A fully-qualified path representing KfpArtifact resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromKfpArtifactName(kfpArtifactName: string) { + return this.pathTemplates.kfpArtifactPathTemplate.match(kfpArtifactName).repository; + } + + /** + * Parse the kfp_artifact from KfpArtifact resource. + * + * @param {string} kfpArtifactName + * A fully-qualified path representing KfpArtifact resource. + * @returns {string} A string representing the kfp_artifact. + */ + matchKfpArtifactFromKfpArtifactName(kfpArtifactName: string) { + return this.pathTemplates.kfpArtifactPathTemplate.match(kfpArtifactName).kfp_artifact; + } + + /** + * Return a fully-qualified mavenArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} maven_artifact + * @returns {string} Resource name string. + */ + mavenArtifactPath(project:string,location:string,repository:string,mavenArtifact:string) { + return this.pathTemplates.mavenArtifactPathTemplate.render({ + project: project, + location: location, + repository: repository, + maven_artifact: mavenArtifact, + }); + } + + /** + * Parse the project from MavenArtifact resource. + * + * @param {string} mavenArtifactName + * A fully-qualified path representing MavenArtifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMavenArtifactName(mavenArtifactName: string) { + return this.pathTemplates.mavenArtifactPathTemplate.match(mavenArtifactName).project; + } + + /** + * Parse the location from MavenArtifact resource. + * + * @param {string} mavenArtifactName + * A fully-qualified path representing MavenArtifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMavenArtifactName(mavenArtifactName: string) { + return this.pathTemplates.mavenArtifactPathTemplate.match(mavenArtifactName).location; + } + + /** + * Parse the repository from MavenArtifact resource. + * + * @param {string} mavenArtifactName + * A fully-qualified path representing MavenArtifact resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromMavenArtifactName(mavenArtifactName: string) { + return this.pathTemplates.mavenArtifactPathTemplate.match(mavenArtifactName).repository; + } + + /** + * Parse the maven_artifact from MavenArtifact resource. + * + * @param {string} mavenArtifactName + * A fully-qualified path representing MavenArtifact resource. + * @returns {string} A string representing the maven_artifact. + */ + matchMavenArtifactFromMavenArtifactName(mavenArtifactName: string) { + return this.pathTemplates.mavenArtifactPathTemplate.match(mavenArtifactName).maven_artifact; + } + + /** + * Return a fully-qualified npmPackage resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} npm_package + * @returns {string} Resource name string. + */ + npmPackagePath(project:string,location:string,repository:string,npmPackage:string) { + return this.pathTemplates.npmPackagePathTemplate.render({ + project: project, + location: location, + repository: repository, + npm_package: npmPackage, + }); + } + + /** + * Parse the project from NpmPackage resource. + * + * @param {string} npmPackageName + * A fully-qualified path representing NpmPackage resource. + * @returns {string} A string representing the project. + */ + matchProjectFromNpmPackageName(npmPackageName: string) { + return this.pathTemplates.npmPackagePathTemplate.match(npmPackageName).project; + } + + /** + * Parse the location from NpmPackage resource. + * + * @param {string} npmPackageName + * A fully-qualified path representing NpmPackage resource. + * @returns {string} A string representing the location. + */ + matchLocationFromNpmPackageName(npmPackageName: string) { + return this.pathTemplates.npmPackagePathTemplate.match(npmPackageName).location; + } + + /** + * Parse the repository from NpmPackage resource. + * + * @param {string} npmPackageName + * A fully-qualified path representing NpmPackage resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromNpmPackageName(npmPackageName: string) { + return this.pathTemplates.npmPackagePathTemplate.match(npmPackageName).repository; + } + + /** + * Parse the npm_package from NpmPackage resource. + * + * @param {string} npmPackageName + * A fully-qualified path representing NpmPackage resource. + * @returns {string} A string representing the npm_package. + */ + matchNpmPackageFromNpmPackageName(npmPackageName: string) { + return this.pathTemplates.npmPackagePathTemplate.match(npmPackageName).npm_package; + } + + /** + * Return a fully-qualified package resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} packageParam + * @returns {string} Resource name string. + */ + packagePath(project:string,location:string,repository:string,packageParam:string) { + return this.pathTemplates.packagePathTemplate.render({ + project: project, + location: location, + repository: repository, + package: packageParam, + }); + } + + /** + * Parse the project from Package resource. + * + * @param {string} packageName + * A fully-qualified path representing Package resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPackageName(packageName: string) { + return this.pathTemplates.packagePathTemplate.match(packageName).project; + } + + /** + * Parse the location from Package resource. + * + * @param {string} packageName + * A fully-qualified path representing Package resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPackageName(packageName: string) { + return this.pathTemplates.packagePathTemplate.match(packageName).location; + } + + /** + * Parse the repository from Package resource. + * + * @param {string} packageName + * A fully-qualified path representing Package resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromPackageName(packageName: string) { + return this.pathTemplates.packagePathTemplate.match(packageName).repository; + } + + /** + * Parse the package from Package resource. + * + * @param {string} packageName + * A fully-qualified path representing Package resource. + * @returns {string} A string representing the package. + */ + matchPackageFromPackageName(packageName: string) { + return this.pathTemplates.packagePathTemplate.match(packageName).package; + } + + /** + * 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 pythonPackage resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} python_package + * @returns {string} Resource name string. + */ + pythonPackagePath(project:string,location:string,repository:string,pythonPackage:string) { + return this.pathTemplates.pythonPackagePathTemplate.render({ + project: project, + location: location, + repository: repository, + python_package: pythonPackage, + }); + } + + /** + * Parse the project from PythonPackage resource. + * + * @param {string} pythonPackageName + * A fully-qualified path representing PythonPackage resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPythonPackageName(pythonPackageName: string) { + return this.pathTemplates.pythonPackagePathTemplate.match(pythonPackageName).project; + } + + /** + * Parse the location from PythonPackage resource. + * + * @param {string} pythonPackageName + * A fully-qualified path representing PythonPackage resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPythonPackageName(pythonPackageName: string) { + return this.pathTemplates.pythonPackagePathTemplate.match(pythonPackageName).location; + } + + /** + * Parse the repository from PythonPackage resource. + * + * @param {string} pythonPackageName + * A fully-qualified path representing PythonPackage resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromPythonPackageName(pythonPackageName: string) { + return this.pathTemplates.pythonPackagePathTemplate.match(pythonPackageName).repository; + } + + /** + * Parse the python_package from PythonPackage resource. + * + * @param {string} pythonPackageName + * A fully-qualified path representing PythonPackage resource. + * @returns {string} A string representing the python_package. + */ + matchPythonPackageFromPythonPackageName(pythonPackageName: string) { + return this.pathTemplates.pythonPackagePathTemplate.match(pythonPackageName).python_package; + } + + /** + * Return a fully-qualified repository resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @returns {string} Resource name string. + */ + repositoryPath(project:string,location:string,repository:string) { + return this.pathTemplates.repositoryPathTemplate.render({ + project: project, + location: location, + repository: repository, + }); + } + + /** + * Parse the project from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName).project; + } + + /** + * Parse the location from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName).location; + } + + /** + * Parse the repository from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName).repository; + } + + /** + * Return a fully-qualified rule resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} rule + * @returns {string} Resource name string. + */ + rulePath(project:string,location:string,repository:string,rule:string) { + return this.pathTemplates.rulePathTemplate.render({ + project: project, + location: location, + repository: repository, + rule: rule, + }); + } + + /** + * Parse the project from Rule resource. + * + * @param {string} ruleName + * A fully-qualified path representing Rule resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRuleName(ruleName: string) { + return this.pathTemplates.rulePathTemplate.match(ruleName).project; + } + + /** + * Parse the location from Rule resource. + * + * @param {string} ruleName + * A fully-qualified path representing Rule resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRuleName(ruleName: string) { + return this.pathTemplates.rulePathTemplate.match(ruleName).location; + } + + /** + * Parse the repository from Rule resource. + * + * @param {string} ruleName + * A fully-qualified path representing Rule resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromRuleName(ruleName: string) { + return this.pathTemplates.rulePathTemplate.match(ruleName).repository; + } + + /** + * Parse the rule from Rule resource. + * + * @param {string} ruleName + * A fully-qualified path representing Rule resource. + * @returns {string} A string representing the rule. + */ + matchRuleFromRuleName(ruleName: string) { + return this.pathTemplates.rulePathTemplate.match(ruleName).rule; + } + + /** + * 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 vpcscConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + vpcscConfigPath(project:string,location:string) { + return this.pathTemplates.vpcscConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from VpcscConfig resource. + * + * @param {string} vpcscConfigName + * A fully-qualified path representing VpcscConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVpcscConfigName(vpcscConfigName: string) { + return this.pathTemplates.vpcscConfigPathTemplate.match(vpcscConfigName).project; + } + + /** + * Parse the location from VpcscConfig resource. + * + * @param {string} vpcscConfigName + * A fully-qualified path representing VpcscConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVpcscConfigName(vpcscConfigName: string) { + return this.pathTemplates.vpcscConfigPathTemplate.match(vpcscConfigName).location; + } + + /** + * 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. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.artifactRegistryStub && !this._terminated) { + return this.artifactRegistryStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client_config.json b/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client_config.json new file mode 100644 index 00000000000..d34cffe3456 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client_config.json @@ -0,0 +1,276 @@ +{ + "interfaces": { + "google.devtools.artifactregistry.v1.ArtifactRegistry": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListDockerImages": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDockerImage": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListMavenArtifacts": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetMavenArtifact": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListNpmPackages": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetNpmPackage": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListPythonPackages": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetPythonPackage": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ImportAptArtifacts": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ImportYumArtifacts": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListRepositories": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetRepository": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateRepository": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateRepository": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteRepository": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListPackages": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetPackage": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeletePackage": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListVersions": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetVersion": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteVersion": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchDeleteVersions": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateVersion": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListFiles": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetFile": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteFile": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateFile": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListTags": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetTag": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateTag": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateTag": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteTag": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateRule": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListRules": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetRule": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateRule": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteRule": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetProjectSettings": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateProjectSettings": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetVPCSCConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateVPCSCConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdatePackage": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAttachments": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAttachment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateAttachment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAttachment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ExportArtifact": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_proto_list.json b/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_proto_list.json new file mode 100644 index 00000000000..834e46f73e8 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_proto_list.json @@ -0,0 +1,19 @@ +[ + "../../protos/google/devtools/artifactregistry/v1/apt_artifact.proto", + "../../protos/google/devtools/artifactregistry/v1/artifact.proto", + "../../protos/google/devtools/artifactregistry/v1/attachment.proto", + "../../protos/google/devtools/artifactregistry/v1/export.proto", + "../../protos/google/devtools/artifactregistry/v1/file.proto", + "../../protos/google/devtools/artifactregistry/v1/generic.proto", + "../../protos/google/devtools/artifactregistry/v1/go.proto", + "../../protos/google/devtools/artifactregistry/v1/kfp_artifact.proto", + "../../protos/google/devtools/artifactregistry/v1/package.proto", + "../../protos/google/devtools/artifactregistry/v1/repository.proto", + "../../protos/google/devtools/artifactregistry/v1/rule.proto", + "../../protos/google/devtools/artifactregistry/v1/service.proto", + "../../protos/google/devtools/artifactregistry/v1/settings.proto", + "../../protos/google/devtools/artifactregistry/v1/tag.proto", + "../../protos/google/devtools/artifactregistry/v1/version.proto", + "../../protos/google/devtools/artifactregistry/v1/vpcsc_config.proto", + "../../protos/google/devtools/artifactregistry/v1/yum_artifact.proto" +] diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1/gapic_metadata.json b/owl-bot-staging/google-devtools-artifactregistry/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..38b765e25bb --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/src/v1/gapic_metadata.json @@ -0,0 +1,567 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.devtools.artifactregistry.v1", + "libraryPackage": "@google-cloud/artifact-registry", + "services": { + "ArtifactRegistry": { + "clients": { + "grpc": { + "libraryClient": "ArtifactRegistryClient", + "rpcs": { + "GetDockerImage": { + "methods": [ + "getDockerImage" + ] + }, + "GetMavenArtifact": { + "methods": [ + "getMavenArtifact" + ] + }, + "GetNpmPackage": { + "methods": [ + "getNpmPackage" + ] + }, + "GetPythonPackage": { + "methods": [ + "getPythonPackage" + ] + }, + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "GetPackage": { + "methods": [ + "getPackage" + ] + }, + "GetVersion": { + "methods": [ + "getVersion" + ] + }, + "UpdateVersion": { + "methods": [ + "updateVersion" + ] + }, + "GetFile": { + "methods": [ + "getFile" + ] + }, + "UpdateFile": { + "methods": [ + "updateFile" + ] + }, + "GetTag": { + "methods": [ + "getTag" + ] + }, + "CreateTag": { + "methods": [ + "createTag" + ] + }, + "UpdateTag": { + "methods": [ + "updateTag" + ] + }, + "DeleteTag": { + "methods": [ + "deleteTag" + ] + }, + "CreateRule": { + "methods": [ + "createRule" + ] + }, + "GetRule": { + "methods": [ + "getRule" + ] + }, + "UpdateRule": { + "methods": [ + "updateRule" + ] + }, + "DeleteRule": { + "methods": [ + "deleteRule" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetProjectSettings": { + "methods": [ + "getProjectSettings" + ] + }, + "UpdateProjectSettings": { + "methods": [ + "updateProjectSettings" + ] + }, + "GetVPCSCConfig": { + "methods": [ + "getVPCSCConfig" + ] + }, + "UpdateVPCSCConfig": { + "methods": [ + "updateVPCSCConfig" + ] + }, + "UpdatePackage": { + "methods": [ + "updatePackage" + ] + }, + "GetAttachment": { + "methods": [ + "getAttachment" + ] + }, + "ImportAptArtifacts": { + "methods": [ + "importAptArtifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "importYumArtifacts" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "DeletePackage": { + "methods": [ + "deletePackage" + ] + }, + "DeleteVersion": { + "methods": [ + "deleteVersion" + ] + }, + "BatchDeleteVersions": { + "methods": [ + "batchDeleteVersions" + ] + }, + "DeleteFile": { + "methods": [ + "deleteFile" + ] + }, + "CreateAttachment": { + "methods": [ + "createAttachment" + ] + }, + "DeleteAttachment": { + "methods": [ + "deleteAttachment" + ] + }, + "ExportArtifact": { + "methods": [ + "exportArtifact" + ] + }, + "ListDockerImages": { + "methods": [ + "listDockerImages", + "listDockerImagesStream", + "listDockerImagesAsync" + ] + }, + "ListMavenArtifacts": { + "methods": [ + "listMavenArtifacts", + "listMavenArtifactsStream", + "listMavenArtifactsAsync" + ] + }, + "ListNpmPackages": { + "methods": [ + "listNpmPackages", + "listNpmPackagesStream", + "listNpmPackagesAsync" + ] + }, + "ListPythonPackages": { + "methods": [ + "listPythonPackages", + "listPythonPackagesStream", + "listPythonPackagesAsync" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "ListPackages": { + "methods": [ + "listPackages", + "listPackagesStream", + "listPackagesAsync" + ] + }, + "ListVersions": { + "methods": [ + "listVersions", + "listVersionsStream", + "listVersionsAsync" + ] + }, + "ListFiles": { + "methods": [ + "listFiles", + "listFilesStream", + "listFilesAsync" + ] + }, + "ListTags": { + "methods": [ + "listTags", + "listTagsStream", + "listTagsAsync" + ] + }, + "ListRules": { + "methods": [ + "listRules", + "listRulesStream", + "listRulesAsync" + ] + }, + "ListAttachments": { + "methods": [ + "listAttachments", + "listAttachmentsStream", + "listAttachmentsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ArtifactRegistryClient", + "rpcs": { + "GetDockerImage": { + "methods": [ + "getDockerImage" + ] + }, + "GetMavenArtifact": { + "methods": [ + "getMavenArtifact" + ] + }, + "GetNpmPackage": { + "methods": [ + "getNpmPackage" + ] + }, + "GetPythonPackage": { + "methods": [ + "getPythonPackage" + ] + }, + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "GetPackage": { + "methods": [ + "getPackage" + ] + }, + "GetVersion": { + "methods": [ + "getVersion" + ] + }, + "UpdateVersion": { + "methods": [ + "updateVersion" + ] + }, + "GetFile": { + "methods": [ + "getFile" + ] + }, + "UpdateFile": { + "methods": [ + "updateFile" + ] + }, + "GetTag": { + "methods": [ + "getTag" + ] + }, + "CreateTag": { + "methods": [ + "createTag" + ] + }, + "UpdateTag": { + "methods": [ + "updateTag" + ] + }, + "DeleteTag": { + "methods": [ + "deleteTag" + ] + }, + "CreateRule": { + "methods": [ + "createRule" + ] + }, + "GetRule": { + "methods": [ + "getRule" + ] + }, + "UpdateRule": { + "methods": [ + "updateRule" + ] + }, + "DeleteRule": { + "methods": [ + "deleteRule" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetProjectSettings": { + "methods": [ + "getProjectSettings" + ] + }, + "UpdateProjectSettings": { + "methods": [ + "updateProjectSettings" + ] + }, + "GetVPCSCConfig": { + "methods": [ + "getVPCSCConfig" + ] + }, + "UpdateVPCSCConfig": { + "methods": [ + "updateVPCSCConfig" + ] + }, + "UpdatePackage": { + "methods": [ + "updatePackage" + ] + }, + "GetAttachment": { + "methods": [ + "getAttachment" + ] + }, + "ImportAptArtifacts": { + "methods": [ + "importAptArtifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "importYumArtifacts" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "DeletePackage": { + "methods": [ + "deletePackage" + ] + }, + "DeleteVersion": { + "methods": [ + "deleteVersion" + ] + }, + "BatchDeleteVersions": { + "methods": [ + "batchDeleteVersions" + ] + }, + "DeleteFile": { + "methods": [ + "deleteFile" + ] + }, + "CreateAttachment": { + "methods": [ + "createAttachment" + ] + }, + "DeleteAttachment": { + "methods": [ + "deleteAttachment" + ] + }, + "ExportArtifact": { + "methods": [ + "exportArtifact" + ] + }, + "ListDockerImages": { + "methods": [ + "listDockerImages", + "listDockerImagesStream", + "listDockerImagesAsync" + ] + }, + "ListMavenArtifacts": { + "methods": [ + "listMavenArtifacts", + "listMavenArtifactsStream", + "listMavenArtifactsAsync" + ] + }, + "ListNpmPackages": { + "methods": [ + "listNpmPackages", + "listNpmPackagesStream", + "listNpmPackagesAsync" + ] + }, + "ListPythonPackages": { + "methods": [ + "listPythonPackages", + "listPythonPackagesStream", + "listPythonPackagesAsync" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "ListPackages": { + "methods": [ + "listPackages", + "listPackagesStream", + "listPackagesAsync" + ] + }, + "ListVersions": { + "methods": [ + "listVersions", + "listVersionsStream", + "listVersionsAsync" + ] + }, + "ListFiles": { + "methods": [ + "listFiles", + "listFilesStream", + "listFilesAsync" + ] + }, + "ListTags": { + "methods": [ + "listTags", + "listTagsStream", + "listTagsAsync" + ] + }, + "ListRules": { + "methods": [ + "listRules", + "listRulesStream", + "listRulesAsync" + ] + }, + "ListAttachments": { + "methods": [ + "listAttachments", + "listAttachmentsStream", + "listAttachmentsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1/index.ts b/owl-bot-staging/google-devtools-artifactregistry/src/v1/index.ts new file mode 100644 index 00000000000..894a4a12f31 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {ArtifactRegistryClient} from './artifact_registry_client'; diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts new file mode 100644 index 00000000000..d4c58eca6d0 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts @@ -0,0 +1,4020 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1beta2/artifact_registry_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './artifact_registry_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The Artifact Registry API service. + * + * Artifact Registry is an artifact management system for storing artifacts + * from different package management systems. + * + * The resources managed by this API are: + * + * * Repositories, which group packages and their data. + * * Packages, which group versions and their tags. + * * Versions, which are specific forms of a package. + * * Tags, which represent alternative names for versions. + * * Files, which contain content and are optionally associated with a Package + * or Version. + * @class + * @memberof v1beta2 + */ +export class ArtifactRegistryClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('artifact-registry'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + artifactRegistryStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ArtifactRegistryClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ArtifactRegistryClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ArtifactRegistryClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'artifactregistry.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + 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, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listRepositories: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'repositories'), + listPackages: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'packages'), + listVersions: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'versions'), + listFiles: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'files'), + listTags: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'tags') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1beta2/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1beta2/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1beta2/{name=projects/*/locations/*/operations/*}',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).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; + const createRepositoryMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1beta2.OperationMetadata') as gax.protobuf.Type; + const deleteRepositoryResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteRepositoryMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1beta2.OperationMetadata') as gax.protobuf.Type; + const deletePackageResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deletePackageMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1beta2.OperationMetadata') as gax.protobuf.Type; + const deleteVersionResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteVersionMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1beta2.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + importAptArtifacts: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + importAptArtifactsResponse.decode.bind(importAptArtifactsResponse), + importAptArtifactsMetadata.decode.bind(importAptArtifactsMetadata)), + importYumArtifacts: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + importYumArtifactsResponse.decode.bind(importYumArtifactsResponse), + importYumArtifactsMetadata.decode.bind(importYumArtifactsMetadata)), + createRepository: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createRepositoryResponse.decode.bind(createRepositoryResponse), + createRepositoryMetadata.decode.bind(createRepositoryMetadata)), + deleteRepository: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteRepositoryResponse.decode.bind(deleteRepositoryResponse), + deleteRepositoryMetadata.decode.bind(deleteRepositoryMetadata)), + deletePackage: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deletePackageResponse.decode.bind(deletePackageResponse), + deletePackageMetadata.decode.bind(deletePackageMetadata)), + deleteVersion: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteVersionResponse.decode.bind(deleteVersionResponse), + deleteVersionMetadata.decode.bind(deleteVersionMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.devtools.artifactregistry.v1beta2.ArtifactRegistry', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.artifactRegistryStub) { + return this.artifactRegistryStub; + } + + // Put together the "service stub" for + // google.devtools.artifactregistry.v1beta2.ArtifactRegistry. + this.artifactRegistryStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.devtools.artifactregistry.v1beta2.ArtifactRegistry') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.devtools.artifactregistry.v1beta2.ArtifactRegistry, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const artifactRegistryStubMethods = + ['importAptArtifacts', 'importYumArtifacts', 'listRepositories', 'getRepository', 'createRepository', 'updateRepository', 'deleteRepository', 'listPackages', 'getPackage', 'deletePackage', 'listVersions', 'getVersion', 'deleteVersion', 'listFiles', 'getFile', 'listTags', 'getTag', 'createTag', 'updateTag', 'deleteTag', 'setIamPolicy', 'getIamPolicy', 'testIamPermissions', 'getProjectSettings', 'updateProjectSettings']; + for (const methodName of artifactRegistryStubMethods) { + const callPromise = this.artifactRegistryStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.artifactRegistryStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'artifactregistry.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'artifactregistry.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Gets a repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * 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. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Repository|Repository}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.get_repository.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_async + */ + getRepository( + request?: protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|undefined, {}|undefined + ]>; + getRepository( + request: protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|null|undefined, + {}|null|undefined>): void; + getRepository( + request: protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|null|undefined, + {}|null|undefined>): void; + getRepository( + request?: protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getRepository request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getRepository response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getRepository(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|undefined, + {}|undefined + ]) => { + this._log.info('getRepository response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates a repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1beta2.Repository} request.repository + * The repository that replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Repository|Repository}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.update_repository.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_async + */ + updateRepository( + request?: protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|undefined, {}|undefined + ]>; + updateRepository( + request: protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|null|undefined, + {}|null|undefined>): void; + updateRepository( + request: protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|null|undefined, + {}|null|undefined>): void; + updateRepository( + request?: protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'repository.name': request.repository!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateRepository request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateRepository response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateRepository(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1beta2.IRepository, + protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateRepository response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets a package. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the package to retrieve. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Package|Package}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.get_package.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_async + */ + getPackage( + request?: protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IPackage, + protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|undefined, {}|undefined + ]>; + getPackage( + request: protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IPackage, + protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|null|undefined, + {}|null|undefined>): void; + getPackage( + request: protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IPackage, + protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|null|undefined, + {}|null|undefined>): void; + getPackage( + request?: protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1beta2.IPackage, + protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1beta2.IPackage, + protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IPackage, + protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getPackage request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IPackage, + protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getPackage response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getPackage(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1beta2.IPackage, + protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|undefined, + {}|undefined + ]) => { + this._log.info('getPackage response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets a version + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the version to retrieve. + * @param {google.devtools.artifactregistry.v1beta2.VersionView} request.view + * The view that should be returned in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Version|Version}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.get_version.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_async + */ + getVersion( + request?: protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IVersion, + protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|undefined, {}|undefined + ]>; + getVersion( + request: protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IVersion, + protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|null|undefined, + {}|null|undefined>): void; + getVersion( + request: protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IVersion, + protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|null|undefined, + {}|null|undefined>): void; + getVersion( + request?: protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1beta2.IVersion, + protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1beta2.IVersion, + protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IVersion, + protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getVersion request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IVersion, + protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1beta2.IVersion, + protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('getVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets a file. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the file to retrieve. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.File|File}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.get_file.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_async + */ + getFile( + request?: protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IFile, + protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|undefined, {}|undefined + ]>; + getFile( + request: protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IFile, + protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|null|undefined, + {}|null|undefined>): void; + getFile( + request: protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IFile, + protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|null|undefined, + {}|null|undefined>): void; + getFile( + request?: protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1beta2.IFile, + protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1beta2.IFile, + protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IFile, + protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getFile request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IFile, + protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getFile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getFile(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1beta2.IFile, + protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|undefined, + {}|undefined + ]) => { + this._log.info('getFile response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets a tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the tag to retrieve. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Tag|Tag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.get_tag.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_async + */ + getTag( + request?: protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|undefined, {}|undefined + ]>; + getTag( + request: protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|null|undefined, + {}|null|undefined>): void; + getTag( + request: protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|null|undefined, + {}|null|undefined>): void; + getTag( + request?: protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getTag request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getTag response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getTag(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|undefined, + {}|undefined + ]) => { + this._log.info('getTag response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Creates a tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource where the tag will be created. + * @param {string} request.tagId + * The tag id to use for this repository. + * @param {google.devtools.artifactregistry.v1beta2.Tag} request.tag + * The tag to be created. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Tag|Tag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.create_tag.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_async + */ + createTag( + request?: protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|undefined, {}|undefined + ]>; + createTag( + request: protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|null|undefined, + {}|null|undefined>): void; + createTag( + request: protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|null|undefined, + {}|null|undefined>): void; + createTag( + request?: protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createTag request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createTag response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createTag(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|undefined, + {}|undefined + ]) => { + this._log.info('createTag response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates a tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1beta2.Tag} request.tag + * The tag that replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Tag|Tag}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.update_tag.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_async + */ + updateTag( + request?: protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|undefined, {}|undefined + ]>; + updateTag( + request: protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|null|undefined, + {}|null|undefined>): void; + updateTag( + request: protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|null|undefined, + {}|null|undefined>): void; + updateTag( + request?: protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'tag.name': request.tag!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateTag request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateTag response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateTag(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1beta2.ITag, + protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateTag response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deletes a tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the tag to delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.delete_tag.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_async + */ + deleteTag( + request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|undefined, {}|undefined + ]>; + deleteTag( + request: protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|null|undefined, + {}|null|undefined>): void; + deleteTag( + request: protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|null|undefined, + {}|null|undefined>): void; + deleteTag( + request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteTag request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteTag response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteTag(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteTag response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates the IAM policy for a given resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.Policy} request.policy + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param {google.protobuf.FieldMask} request.updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.set_iam_policy.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_async + */ + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined + ]>; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'resource': request.resource ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('setIamPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('setIamPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.setIamPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('setIamPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets the IAM policy for a given resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.GetPolicyOptions} request.options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.get_iam_policy.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_async + */ + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined + ]>; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'resource': request.resource ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getIamPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getIamPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getIamPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('getIamPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Tests if the caller has a list of permissions on a resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.test_iam_permissions.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_async + */ + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + options?: CallOptions): + Promise<[ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined + ]>; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): void; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): void; + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'resource': request.resource ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('testIamPermissions request %j', request); + const wrappedCallback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('testIamPermissions response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.testIamPermissions(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|undefined, + {}|undefined + ]) => { + this._log.info('testIamPermissions response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * 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 {@link protos.google.devtools.artifactregistry.v1beta2.ProjectSettings|ProjectSettings}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getProjectSettings request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getProjectSettings response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getProjectSettings(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest|undefined, + {}|undefined + ]) => { + this._log.info('getProjectSettings response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * 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 {@link protos.google.devtools.artifactregistry.v1beta2.ProjectSettings|ProjectSettings}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'project_settings.name': request.projectSettings!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateProjectSettings request %j', request); + const wrappedCallback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateProjectSettings response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateProjectSettings(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateProjectSettings response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * 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.longrunning.IOperation|undefined, {}|undefined + ]>; + importAptArtifacts( + request: protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + importAptArtifacts( + request: protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + importAptArtifacts( + request?: protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('importAptArtifacts response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('importAptArtifacts request %j', request); + return this.innerApiCalls.importAptArtifacts(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('importAptArtifacts response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * 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>{ + this._log.info('importAptArtifacts long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importAptArtifacts, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * 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.longrunning.IOperation|undefined, {}|undefined + ]>; + importYumArtifacts( + request: protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + importYumArtifacts( + request: protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + importYumArtifacts( + request?: protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('importYumArtifacts response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('importYumArtifacts request %j', request); + return this.innerApiCalls.importYumArtifacts(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('importYumArtifacts response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * 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>{ + this._log.info('importYumArtifacts long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importYumArtifacts, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a repository. The returned Operation will finish once the + * repository has been created. Its response will be the created Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource where the repository will be created. + * @param {string} request.repositoryId + * The repository id to use for this repository. + * @param {google.devtools.artifactregistry.v1beta2.Repository} request.repository + * The repository to be created. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.create_repository.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_async + */ + createRepository( + request?: protos.google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createRepository( + request: protos.google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createRepository( + request: protos.google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createRepository( + request?: protos.google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createRepository response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createRepository request %j', request); + return this.innerApiCalls.createRepository(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createRepository response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createRepository()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.create_repository.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_async + */ + async checkCreateRepositoryProgress(name: string): Promise>{ + this._log.info('createRepository long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createRepository, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a repository and all of its contents. The returned Operation will + * finish once the repository has been deleted. It will not have any Operation + * metadata and will return a google.protobuf.Empty response. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the repository to delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.delete_repository.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_async + */ + deleteRepository( + request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteRepository( + request: protos.google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteRepository( + request: protos.google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteRepository( + request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteRepository response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteRepository request %j', request); + return this.innerApiCalls.deleteRepository(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteRepository response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteRepository()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.delete_repository.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_async + */ + async checkDeleteRepositoryProgress(name: string): Promise>{ + this._log.info('deleteRepository long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteRepository, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a package and all of its versions and tags. The returned operation + * will complete once the package has been deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the package to delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.delete_package.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_async + */ + deletePackage( + request?: protos.google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deletePackage( + request: protos.google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deletePackage( + request: protos.google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deletePackage( + request?: protos.google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deletePackage response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deletePackage request %j', request); + return this.innerApiCalls.deletePackage(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deletePackage response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deletePackage()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.delete_package.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_async + */ + async checkDeletePackageProgress(name: string): Promise>{ + this._log.info('deletePackage long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deletePackage, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a version and all of its content. The returned operation will + * complete once the version has been deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the version to delete. + * @param {boolean} request.force + * By default, a version that is tagged may not be deleted. If force=true, the + * version and any tags pointing to the version are deleted. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.delete_version.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_async + */ + deleteVersion( + request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteVersion( + request: protos.google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteVersion( + request: protos.google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteVersion( + request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteVersion response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteVersion request %j', request); + return this.innerApiCalls.deleteVersion(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteVersion response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteVersion()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.delete_version.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_async + */ + async checkDeleteVersionProgress(name: string): Promise>{ + this._log.info('deleteVersion long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteVersion, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists repositories. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose repositories will be listed. + * @param {number} request.pageSize + * The maximum number of repositories to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1beta2.Repository|Repository}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRepositories( + request?: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IRepository[], + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse + ]>; + listRepositories( + request: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IRepository>): void; + listRepositories( + request: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IRepository>): void; + listRepositories( + request?: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IRepository>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IRepository>): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IRepository[], + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IRepository>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listRepositories values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listRepositories request %j', request); + return this.innerApiCalls + .listRepositories(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1beta2.IRepository[], + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse + ]) => { + this._log.info('listRepositories values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listRepositories`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose repositories will be listed. + * @param {number} request.pageSize + * The maximum number of repositories to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Repository|Repository} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRepositoriesStream( + request?: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listRepositories stream %j', request); + return this.descriptors.page.listRepositories.createStream( + this.innerApiCalls.listRepositories as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listRepositories`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose repositories will be listed. + * @param {number} request.pageSize + * The maximum number of repositories to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1beta2.Repository|Repository}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.list_repositories.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_async + */ + listRepositoriesAsync( + request?: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listRepositories iterate %j', request); + return this.descriptors.page.listRepositories.asyncIterate( + this.innerApiCalls['listRepositories'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists packages. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource whose packages will be listed. + * @param {number} request.pageSize + * The maximum number of packages to return. + * Maximum page size is 10,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1beta2.Package|Package}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listPackagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPackages( + request?: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IPackage[], + protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse + ]>; + listPackages( + request: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IPackage>): void; + listPackages( + request: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IPackage>): void; + listPackages( + request?: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IPackage>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IPackage>): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IPackage[], + protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IPackage>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listPackages values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listPackages request %j', request); + return this.innerApiCalls + .listPackages(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1beta2.IPackage[], + protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse + ]) => { + this._log.info('listPackages values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listPackages`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource whose packages will be listed. + * @param {number} request.pageSize + * The maximum number of packages to return. + * Maximum page size is 10,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Package|Package} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listPackagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPackagesStream( + request?: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPackages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPackages stream %j', request); + return this.descriptors.page.listPackages.createStream( + this.innerApiCalls.listPackages as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listPackages`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource whose packages will be listed. + * @param {number} request.pageSize + * The maximum number of packages to return. + * Maximum page size is 10,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1beta2.Package|Package}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.list_packages.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_async + */ + listPackagesAsync( + request?: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPackages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPackages iterate %j', request); + return this.descriptors.page.listPackages.asyncIterate( + this.innerApiCalls['listPackages'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists versions. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource whose versions will be listed. + * @param {number} request.pageSize + * The maximum number of versions to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {google.devtools.artifactregistry.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. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1beta2.Version|Version}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listVersionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listVersions( + request?: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IVersion[], + protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse + ]>; + listVersions( + request: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, + protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IVersion>): void; + listVersions( + request: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, + protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IVersion>): void; + listVersions( + request?: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, + protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IVersion>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, + protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IVersion>): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IVersion[], + protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, + protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IVersion>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listVersions values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listVersions request %j', request); + return this.innerApiCalls + .listVersions(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1beta2.IVersion[], + protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse + ]) => { + this._log.info('listVersions values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listVersions`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource whose versions will be listed. + * @param {number} request.pageSize + * The maximum number of versions to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {google.devtools.artifactregistry.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} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Version|Version} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listVersionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listVersionsStream( + request?: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listVersions stream %j', request); + return this.descriptors.page.listVersions.createStream( + this.innerApiCalls.listVersions as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listVersions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource whose versions will be listed. + * @param {number} request.pageSize + * The maximum number of versions to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {google.devtools.artifactregistry.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} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1beta2.Version|Version}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.list_versions.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_async + */ + listVersionsAsync( + request?: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listVersions iterate %j', request); + return this.descriptors.page.listVersions.asyncIterate( + this.innerApiCalls['listVersions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists files. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the repository whose files will be listed. For example: + * "projects/p1/locations/us-central1/repositories/repo1 + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `owner` + * + * An example of using a filter: + * + * * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + * ID starting with "a/b/". + * * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + * Files owned by the version `1.0` in package `pkg1`. + * @param {number} request.pageSize + * The maximum number of files to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1beta2.File|File}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listFilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFiles( + request?: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IFile[], + protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse + ]>; + listFiles( + request: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IFile>): void; + listFiles( + request: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IFile>): void; + listFiles( + request?: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IFile>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IFile>): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.IFile[], + protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, + protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.IFile>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listFiles values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listFiles request %j', request); + return this.innerApiCalls + .listFiles(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1beta2.IFile[], + protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse + ]) => { + this._log.info('listFiles values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listFiles`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the repository whose files will be listed. For example: + * "projects/p1/locations/us-central1/repositories/repo1 + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `owner` + * + * An example of using a filter: + * + * * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + * ID starting with "a/b/". + * * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + * Files owned by the version `1.0` in package `pkg1`. + * @param {number} request.pageSize + * The maximum number of files to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1beta2.File|File} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listFilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFilesStream( + request?: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFiles stream %j', request); + return this.descriptors.page.listFiles.createStream( + this.innerApiCalls.listFiles as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listFiles`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the repository whose files will be listed. For example: + * "projects/p1/locations/us-central1/repositories/repo1 + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `owner` + * + * An example of using a filter: + * + * * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + * ID starting with "a/b/". + * * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + * Files owned by the version `1.0` in package `pkg1`. + * @param {number} request.pageSize + * The maximum number of files to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1beta2.File|File}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.list_files.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_async + */ + listFilesAsync( + request?: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFiles iterate %j', request); + return this.descriptors.page.listFiles.asyncIterate( + this.innerApiCalls['listFiles'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists tags. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource whose tags will be listed. + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `version` + * + * An example of using a filter: + * + * * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + * --> Tags that are applied to the version `1.0` in package `pkg1`. + * @param {number} request.pageSize + * The maximum number of tags to return. Maximum page size is 10,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1beta2.Tag|Tag}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listTagsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTags( + request?: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, + options?: CallOptions): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.ITag[], + protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse + ]>; + listTags( + request: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, + protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.ITag>): void; + listTags( + request: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, + protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.ITag>): void; + listTags( + request?: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, + protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.ITag>, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, + protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.ITag>): + Promise<[ + protos.google.devtools.artifactregistry.v1beta2.ITag[], + protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, + protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse|null|undefined, + protos.google.devtools.artifactregistry.v1beta2.ITag>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listTags values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listTags request %j', request); + return this.innerApiCalls + .listTags(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.devtools.artifactregistry.v1beta2.ITag[], + protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest|null, + protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse + ]) => { + this._log.info('listTags values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listTags`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource whose tags will be listed. + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `version` + * + * An example of using a filter: + * + * * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + * --> Tags that are applied to the version `1.0` in package `pkg1`. + * @param {number} request.pageSize + * The maximum number of tags to return. Maximum page size is 10,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Tag|Tag} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listTagsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTagsStream( + request?: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTags']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listTags stream %j', request); + return this.descriptors.page.listTags.createStream( + this.innerApiCalls.listTags as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listTags`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource whose tags will be listed. + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `version` + * + * An example of using a filter: + * + * * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + * --> Tags that are applied to the version `1.0` in package `pkg1`. + * @param {number} request.pageSize + * The maximum number of tags to return. Maximum page size is 10,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.devtools.artifactregistry.v1beta2.Tag|Tag}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta2/artifact_registry.list_tags.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_async + */ + listTagsAsync( + request?: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTags']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listTags iterate %j', request); + return this.descriptors.page.listTags.asyncIterate( + this.innerApiCalls['listTags'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + // -------------------- + // -- 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. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} file + * @returns {string} Resource name string. + */ + filePath(project:string,location:string,repository:string,file:string) { + return this.pathTemplates.filePathTemplate.render({ + project: project, + location: location, + repository: repository, + file: file, + }); + } + + /** + * Parse the project from File resource. + * + * @param {string} fileName + * A fully-qualified path representing File resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFileName(fileName: string) { + return this.pathTemplates.filePathTemplate.match(fileName).project; + } + + /** + * Parse the location from File resource. + * + * @param {string} fileName + * A fully-qualified path representing File resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFileName(fileName: string) { + return this.pathTemplates.filePathTemplate.match(fileName).location; + } + + /** + * Parse the repository from File resource. + * + * @param {string} fileName + * A fully-qualified path representing File resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromFileName(fileName: string) { + return this.pathTemplates.filePathTemplate.match(fileName).repository; + } + + /** + * Parse the file from File resource. + * + * @param {string} fileName + * A fully-qualified path representing File resource. + * @returns {string} A string representing the file. + */ + matchFileFromFileName(fileName: string) { + return this.pathTemplates.filePathTemplate.match(fileName).file; + } + + /** + * Return a fully-qualified projectSettings resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectSettingsPath(project:string) { + return this.pathTemplates.projectSettingsPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from ProjectSettings resource. + * + * @param {string} projectSettingsName + * A fully-qualified path representing ProjectSettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectSettingsName(projectSettingsName: string) { + return this.pathTemplates.projectSettingsPathTemplate.match(projectSettingsName).project; + } + + /** + * Return a fully-qualified repository resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @returns {string} Resource name string. + */ + repositoryPath(project:string,location:string,repository:string) { + return this.pathTemplates.repositoryPathTemplate.render({ + project: project, + location: location, + repository: repository, + }); + } + + /** + * Parse the project from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName).project; + } + + /** + * Parse the location from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName).location; + } + + /** + * Parse the repository from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName).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. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.artifactRegistryStub && !this._terminated) { + return this.artifactRegistryStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client_config.json b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client_config.json new file mode 100644 index 00000000000..6d2c27103c7 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client_config.json @@ -0,0 +1,149 @@ +{ + "interfaces": { + "google.devtools.artifactregistry.v1beta2.ArtifactRegistry": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "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", + "retry_params_name": "default" + }, + "GetRepository": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "CreateRepository": { + "timeout_millis": 30000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateRepository": { + "timeout_millis": 30000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteRepository": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "ListPackages": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "GetPackage": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "DeletePackage": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "ListVersions": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "GetVersion": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "DeleteVersion": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "ListFiles": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "GetFile": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "ListTags": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "GetTag": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "CreateTag": { + "timeout_millis": 30000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateTag": { + "timeout_millis": 30000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteTag": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "SetIamPolicy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetIamPolicy": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "TestIamPermissions": { + "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/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_proto_list.json b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_proto_list.json new file mode 100644 index 00000000000..f32513655ac --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_proto_list.json @@ -0,0 +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/yum_artifact.proto" +] diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/gapic_metadata.json b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/gapic_metadata.json new file mode 100644 index 00000000000..a4830e36e2c --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/gapic_metadata.json @@ -0,0 +1,293 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.devtools.artifactregistry.v1beta2", + "libraryPackage": "@google-cloud/artifact-registry", + "services": { + "ArtifactRegistry": { + "clients": { + "grpc": { + "libraryClient": "ArtifactRegistryClient", + "rpcs": { + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "GetPackage": { + "methods": [ + "getPackage" + ] + }, + "GetVersion": { + "methods": [ + "getVersion" + ] + }, + "GetFile": { + "methods": [ + "getFile" + ] + }, + "GetTag": { + "methods": [ + "getTag" + ] + }, + "CreateTag": { + "methods": [ + "createTag" + ] + }, + "UpdateTag": { + "methods": [ + "updateTag" + ] + }, + "DeleteTag": { + "methods": [ + "deleteTag" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetProjectSettings": { + "methods": [ + "getProjectSettings" + ] + }, + "UpdateProjectSettings": { + "methods": [ + "updateProjectSettings" + ] + }, + "ImportAptArtifacts": { + "methods": [ + "importAptArtifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "importYumArtifacts" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "DeletePackage": { + "methods": [ + "deletePackage" + ] + }, + "DeleteVersion": { + "methods": [ + "deleteVersion" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "ListPackages": { + "methods": [ + "listPackages", + "listPackagesStream", + "listPackagesAsync" + ] + }, + "ListVersions": { + "methods": [ + "listVersions", + "listVersionsStream", + "listVersionsAsync" + ] + }, + "ListFiles": { + "methods": [ + "listFiles", + "listFilesStream", + "listFilesAsync" + ] + }, + "ListTags": { + "methods": [ + "listTags", + "listTagsStream", + "listTagsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ArtifactRegistryClient", + "rpcs": { + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "GetPackage": { + "methods": [ + "getPackage" + ] + }, + "GetVersion": { + "methods": [ + "getVersion" + ] + }, + "GetFile": { + "methods": [ + "getFile" + ] + }, + "GetTag": { + "methods": [ + "getTag" + ] + }, + "CreateTag": { + "methods": [ + "createTag" + ] + }, + "UpdateTag": { + "methods": [ + "updateTag" + ] + }, + "DeleteTag": { + "methods": [ + "deleteTag" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetProjectSettings": { + "methods": [ + "getProjectSettings" + ] + }, + "UpdateProjectSettings": { + "methods": [ + "updateProjectSettings" + ] + }, + "ImportAptArtifacts": { + "methods": [ + "importAptArtifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "importYumArtifacts" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "DeletePackage": { + "methods": [ + "deletePackage" + ] + }, + "DeleteVersion": { + "methods": [ + "deleteVersion" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "ListPackages": { + "methods": [ + "listPackages", + "listPackagesStream", + "listPackagesAsync" + ] + }, + "ListVersions": { + "methods": [ + "listVersions", + "listVersionsStream", + "listVersionsAsync" + ] + }, + "ListFiles": { + "methods": [ + "listFiles", + "listFilesStream", + "listFilesAsync" + ] + }, + "ListTags": { + "methods": [ + "listTags", + "listTagsStream", + "listTagsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/index.ts b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/index.ts new file mode 100644 index 00000000000..894a4a12f31 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/index.ts @@ -0,0 +1,19 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {ArtifactRegistryClient} from './artifact_registry_client'; diff --git a/owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..417a351c302 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2025 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. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const artifactregistry = require('@google-cloud/artifact-registry'); + +function main() { + const artifactRegistryClient = new artifactregistry.ArtifactRegistryClient(); +} + +main(); diff --git a/owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..238bfff2d60 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {ArtifactRegistryClient} from '@google-cloud/artifact-registry'; + +// check that the client class type name can be used +function doStuffWithArtifactRegistryClient(client: ArtifactRegistryClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const artifactRegistryClient = new ArtifactRegistryClient(); + doStuffWithArtifactRegistryClient(artifactRegistryClient); +} + +main(); diff --git a/owl-bot-staging/google-devtools-artifactregistry/system-test/install.ts b/owl-bot-staging/google-devtools-artifactregistry/system-test/install.ts new file mode 100644 index 00000000000..2a505d6df0c --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts b/owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts new file mode 100644 index 00000000000..1b725ff38f3 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts @@ -0,0 +1,9086 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as artifactregistryModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.ArtifactRegistryClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'artifactregistry.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = artifactregistryModule.v1.ArtifactRegistryClient.servicePath; + assert.strictEqual(servicePath, 'artifactregistry.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = artifactregistryModule.v1.ArtifactRegistryClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'artifactregistry.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'artifactregistry.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'artifactregistry.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new artifactregistryModule.v1.ArtifactRegistryClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'artifactregistry.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'artifactregistry.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new artifactregistryModule.v1.ArtifactRegistryClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = artifactregistryModule.v1.ArtifactRegistryClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.artifactRegistryStub, undefined); + await client.initialize(); + assert(client.artifactRegistryStub); + }); + + 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.initialize().catch(err => {throw err}); + assert(client.artifactRegistryStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + 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(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getDockerImage', () => { + it('invokes getDockerImage without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetDockerImageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ); + client.innerApiCalls.getDockerImage = stubSimpleCall(expectedResponse); + const [response] = await client.getDockerImage(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDockerImage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDockerImage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDockerImage without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetDockerImageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ); + client.innerApiCalls.getDockerImage = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDockerImage( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IDockerImage|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDockerImage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDockerImage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDockerImage with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetDockerImageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDockerImage = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDockerImage(request), expectedError); + const actualRequest = (client.innerApiCalls.getDockerImage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDockerImage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDockerImage with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetDockerImageRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getDockerImage(request), expectedError); + }); + }); + + describe('getMavenArtifact', () => { + it('invokes getMavenArtifact without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetMavenArtifactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetMavenArtifactRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.MavenArtifact() + ); + client.innerApiCalls.getMavenArtifact = stubSimpleCall(expectedResponse); + const [response] = await client.getMavenArtifact(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMavenArtifact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMavenArtifact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMavenArtifact without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetMavenArtifactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetMavenArtifactRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.MavenArtifact() + ); + client.innerApiCalls.getMavenArtifact = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMavenArtifact( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IMavenArtifact|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMavenArtifact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMavenArtifact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMavenArtifact with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetMavenArtifactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetMavenArtifactRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMavenArtifact = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getMavenArtifact(request), expectedError); + const actualRequest = (client.innerApiCalls.getMavenArtifact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMavenArtifact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMavenArtifact with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetMavenArtifactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetMavenArtifactRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getMavenArtifact(request), expectedError); + }); + }); + + describe('getNpmPackage', () => { + it('invokes getNpmPackage without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetNpmPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetNpmPackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.NpmPackage() + ); + client.innerApiCalls.getNpmPackage = stubSimpleCall(expectedResponse); + const [response] = await client.getNpmPackage(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getNpmPackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getNpmPackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getNpmPackage without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetNpmPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetNpmPackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.NpmPackage() + ); + client.innerApiCalls.getNpmPackage = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getNpmPackage( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.INpmPackage|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getNpmPackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getNpmPackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getNpmPackage with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetNpmPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetNpmPackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getNpmPackage = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getNpmPackage(request), expectedError); + const actualRequest = (client.innerApiCalls.getNpmPackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getNpmPackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getNpmPackage with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetNpmPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetNpmPackageRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getNpmPackage(request), expectedError); + }); + }); + + describe('getPythonPackage', () => { + it('invokes getPythonPackage without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetPythonPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPythonPackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.PythonPackage() + ); + client.innerApiCalls.getPythonPackage = stubSimpleCall(expectedResponse); + const [response] = await client.getPythonPackage(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPythonPackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPythonPackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPythonPackage without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetPythonPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPythonPackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.PythonPackage() + ); + client.innerApiCalls.getPythonPackage = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPythonPackage( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IPythonPackage|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPythonPackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPythonPackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPythonPackage with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetPythonPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPythonPackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPythonPackage = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getPythonPackage(request), expectedError); + const actualRequest = (client.innerApiCalls.getPythonPackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPythonPackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPythonPackage with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetPythonPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPythonPackageRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getPythonPackage(request), expectedError); + }); + }); + + describe('getRepository', () => { + it('invokes getRepository without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ); + client.innerApiCalls.getRepository = stubSimpleCall(expectedResponse); + const [response] = await client.getRepository(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ); + client.innerApiCalls.getRepository = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRepository( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IRepository|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getRepository = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getRepository(request), expectedError); + const actualRequest = (client.innerApiCalls.getRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getRepository(request), expectedError); + }); + }); + + describe('updateRepository', () => { + it('invokes updateRepository without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRepositoryRequest', ['repository', 'name']); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ); + client.innerApiCalls.updateRepository = stubSimpleCall(expectedResponse); + const [response] = await client.updateRepository(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRepository without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRepositoryRequest', ['repository', 'name']); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ); + client.innerApiCalls.updateRepository = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateRepository( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IRepository|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRepository with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRepositoryRequest', ['repository', 'name']); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateRepository = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateRepository(request), expectedError); + const actualRequest = (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRepository with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRepositoryRequest', ['repository', 'name']); + request.repository.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateRepository(request), expectedError); + }); + }); + + describe('getPackage', () => { + it('invokes getPackage without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ); + client.innerApiCalls.getPackage = stubSimpleCall(expectedResponse); + const [response] = await client.getPackage(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPackage without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ); + client.innerApiCalls.getPackage = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPackage( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IPackage|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPackage with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPackage = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getPackage(request), expectedError); + const actualRequest = (client.innerApiCalls.getPackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPackage with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPackageRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getPackage(request), expectedError); + }); + }); + + describe('getVersion', () => { + it('invokes getVersion without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ); + client.innerApiCalls.getVersion = stubSimpleCall(expectedResponse); + const [response] = await client.getVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVersion without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ); + client.innerApiCalls.getVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVersion( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IVersion|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVersion with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVersion with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getVersion(request), expectedError); + }); + }); + + describe('updateVersion', () => { + it('invokes updateVersion without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateVersionRequest() + ); + request.version ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVersionRequest', ['version', 'name']); + request.version.name = defaultValue1; + const expectedHeaderRequestParams = `version.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ); + client.innerApiCalls.updateVersion = stubSimpleCall(expectedResponse); + const [response] = await client.updateVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVersion without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateVersionRequest() + ); + request.version ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVersionRequest', ['version', 'name']); + request.version.name = defaultValue1; + const expectedHeaderRequestParams = `version.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ); + client.innerApiCalls.updateVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateVersion( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IVersion|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVersion with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateVersionRequest() + ); + request.version ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVersionRequest', ['version', 'name']); + request.version.name = defaultValue1; + const expectedHeaderRequestParams = `version.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.updateVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVersion with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateVersionRequest() + ); + request.version ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVersionRequest', ['version', 'name']); + request.version.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateVersion(request), expectedError); + }); + }); + + describe('getFile', () => { + it('invokes getFile without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetFileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetFileRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ); + client.innerApiCalls.getFile = stubSimpleCall(expectedResponse); + const [response] = await client.getFile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getFile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFile without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetFileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetFileRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ); + client.innerApiCalls.getFile = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getFile( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IFile|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getFile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFile with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetFileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetFileRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getFile(request), expectedError); + const actualRequest = (client.innerApiCalls.getFile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFile with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetFileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetFileRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getFile(request), expectedError); + }); + }); + + describe('updateFile', () => { + it('invokes updateFile without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateFileRequest() + ); + request.file ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateFileRequest', ['file', 'name']); + request.file.name = defaultValue1; + const expectedHeaderRequestParams = `file.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ); + client.innerApiCalls.updateFile = stubSimpleCall(expectedResponse); + const [response] = await client.updateFile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateFile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateFile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFile without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateFileRequest() + ); + request.file ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateFileRequest', ['file', 'name']); + request.file.name = defaultValue1; + const expectedHeaderRequestParams = `file.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ); + client.innerApiCalls.updateFile = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateFile( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IFile|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateFile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateFile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFile with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateFileRequest() + ); + request.file ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateFileRequest', ['file', 'name']); + request.file.name = defaultValue1; + const expectedHeaderRequestParams = `file.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateFile(request), expectedError); + const actualRequest = (client.innerApiCalls.updateFile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateFile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFile with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateFileRequest() + ); + request.file ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateFileRequest', ['file', 'name']); + request.file.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateFile(request), expectedError); + }); + }); + + describe('getTag', () => { + it('invokes getTag without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetTagRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Tag() + ); + client.innerApiCalls.getTag = stubSimpleCall(expectedResponse); + const [response] = await client.getTag(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTag without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetTagRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Tag() + ); + client.innerApiCalls.getTag = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getTag( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.ITag|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTag with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetTagRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getTag = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getTag(request), expectedError); + const actualRequest = (client.innerApiCalls.getTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTag with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetTagRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getTag(request), expectedError); + }); + }); + + describe('createTag', () => { + it('invokes createTag without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateTagRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Tag() + ); + client.innerApiCalls.createTag = stubSimpleCall(expectedResponse); + const [response] = await client.createTag(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTag without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateTagRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Tag() + ); + client.innerApiCalls.createTag = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createTag( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.ITag|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTag with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateTagRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createTag = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createTag(request), expectedError); + const actualRequest = (client.innerApiCalls.createTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTag with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateTagRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createTag(request), expectedError); + }); + }); + + describe('updateTag', () => { + it('invokes updateTag without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() + ); + request.tag ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateTagRequest', ['tag', 'name']); + request.tag.name = defaultValue1; + const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Tag() + ); + client.innerApiCalls.updateTag = stubSimpleCall(expectedResponse); + const [response] = await client.updateTag(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTag without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() + ); + request.tag ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateTagRequest', ['tag', 'name']); + request.tag.name = defaultValue1; + const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Tag() + ); + client.innerApiCalls.updateTag = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateTag( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.ITag|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTag with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() + ); + request.tag ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateTagRequest', ['tag', 'name']); + request.tag.name = defaultValue1; + const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTag = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateTag(request), expectedError); + const actualRequest = (client.innerApiCalls.updateTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTag with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() + ); + request.tag ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateTagRequest', ['tag', 'name']); + request.tag.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateTag(request), expectedError); + }); + }); + + describe('deleteTag', () => { + it('invokes deleteTag without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteTagRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteTag = stubSimpleCall(expectedResponse); + const [response] = await client.deleteTag(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTag without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteTagRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteTag = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteTag( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTag with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteTagRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTag = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteTag(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTag with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteTagRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteTag(request), expectedError); + }); + }); + + describe('createRule', () => { + it('invokes createRule without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Rule() + ); + client.innerApiCalls.createRule = stubSimpleCall(expectedResponse); + const [response] = await client.createRule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRule without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Rule() + ); + client.innerApiCalls.createRule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRule( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IRule|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRule with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createRule(request), expectedError); + const actualRequest = (client.innerApiCalls.createRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRule with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createRule(request), expectedError); + }); + }); + + describe('getRule', () => { + it('invokes getRule without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Rule() + ); + client.innerApiCalls.getRule = stubSimpleCall(expectedResponse); + const [response] = await client.getRule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRule without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Rule() + ); + client.innerApiCalls.getRule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRule( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IRule|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRule with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getRule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getRule(request), expectedError); + const actualRequest = (client.innerApiCalls.getRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRule with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRuleRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getRule(request), expectedError); + }); + }); + + describe('updateRule', () => { + it('invokes updateRule without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateRuleRequest() + ); + request.rule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRuleRequest', ['rule', 'name']); + request.rule.name = defaultValue1; + const expectedHeaderRequestParams = `rule.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Rule() + ); + client.innerApiCalls.updateRule = stubSimpleCall(expectedResponse); + const [response] = await client.updateRule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRule without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateRuleRequest() + ); + request.rule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRuleRequest', ['rule', 'name']); + request.rule.name = defaultValue1; + const expectedHeaderRequestParams = `rule.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Rule() + ); + client.innerApiCalls.updateRule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateRule( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IRule|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRule with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateRuleRequest() + ); + request.rule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRuleRequest', ['rule', 'name']); + request.rule.name = defaultValue1; + const expectedHeaderRequestParams = `rule.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateRule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateRule(request), expectedError); + const actualRequest = (client.innerApiCalls.updateRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRule with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateRuleRequest() + ); + request.rule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRuleRequest', ['rule', 'name']); + request.rule.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateRule(request), expectedError); + }); + }); + + describe('deleteRule', () => { + it('invokes deleteRule without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteRule = stubSimpleCall(expectedResponse); + const [response] = await client.deleteRule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRule without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteRule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteRule( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRule with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteRule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteRule(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRule with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRuleRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteRule(request), expectedError); + }); + }); + + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setIamPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.setIamPolicy(request), expectedError); + }); + }); + + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getIamPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getIamPolicy(request), expectedError); + }); + }); + + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = stubSimpleCall(expectedResponse); + const [response] = await client.testIamPermissions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + (err?: Error|null, result?: protos.google.iam.v1.ITestIamPermissionsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.testIamPermissions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.testIamPermissions(request), expectedError); + const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.testIamPermissions(request), expectedError); + }); + }); + + describe('getProjectSettings', () => { + it('invokes getProjectSettings without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetProjectSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ProjectSettings() + ); + client.innerApiCalls.getProjectSettings = stubSimpleCall(expectedResponse); + const [response] = await client.getProjectSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProjectSettings without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetProjectSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ProjectSettings() + ); + client.innerApiCalls.getProjectSettings = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getProjectSettings( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IProjectSettings|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProjectSettings with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetProjectSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getProjectSettings = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getProjectSettings(request), expectedError); + const actualRequest = (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProjectSettings with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetProjectSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getProjectSettings(request), expectedError); + }); + }); + + describe('updateProjectSettings', () => { + it('invokes updateProjectSettings without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() + ); + request.projectSettings ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest', ['projectSettings', 'name']); + request.projectSettings.name = defaultValue1; + const expectedHeaderRequestParams = `project_settings.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ProjectSettings() + ); + client.innerApiCalls.updateProjectSettings = stubSimpleCall(expectedResponse); + const [response] = await client.updateProjectSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProjectSettings without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() + ); + request.projectSettings ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest', ['projectSettings', 'name']); + request.projectSettings.name = defaultValue1; + const expectedHeaderRequestParams = `project_settings.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ProjectSettings() + ); + client.innerApiCalls.updateProjectSettings = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateProjectSettings( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IProjectSettings|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProjectSettings with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() + ); + request.projectSettings ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest', ['projectSettings', 'name']); + request.projectSettings.name = defaultValue1; + const expectedHeaderRequestParams = `project_settings.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateProjectSettings = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateProjectSettings(request), expectedError); + const actualRequest = (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProjectSettings with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() + ); + request.projectSettings ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest', ['projectSettings', 'name']); + request.projectSettings.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateProjectSettings(request), expectedError); + }); + }); + + describe('getVPCSCConfig', () => { + it('invokes getVPCSCConfig without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.VPCSCConfig() + ); + client.innerApiCalls.getVpcscConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getVPCSCConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getVpcscConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVpcscConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVPCSCConfig without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.VPCSCConfig() + ); + client.innerApiCalls.getVpcscConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVPCSCConfig( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IVPCSCConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getVpcscConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVpcscConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVPCSCConfig with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getVpcscConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getVPCSCConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.getVpcscConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVpcscConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVPCSCConfig with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getVPCSCConfig(request), expectedError); + }); + }); + + describe('updateVPCSCConfig', () => { + it('invokes updateVPCSCConfig without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest() + ); + request.vpcscConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest', ['vpcscConfig', 'name']); + request.vpcscConfig.name = defaultValue1; + const expectedHeaderRequestParams = `vpcsc_config.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.VPCSCConfig() + ); + client.innerApiCalls.updateVpcscConfig = stubSimpleCall(expectedResponse); + const [response] = await client.updateVPCSCConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateVpcscConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVpcscConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVPCSCConfig without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest() + ); + request.vpcscConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest', ['vpcscConfig', 'name']); + request.vpcscConfig.name = defaultValue1; + const expectedHeaderRequestParams = `vpcsc_config.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.VPCSCConfig() + ); + client.innerApiCalls.updateVpcscConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateVPCSCConfig( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IVPCSCConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateVpcscConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVpcscConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVPCSCConfig with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest() + ); + request.vpcscConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest', ['vpcscConfig', 'name']); + request.vpcscConfig.name = defaultValue1; + const expectedHeaderRequestParams = `vpcsc_config.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateVpcscConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateVPCSCConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.updateVpcscConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVpcscConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVPCSCConfig with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest() + ); + request.vpcscConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest', ['vpcscConfig', 'name']); + request.vpcscConfig.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateVPCSCConfig(request), expectedError); + }); + }); + + describe('updatePackage', () => { + it('invokes updatePackage without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdatePackageRequest() + ); + request.package ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdatePackageRequest', ['package', 'name']); + request.package.name = defaultValue1; + const expectedHeaderRequestParams = `package.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ); + client.innerApiCalls.updatePackage = stubSimpleCall(expectedResponse); + const [response] = await client.updatePackage(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updatePackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updatePackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePackage without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdatePackageRequest() + ); + request.package ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdatePackageRequest', ['package', 'name']); + request.package.name = defaultValue1; + const expectedHeaderRequestParams = `package.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ); + client.innerApiCalls.updatePackage = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updatePackage( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IPackage|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updatePackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updatePackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePackage with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdatePackageRequest() + ); + request.package ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdatePackageRequest', ['package', 'name']); + request.package.name = defaultValue1; + const expectedHeaderRequestParams = `package.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updatePackage = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updatePackage(request), expectedError); + const actualRequest = (client.innerApiCalls.updatePackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updatePackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePackage with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdatePackageRequest() + ); + request.package ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdatePackageRequest', ['package', 'name']); + request.package.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updatePackage(request), expectedError); + }); + }); + + describe('getAttachment', () => { + it('invokes getAttachment without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetAttachmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetAttachmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Attachment() + ); + client.innerApiCalls.getAttachment = stubSimpleCall(expectedResponse); + const [response] = await client.getAttachment(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAttachment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAttachment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachment without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetAttachmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetAttachmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Attachment() + ); + client.innerApiCalls.getAttachment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAttachment( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IAttachment|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAttachment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAttachment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachment with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetAttachmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetAttachmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAttachment = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAttachment(request), expectedError); + const actualRequest = (client.innerApiCalls.getAttachment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAttachment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachment with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetAttachmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetAttachmentRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getAttachment(request), expectedError); + }); + }); + + describe('importAptArtifacts', () => { + it('invokes importAptArtifacts without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + 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); + const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importAptArtifacts without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importAptArtifacts with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.importAptArtifacts = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.importAptArtifacts(request), expectedError); + const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importAptArtifacts with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.importAptArtifacts = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.importAptArtifacts(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkImportAptArtifactsProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkImportAptArtifactsProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkImportAptArtifactsProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkImportAptArtifactsProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('importYumArtifacts', () => { + it('invokes importYumArtifacts without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + 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); + const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importYumArtifacts without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importYumArtifacts with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.importYumArtifacts = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.importYumArtifacts(request), expectedError); + const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importYumArtifacts with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.importYumArtifacts = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.importYumArtifacts(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkImportYumArtifactsProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkImportYumArtifactsProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkImportYumArtifactsProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkImportYumArtifactsProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createRepository', () => { + it('invokes createRepository without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRepositoryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRepository = stubLongRunningCall(expectedResponse); + const [operation] = await client.createRepository(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRepositoryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRepository = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRepository( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRepositoryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRepository = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createRepository(request), expectedError); + const actualRequest = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRepositoryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRepository = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createRepository(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateRepositoryProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateRepositoryProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateRepositoryProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateRepositoryProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteRepository', () => { + it('invokes deleteRepository without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteRepository = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteRepository(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteRepository = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteRepository( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteRepository = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteRepository(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteRepository = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteRepository(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteRepositoryProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteRepositoryProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteRepositoryProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteRepositoryProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deletePackage', () => { + it('invokes deletePackage without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeletePackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deletePackage = stubLongRunningCall(expectedResponse); + const [operation] = await client.deletePackage(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePackage without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeletePackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deletePackage = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deletePackage( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePackage with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeletePackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePackage = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deletePackage(request), expectedError); + const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePackage with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeletePackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePackage = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deletePackage(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeletePackageProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeletePackageProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeletePackageProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeletePackageProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteVersion', () => { + it('invokes deleteVersion without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteVersion = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteVersion(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVersion without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteVersion = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteVersion( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVersion with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVersion = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVersion with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVersion = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteVersion(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteVersionProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteVersionProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteVersionProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteVersionProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('batchDeleteVersions', () => { + it('invokes batchDeleteVersions without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.batchDeleteVersions = stubLongRunningCall(expectedResponse); + const [operation] = await client.batchDeleteVersions(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchDeleteVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeleteVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeleteVersions without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.batchDeleteVersions = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchDeleteVersions( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchDeleteVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeleteVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeleteVersions with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchDeleteVersions = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.batchDeleteVersions(request), expectedError); + const actualRequest = (client.innerApiCalls.batchDeleteVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeleteVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeleteVersions with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchDeleteVersions = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.batchDeleteVersions(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.batchDeleteVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeleteVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkBatchDeleteVersionsProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkBatchDeleteVersionsProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkBatchDeleteVersionsProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkBatchDeleteVersionsProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteFile', () => { + it('invokes deleteFile without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteFileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteFileRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFile = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteFile(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteFile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFile without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteFileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteFileRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFile = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteFile( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteFile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFile with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteFileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteFileRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFile = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteFile(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteFile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFile with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteFileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteFileRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFile = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteFile(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteFile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteFileProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkDeleteFileProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteFileProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteFileProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createAttachment', () => { + it('invokes createAttachment without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateAttachmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateAttachmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAttachment = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAttachment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAttachment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAttachment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAttachment without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateAttachmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateAttachmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAttachment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAttachment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAttachment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAttachment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAttachment with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateAttachmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateAttachmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAttachment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAttachment(request), expectedError); + const actualRequest = (client.innerApiCalls.createAttachment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAttachment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAttachment with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateAttachmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateAttachmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAttachment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAttachment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAttachment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAttachment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAttachmentProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkCreateAttachmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAttachmentProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateAttachmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteAttachment', () => { + it('invokes deleteAttachment without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteAttachmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteAttachmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAttachment = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAttachment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteAttachment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAttachment without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteAttachmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteAttachmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAttachment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAttachment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteAttachment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAttachment with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteAttachmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteAttachmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAttachment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteAttachment(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteAttachment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAttachment with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteAttachmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteAttachmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAttachment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteAttachment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteAttachment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteAttachmentProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkDeleteAttachmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAttachmentProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteAttachmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('exportArtifact', () => { + it('invokes exportArtifact without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ExportArtifactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ExportArtifactRequest', ['repository']); + request.repository = defaultValue1; + const expectedHeaderRequestParams = `repository=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportArtifact = stubLongRunningCall(expectedResponse); + const [operation] = await client.exportArtifact(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportArtifact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportArtifact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportArtifact without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ExportArtifactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ExportArtifactRequest', ['repository']); + request.repository = defaultValue1; + const expectedHeaderRequestParams = `repository=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportArtifact = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.exportArtifact( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportArtifact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportArtifact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportArtifact with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ExportArtifactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ExportArtifactRequest', ['repository']); + request.repository = defaultValue1; + const expectedHeaderRequestParams = `repository=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportArtifact = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.exportArtifact(request), expectedError); + const actualRequest = (client.innerApiCalls.exportArtifact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportArtifact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportArtifact with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ExportArtifactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ExportArtifactRequest', ['repository']); + request.repository = defaultValue1; + const expectedHeaderRequestParams = `repository=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportArtifact = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.exportArtifact(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.exportArtifact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportArtifact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkExportArtifactProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkExportArtifactProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkExportArtifactProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkExportArtifactProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listDockerImages', () => { + it('invokes listDockerImages without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListDockerImagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), + ]; + client.innerApiCalls.listDockerImages = stubSimpleCall(expectedResponse); + const [response] = await client.listDockerImages(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDockerImages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDockerImages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDockerImages without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListDockerImagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), + ]; + client.innerApiCalls.listDockerImages = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDockerImages( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IDockerImage[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDockerImages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDockerImages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDockerImages with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListDockerImagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDockerImages = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDockerImages(request), expectedError); + const actualRequest = (client.innerApiCalls.listDockerImages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDockerImages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDockerImagesStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListDockerImagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), + ]; + client.descriptors.page.listDockerImages.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDockerImagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.DockerImage[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.DockerImage) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listDockerImages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDockerImages, request)); + assert( + (client.descriptors.page.listDockerImages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDockerImagesStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListDockerImagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDockerImages.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDockerImagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.DockerImage[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.DockerImage) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDockerImages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDockerImages, request)); + assert( + (client.descriptors.page.listDockerImages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDockerImages without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListDockerImagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), + ]; + client.descriptors.page.listDockerImages.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.IDockerImage[] = []; + const iterable = client.listDockerImagesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDockerImages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDockerImages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDockerImages with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListDockerImagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDockerImages.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDockerImagesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.IDockerImage[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDockerImages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDockerImages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listMavenArtifacts', () => { + it('invokes listMavenArtifacts without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), + ]; + client.innerApiCalls.listMavenArtifacts = stubSimpleCall(expectedResponse); + const [response] = await client.listMavenArtifacts(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMavenArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMavenArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMavenArtifacts without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), + ]; + client.innerApiCalls.listMavenArtifacts = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMavenArtifacts( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IMavenArtifact[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMavenArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMavenArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMavenArtifacts with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMavenArtifacts = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listMavenArtifacts(request), expectedError); + const actualRequest = (client.innerApiCalls.listMavenArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMavenArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMavenArtifactsStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), + ]; + client.descriptors.page.listMavenArtifacts.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listMavenArtifactsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.MavenArtifact[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.MavenArtifact) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listMavenArtifacts.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMavenArtifacts, request)); + assert( + (client.descriptors.page.listMavenArtifacts.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listMavenArtifactsStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listMavenArtifacts.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listMavenArtifactsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.MavenArtifact[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.MavenArtifact) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listMavenArtifacts.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMavenArtifacts, request)); + assert( + (client.descriptors.page.listMavenArtifacts.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMavenArtifacts without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), + ]; + client.descriptors.page.listMavenArtifacts.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.IMavenArtifact[] = []; + const iterable = client.listMavenArtifactsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listMavenArtifacts.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMavenArtifacts.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMavenArtifacts with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listMavenArtifacts.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMavenArtifactsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.IMavenArtifact[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listMavenArtifacts.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMavenArtifacts.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listNpmPackages', () => { + it('invokes listNpmPackages without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListNpmPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), + ]; + client.innerApiCalls.listNpmPackages = stubSimpleCall(expectedResponse); + const [response] = await client.listNpmPackages(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listNpmPackages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listNpmPackages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listNpmPackages without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListNpmPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), + ]; + client.innerApiCalls.listNpmPackages = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listNpmPackages( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.INpmPackage[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listNpmPackages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listNpmPackages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listNpmPackages with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListNpmPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listNpmPackages = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listNpmPackages(request), expectedError); + const actualRequest = (client.innerApiCalls.listNpmPackages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listNpmPackages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listNpmPackagesStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListNpmPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), + ]; + client.descriptors.page.listNpmPackages.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listNpmPackagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.NpmPackage[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.NpmPackage) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listNpmPackages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listNpmPackages, request)); + assert( + (client.descriptors.page.listNpmPackages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listNpmPackagesStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListNpmPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listNpmPackages.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listNpmPackagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.NpmPackage[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.NpmPackage) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listNpmPackages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listNpmPackages, request)); + assert( + (client.descriptors.page.listNpmPackages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listNpmPackages without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListNpmPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), + ]; + client.descriptors.page.listNpmPackages.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.INpmPackage[] = []; + const iterable = client.listNpmPackagesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listNpmPackages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listNpmPackages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listNpmPackages with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListNpmPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listNpmPackages.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listNpmPackagesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.INpmPackage[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listNpmPackages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listNpmPackages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listPythonPackages', () => { + it('invokes listPythonPackages without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPythonPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), + ]; + client.innerApiCalls.listPythonPackages = stubSimpleCall(expectedResponse); + const [response] = await client.listPythonPackages(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPythonPackages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPythonPackages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPythonPackages without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPythonPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), + ]; + client.innerApiCalls.listPythonPackages = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPythonPackages( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IPythonPackage[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPythonPackages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPythonPackages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPythonPackages with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPythonPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listPythonPackages = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listPythonPackages(request), expectedError); + const actualRequest = (client.innerApiCalls.listPythonPackages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPythonPackages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPythonPackagesStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPythonPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), + ]; + client.descriptors.page.listPythonPackages.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listPythonPackagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.PythonPackage[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.PythonPackage) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listPythonPackages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPythonPackages, request)); + assert( + (client.descriptors.page.listPythonPackages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listPythonPackagesStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPythonPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listPythonPackages.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listPythonPackagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.PythonPackage[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.PythonPackage) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listPythonPackages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPythonPackages, request)); + assert( + (client.descriptors.page.listPythonPackages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPythonPackages without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPythonPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), + ]; + client.descriptors.page.listPythonPackages.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.IPythonPackage[] = []; + const iterable = client.listPythonPackagesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listPythonPackages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPythonPackages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPythonPackages with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPythonPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listPythonPackages.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPythonPackagesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.IPythonPackage[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listPythonPackages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPythonPackages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listRepositories', () => { + it('invokes listRepositories without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRepositoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), + ]; + client.innerApiCalls.listRepositories = stubSimpleCall(expectedResponse); + const [response] = await client.listRepositories(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositories without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRepositoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), + ]; + client.innerApiCalls.listRepositories = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRepositories( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IRepository[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositories with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRepositoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listRepositories = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listRepositories(request), expectedError); + const actualRequest = (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositoriesStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRepositoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), + ]; + client.descriptors.page.listRepositories.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Repository[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Repository) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRepositories, request)); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listRepositoriesStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRepositoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Repository[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Repository) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRepositories, request)); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRepositories without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRepositoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), + ]; + client.descriptors.page.listRepositories.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.IRepository[] = []; + const iterable = client.listRepositoriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRepositories with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRepositoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRepositoriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.IRepository[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listPackages', () => { + it('invokes listPackages without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), + ]; + client.innerApiCalls.listPackages = stubSimpleCall(expectedResponse); + const [response] = await client.listPackages(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPackages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPackages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPackages without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), + ]; + client.innerApiCalls.listPackages = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPackages( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IPackage[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPackages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPackages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPackages with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listPackages = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listPackages(request), expectedError); + const actualRequest = (client.innerApiCalls.listPackages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPackages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPackagesStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), + ]; + client.descriptors.page.listPackages.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listPackagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Package[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Package) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listPackages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPackages, request)); + assert( + (client.descriptors.page.listPackages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listPackagesStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listPackages.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listPackagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Package[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Package) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listPackages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPackages, request)); + assert( + (client.descriptors.page.listPackages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPackages without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), + ]; + client.descriptors.page.listPackages.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.IPackage[] = []; + const iterable = client.listPackagesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listPackages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPackages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPackages with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listPackages.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPackagesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.IPackage[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listPackages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPackages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listVersions', () => { + it('invokes listVersions without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), + ]; + client.innerApiCalls.listVersions = stubSimpleCall(expectedResponse); + const [response] = await client.listVersions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVersions without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), + ]; + client.innerApiCalls.listVersions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listVersions( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IVersion[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVersions with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listVersions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listVersions(request), expectedError); + const actualRequest = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVersionsStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), + ]; + client.descriptors.page.listVersions.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Version[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Version) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listVersions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listVersions, request)); + assert( + (client.descriptors.page.listVersions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listVersionsStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listVersions.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Version[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Version) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listVersions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listVersions, request)); + assert( + (client.descriptors.page.listVersions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVersions without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), + ]; + client.descriptors.page.listVersions.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.IVersion[] = []; + const iterable = client.listVersionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listVersions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listVersions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVersions with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listVersionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.IVersion[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listVersions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listVersions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listFiles', () => { + it('invokes listFiles without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListFilesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), + ]; + client.innerApiCalls.listFiles = stubSimpleCall(expectedResponse); + const [response] = await client.listFiles(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFiles as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFiles as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFiles without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListFilesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), + ]; + client.innerApiCalls.listFiles = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFiles( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IFile[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFiles as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFiles as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFiles with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListFilesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFiles = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listFiles(request), expectedError); + const actualRequest = (client.innerApiCalls.listFiles as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFiles as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFilesStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListFilesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), + ]; + client.descriptors.page.listFiles.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listFilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.File[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.File) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listFiles.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFiles, request)); + assert( + (client.descriptors.page.listFiles.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listFilesStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListFilesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFiles.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listFilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.File[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.File) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listFiles.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFiles, request)); + assert( + (client.descriptors.page.listFiles.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFiles without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListFilesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), + ]; + client.descriptors.page.listFiles.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.IFile[] = []; + const iterable = client.listFilesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listFiles.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFiles.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFiles with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListFilesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFiles.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFilesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.IFile[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listFiles.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFiles.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listTags', () => { + it('invokes listTags without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), + ]; + client.innerApiCalls.listTags = stubSimpleCall(expectedResponse); + const [response] = await client.listTags(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listTags as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTags as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTags without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), + ]; + client.innerApiCalls.listTags = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTags( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.ITag[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listTags as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTags as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTags with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listTags = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listTags(request), expectedError); + const actualRequest = (client.innerApiCalls.listTags as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTags as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTagsStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), + ]; + client.descriptors.page.listTags.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listTagsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Tag[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Tag) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listTags.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listTags, request)); + assert( + (client.descriptors.page.listTags.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listTagsStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listTags.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listTagsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Tag[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Tag) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listTags.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listTags, request)); + assert( + (client.descriptors.page.listTags.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTags without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), + ]; + client.descriptors.page.listTags.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.ITag[] = []; + const iterable = client.listTagsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listTags.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listTags.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTags with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listTags.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listTagsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.ITag[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listTags.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listTags.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listRules', () => { + it('invokes listRules without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), + ]; + client.innerApiCalls.listRules = stubSimpleCall(expectedResponse); + const [response] = await client.listRules(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRules without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), + ]; + client.innerApiCalls.listRules = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRules( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IRule[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRules with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listRules = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listRules(request), expectedError); + const actualRequest = (client.innerApiCalls.listRules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRulesStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), + ]; + client.descriptors.page.listRules.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listRulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Rule[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Rule) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listRules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRules, request)); + assert( + (client.descriptors.page.listRules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listRulesStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listRules.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listRulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Rule[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Rule) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listRules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRules, request)); + assert( + (client.descriptors.page.listRules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRules without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), + ]; + client.descriptors.page.listRules.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.IRule[] = []; + const iterable = client.listRulesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listRules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRules with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listRules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRulesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.IRule[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listRules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listAttachments', () => { + it('invokes listAttachments without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListAttachmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), + ]; + client.innerApiCalls.listAttachments = stubSimpleCall(expectedResponse); + const [response] = await client.listAttachments(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAttachments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAttachments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAttachments without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListAttachmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), + ]; + client.innerApiCalls.listAttachments = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAttachments( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IAttachment[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAttachments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAttachments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAttachments with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListAttachmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAttachments = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAttachments(request), expectedError); + const actualRequest = (client.innerApiCalls.listAttachments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAttachments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAttachmentsStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListAttachmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), + ]; + client.descriptors.page.listAttachments.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAttachmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Attachment[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Attachment) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listAttachments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAttachments, request)); + assert( + (client.descriptors.page.listAttachments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAttachmentsStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListAttachmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAttachments.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAttachmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Attachment[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Attachment) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAttachments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAttachments, request)); + assert( + (client.descriptors.page.listAttachments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAttachments without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListAttachmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), + ]; + client.descriptors.page.listAttachments.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.IAttachment[] = []; + const iterable = client.listAttachmentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAttachments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAttachments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAttachments with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListAttachmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAttachments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAttachmentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.IAttachment[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAttachments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAttachments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('aptArtifact', async () => { + const fakePath = "/rendered/path/aptArtifact"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + apt_artifact: "aptArtifactValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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('attachment', async () => { + const fakePath = "/rendered/path/attachment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + attachment: "attachmentValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.attachmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.attachmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('attachmentPath', () => { + const result = client.attachmentPath("projectValue", "locationValue", "repositoryValue", "attachmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.attachmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAttachmentName', () => { + const result = client.matchProjectFromAttachmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.attachmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAttachmentName', () => { + const result = client.matchLocationFromAttachmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.attachmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRepositoryFromAttachmentName', () => { + const result = client.matchRepositoryFromAttachmentName(fakePath); + assert.strictEqual(result, "repositoryValue"); + assert((client.pathTemplates.attachmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAttachmentFromAttachmentName', () => { + const result = client.matchAttachmentFromAttachmentName(fakePath); + assert.strictEqual(result, "attachmentValue"); + assert((client.pathTemplates.attachmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dockerImage', async () => { + const fakePath = "/rendered/path/dockerImage"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + docker_image: "dockerImageValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dockerImagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dockerImagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dockerImagePath', () => { + const result = client.dockerImagePath("projectValue", "locationValue", "repositoryValue", "dockerImageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dockerImagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDockerImageName', () => { + const result = client.matchProjectFromDockerImageName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dockerImagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDockerImageName', () => { + const result = client.matchLocationFromDockerImageName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dockerImagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRepositoryFromDockerImageName', () => { + const result = client.matchRepositoryFromDockerImageName(fakePath); + assert.strictEqual(result, "repositoryValue"); + assert((client.pathTemplates.dockerImagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDockerImageFromDockerImageName', () => { + const result = client.matchDockerImageFromDockerImageName(fakePath); + assert.strictEqual(result, "dockerImageValue"); + assert((client.pathTemplates.dockerImagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('file', async () => { + const fakePath = "/rendered/path/file"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + file: "fileValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.filePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.filePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('filePath', () => { + const result = client.filePath("projectValue", "locationValue", "repositoryValue", "fileValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.filePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromFileName', () => { + const result = client.matchProjectFromFileName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.filePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFileName', () => { + const result = client.matchLocationFromFileName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.filePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRepositoryFromFileName', () => { + const result = client.matchRepositoryFromFileName(fakePath); + assert.strictEqual(result, "repositoryValue"); + assert((client.pathTemplates.filePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFileFromFileName', () => { + const result = client.matchFileFromFileName(fakePath); + assert.strictEqual(result, "fileValue"); + assert((client.pathTemplates.filePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('genericArtifact', async () => { + const fakePath = "/rendered/path/genericArtifact"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + generic_artifact: "genericArtifactValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.genericArtifactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.genericArtifactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('genericArtifactPath', () => { + const result = client.genericArtifactPath("projectValue", "locationValue", "repositoryValue", "genericArtifactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.genericArtifactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromGenericArtifactName', () => { + const result = client.matchProjectFromGenericArtifactName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.genericArtifactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromGenericArtifactName', () => { + const result = client.matchLocationFromGenericArtifactName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.genericArtifactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRepositoryFromGenericArtifactName', () => { + const result = client.matchRepositoryFromGenericArtifactName(fakePath); + assert.strictEqual(result, "repositoryValue"); + assert((client.pathTemplates.genericArtifactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGenericArtifactFromGenericArtifactName', () => { + const result = client.matchGenericArtifactFromGenericArtifactName(fakePath); + assert.strictEqual(result, "genericArtifactValue"); + assert((client.pathTemplates.genericArtifactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('goModule', async () => { + const fakePath = "/rendered/path/goModule"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + go_module: "goModuleValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.goModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.goModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('goModulePath', () => { + const result = client.goModulePath("projectValue", "locationValue", "repositoryValue", "goModuleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.goModulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromGoModuleName', () => { + const result = client.matchProjectFromGoModuleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.goModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromGoModuleName', () => { + const result = client.matchLocationFromGoModuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.goModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRepositoryFromGoModuleName', () => { + const result = client.matchRepositoryFromGoModuleName(fakePath); + assert.strictEqual(result, "repositoryValue"); + assert((client.pathTemplates.goModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGoModuleFromGoModuleName', () => { + const result = client.matchGoModuleFromGoModuleName(fakePath); + assert.strictEqual(result, "goModuleValue"); + assert((client.pathTemplates.goModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('kfpArtifact', async () => { + const fakePath = "/rendered/path/kfpArtifact"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + kfp_artifact: "kfpArtifactValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.kfpArtifactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.kfpArtifactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('kfpArtifactPath', () => { + const result = client.kfpArtifactPath("projectValue", "locationValue", "repositoryValue", "kfpArtifactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.kfpArtifactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromKfpArtifactName', () => { + const result = client.matchProjectFromKfpArtifactName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.kfpArtifactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromKfpArtifactName', () => { + const result = client.matchLocationFromKfpArtifactName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.kfpArtifactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRepositoryFromKfpArtifactName', () => { + const result = client.matchRepositoryFromKfpArtifactName(fakePath); + assert.strictEqual(result, "repositoryValue"); + assert((client.pathTemplates.kfpArtifactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchKfpArtifactFromKfpArtifactName', () => { + const result = client.matchKfpArtifactFromKfpArtifactName(fakePath); + assert.strictEqual(result, "kfpArtifactValue"); + assert((client.pathTemplates.kfpArtifactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mavenArtifact', async () => { + const fakePath = "/rendered/path/mavenArtifact"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + maven_artifact: "mavenArtifactValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mavenArtifactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mavenArtifactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mavenArtifactPath', () => { + const result = client.mavenArtifactPath("projectValue", "locationValue", "repositoryValue", "mavenArtifactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mavenArtifactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromMavenArtifactName', () => { + const result = client.matchProjectFromMavenArtifactName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.mavenArtifactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromMavenArtifactName', () => { + const result = client.matchLocationFromMavenArtifactName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.mavenArtifactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRepositoryFromMavenArtifactName', () => { + const result = client.matchRepositoryFromMavenArtifactName(fakePath); + assert.strictEqual(result, "repositoryValue"); + assert((client.pathTemplates.mavenArtifactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMavenArtifactFromMavenArtifactName', () => { + const result = client.matchMavenArtifactFromMavenArtifactName(fakePath); + assert.strictEqual(result, "mavenArtifactValue"); + assert((client.pathTemplates.mavenArtifactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('npmPackage', async () => { + const fakePath = "/rendered/path/npmPackage"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + npm_package: "npmPackageValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.npmPackagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.npmPackagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('npmPackagePath', () => { + const result = client.npmPackagePath("projectValue", "locationValue", "repositoryValue", "npmPackageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.npmPackagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromNpmPackageName', () => { + const result = client.matchProjectFromNpmPackageName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.npmPackagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromNpmPackageName', () => { + const result = client.matchLocationFromNpmPackageName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.npmPackagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRepositoryFromNpmPackageName', () => { + const result = client.matchRepositoryFromNpmPackageName(fakePath); + assert.strictEqual(result, "repositoryValue"); + assert((client.pathTemplates.npmPackagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchNpmPackageFromNpmPackageName', () => { + const result = client.matchNpmPackageFromNpmPackageName(fakePath); + assert.strictEqual(result, "npmPackageValue"); + assert((client.pathTemplates.npmPackagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('package', async () => { + const fakePath = "/rendered/path/package"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + package: "packageValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.packagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.packagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('packagePath', () => { + const result = client.packagePath("projectValue", "locationValue", "repositoryValue", "packageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.packagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPackageName', () => { + const result = client.matchProjectFromPackageName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.packagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPackageName', () => { + const result = client.matchLocationFromPackageName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.packagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRepositoryFromPackageName', () => { + const result = client.matchRepositoryFromPackageName(fakePath); + assert.strictEqual(result, "repositoryValue"); + assert((client.pathTemplates.packagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPackageFromPackageName', () => { + const result = client.matchPackageFromPackageName(fakePath); + assert.strictEqual(result, "packageValue"); + assert((client.pathTemplates.packagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectSettings', async () => { + const fakePath = "/rendered/path/projectSettings"; + const expectedParameters = { + project: "projectValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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('pythonPackage', async () => { + const fakePath = "/rendered/path/pythonPackage"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + python_package: "pythonPackageValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.pythonPackagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.pythonPackagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('pythonPackagePath', () => { + const result = client.pythonPackagePath("projectValue", "locationValue", "repositoryValue", "pythonPackageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.pythonPackagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPythonPackageName', () => { + const result = client.matchProjectFromPythonPackageName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.pythonPackagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPythonPackageName', () => { + const result = client.matchLocationFromPythonPackageName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.pythonPackagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRepositoryFromPythonPackageName', () => { + const result = client.matchRepositoryFromPythonPackageName(fakePath); + assert.strictEqual(result, "repositoryValue"); + assert((client.pathTemplates.pythonPackagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPythonPackageFromPythonPackageName', () => { + const result = client.matchPythonPackageFromPythonPackageName(fakePath); + assert.strictEqual(result, "pythonPackageValue"); + assert((client.pathTemplates.pythonPackagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('repository', async () => { + const fakePath = "/rendered/path/repository"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.repositoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.repositoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('repositoryPath', () => { + const result = client.repositoryPath("projectValue", "locationValue", "repositoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.repositoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromRepositoryName', () => { + const result = client.matchProjectFromRepositoryName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromRepositoryName', () => { + const result = client.matchLocationFromRepositoryName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRepositoryFromRepositoryName', () => { + const result = client.matchRepositoryFromRepositoryName(fakePath); + assert.strictEqual(result, "repositoryValue"); + assert((client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('rule', async () => { + const fakePath = "/rendered/path/rule"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + rule: "ruleValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rulePath', () => { + const result = client.rulePath("projectValue", "locationValue", "repositoryValue", "ruleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromRuleName', () => { + const result = client.matchProjectFromRuleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.rulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromRuleName', () => { + const result = client.matchLocationFromRuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.rulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRepositoryFromRuleName', () => { + const result = client.matchRepositoryFromRuleName(fakePath); + assert.strictEqual(result, "repositoryValue"); + assert((client.pathTemplates.rulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRuleFromRuleName', () => { + const result = client.matchRuleFromRuleName(fakePath); + assert.strictEqual(result, "ruleValue"); + assert((client.pathTemplates.rulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('tag', async () => { + const fakePath = "/rendered/path/tag"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + package: "packageValue", + tag: "tagValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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', async () => { + const fakePath = "/rendered/path/version"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + package: "packageValue", + version: "versionValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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('vpcscConfig', async () => { + const fakePath = "/rendered/path/vpcscConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.vpcscConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.vpcscConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('vpcscConfigPath', () => { + const result = client.vpcscConfigPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.vpcscConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromVpcscConfigName', () => { + const result = client.matchProjectFromVpcscConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.vpcscConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromVpcscConfigName', () => { + const result = client.matchLocationFromVpcscConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.vpcscConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('yumArtifact', async () => { + const fakePath = "/rendered/path/yumArtifact"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + yum_artifact: "yumArtifactValue", + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts b/owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts new file mode 100644 index 00000000000..f086ae748b9 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts @@ -0,0 +1,4481 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as artifactregistryModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta2.ArtifactRegistryClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'artifactregistry.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = artifactregistryModule.v1beta2.ArtifactRegistryClient.servicePath; + assert.strictEqual(servicePath, 'artifactregistry.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = artifactregistryModule.v1beta2.ArtifactRegistryClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'artifactregistry.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'artifactregistry.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'artifactregistry.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'artifactregistry.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'artifactregistry.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new artifactregistryModule.v1beta2.ArtifactRegistryClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = artifactregistryModule.v1beta2.ArtifactRegistryClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.artifactRegistryStub, undefined); + await client.initialize(); + assert(client.artifactRegistryStub); + }); + + 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.initialize().catch(err => {throw err}); + assert(client.artifactRegistryStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + 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(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getRepository', () => { + it('invokes getRepository without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.Repository() + ); + client.innerApiCalls.getRepository = stubSimpleCall(expectedResponse); + const [response] = await client.getRepository(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.Repository() + ); + client.innerApiCalls.getRepository = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRepository( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IRepository|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getRepository = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getRepository(request), expectedError); + const actualRequest = (client.innerApiCalls.getRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getRepository(request), expectedError); + }); + }); + + describe('updateRepository', () => { + it('invokes updateRepository without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest', ['repository', 'name']); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.Repository() + ); + client.innerApiCalls.updateRepository = stubSimpleCall(expectedResponse); + const [response] = await client.updateRepository(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRepository without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest', ['repository', 'name']); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.Repository() + ); + client.innerApiCalls.updateRepository = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateRepository( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IRepository|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRepository with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest', ['repository', 'name']); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateRepository = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateRepository(request), expectedError); + const actualRequest = (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateRepository with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest() + ); + request.repository ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest', ['repository', 'name']); + request.repository.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateRepository(request), expectedError); + }); + }); + + describe('getPackage', () => { + it('invokes getPackage without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetPackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.Package() + ); + client.innerApiCalls.getPackage = stubSimpleCall(expectedResponse); + const [response] = await client.getPackage(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPackage without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetPackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.Package() + ); + client.innerApiCalls.getPackage = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPackage( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IPackage|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPackage with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetPackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPackage = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getPackage(request), expectedError); + const actualRequest = (client.innerApiCalls.getPackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPackage with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetPackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetPackageRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getPackage(request), expectedError); + }); + }); + + describe('getVersion', () => { + it('invokes getVersion without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.Version() + ); + client.innerApiCalls.getVersion = stubSimpleCall(expectedResponse); + const [response] = await client.getVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVersion without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.Version() + ); + client.innerApiCalls.getVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVersion( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IVersion|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVersion with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVersion with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getVersion(request), expectedError); + }); + }); + + describe('getFile', () => { + it('invokes getFile without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetFileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetFileRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.File() + ); + client.innerApiCalls.getFile = stubSimpleCall(expectedResponse); + const [response] = await client.getFile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getFile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFile without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetFileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetFileRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.File() + ); + client.innerApiCalls.getFile = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getFile( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IFile|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getFile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFile with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetFileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetFileRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getFile(request), expectedError); + const actualRequest = (client.innerApiCalls.getFile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFile with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetFileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetFileRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getFile(request), expectedError); + }); + }); + + describe('getTag', () => { + it('invokes getTag without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetTagRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.Tag() + ); + client.innerApiCalls.getTag = stubSimpleCall(expectedResponse); + const [response] = await client.getTag(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTag without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetTagRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.Tag() + ); + client.innerApiCalls.getTag = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getTag( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.ITag|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTag with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetTagRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getTag = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getTag(request), expectedError); + const actualRequest = (client.innerApiCalls.getTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTag with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetTagRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getTag(request), expectedError); + }); + }); + + describe('createTag', () => { + it('invokes createTag without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.CreateTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateTagRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.Tag() + ); + client.innerApiCalls.createTag = stubSimpleCall(expectedResponse); + const [response] = await client.createTag(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTag without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.CreateTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateTagRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.Tag() + ); + client.innerApiCalls.createTag = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createTag( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.ITag|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTag with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.CreateTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateTagRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createTag = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createTag(request), expectedError); + const actualRequest = (client.innerApiCalls.createTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTag with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.CreateTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateTagRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createTag(request), expectedError); + }); + }); + + describe('updateTag', () => { + it('invokes updateTag without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.UpdateTagRequest() + ); + request.tag ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateTagRequest', ['tag', 'name']); + request.tag.name = defaultValue1; + const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.Tag() + ); + client.innerApiCalls.updateTag = stubSimpleCall(expectedResponse); + const [response] = await client.updateTag(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTag without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.UpdateTagRequest() + ); + request.tag ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateTagRequest', ['tag', 'name']); + request.tag.name = defaultValue1; + const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.Tag() + ); + client.innerApiCalls.updateTag = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateTag( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.ITag|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTag with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.UpdateTagRequest() + ); + request.tag ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateTagRequest', ['tag', 'name']); + request.tag.name = defaultValue1; + const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTag = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateTag(request), expectedError); + const actualRequest = (client.innerApiCalls.updateTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTag with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.UpdateTagRequest() + ); + request.tag ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateTagRequest', ['tag', 'name']); + request.tag.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateTag(request), expectedError); + }); + }); + + describe('deleteTag', () => { + it('invokes deleteTag without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeleteTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteTagRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteTag = stubSimpleCall(expectedResponse); + const [response] = await client.deleteTag(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTag without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeleteTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteTagRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteTag = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteTag( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTag with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeleteTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteTagRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTag = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteTag(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTag with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeleteTagRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteTagRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteTag(request), expectedError); + }); + }); + + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setIamPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.setIamPolicy(request), expectedError); + }); + }); + + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getIamPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getIamPolicy(request), expectedError); + }); + }); + + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = stubSimpleCall(expectedResponse); + const [response] = await client.testIamPermissions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + (err?: Error|null, result?: protos.google.iam.v1.ITestIamPermissionsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.testIamPermissions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.testIamPermissions(request), expectedError); + const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + 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', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + 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); + const actualRequest = (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProjectSettings without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + 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); + const actualRequest = (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProjectSettings with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getProjectSettings = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getProjectSettings(request), expectedError); + const actualRequest = (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProjectSettings with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + 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', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest() + ); + request.projectSettings ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest', ['projectSettings', 'name']); + request.projectSettings.name = defaultValue1; + const expectedHeaderRequestParams = `project_settings.name=${defaultValue1 ?? '' }`; + 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); + const actualRequest = (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProjectSettings without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest() + ); + request.projectSettings ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest', ['projectSettings', 'name']); + request.projectSettings.name = defaultValue1; + const expectedHeaderRequestParams = `project_settings.name=${defaultValue1 ?? '' }`; + 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); + const actualRequest = (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProjectSettings with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest() + ); + request.projectSettings ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest', ['projectSettings', 'name']); + request.projectSettings.name = defaultValue1; + const expectedHeaderRequestParams = `project_settings.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateProjectSettings = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateProjectSettings(request), expectedError); + const actualRequest = (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProjectSettings with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest() + ); + request.projectSettings ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest', ['projectSettings', 'name']); + request.projectSettings.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + 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', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + 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); + const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importAptArtifacts without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importAptArtifacts with call error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.importAptArtifacts = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.importAptArtifacts(request), expectedError); + const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importAptArtifacts with LRO error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.importAptArtifacts = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.importAptArtifacts(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkImportAptArtifactsProgress without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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', + }); + await 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', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + 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); + const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importYumArtifacts without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + 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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importYumArtifacts with call error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.importYumArtifacts = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.importYumArtifacts(request), expectedError); + const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importYumArtifacts with LRO error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.importYumArtifacts = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.importYumArtifacts(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkImportYumArtifactsProgress without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkImportYumArtifactsProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createRepository', () => { + it('invokes createRepository without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRepository = stubLongRunningCall(expectedResponse); + const [operation] = await client.createRepository(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRepository = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRepository( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository with call error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRepository = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createRepository(request), expectedError); + const actualRequest = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository with LRO error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRepository = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createRepository(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateRepositoryProgress without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateRepositoryProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateRepositoryProgress with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateRepositoryProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteRepository', () => { + it('invokes deleteRepository without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteRepository = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteRepository(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteRepository = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteRepository( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository with call error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteRepository = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteRepository(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository with LRO error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteRepository = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteRepository(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteRepositoryProgress without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteRepositoryProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteRepositoryProgress with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteRepositoryProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deletePackage', () => { + it('invokes deletePackage without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeletePackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeletePackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deletePackage = stubLongRunningCall(expectedResponse); + const [operation] = await client.deletePackage(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePackage without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeletePackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeletePackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deletePackage = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deletePackage( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePackage with call error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeletePackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeletePackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePackage = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deletePackage(request), expectedError); + const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePackage with LRO error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeletePackageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeletePackageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePackage = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deletePackage(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeletePackageProgress without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeletePackageProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeletePackageProgress with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeletePackageProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteVersion', () => { + it('invokes deleteVersion without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteVersion = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteVersion(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVersion without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteVersion = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteVersion( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVersion with call error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVersion = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVersion with LRO error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVersion = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteVersion(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteVersionProgress without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteVersionProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteVersionProgress with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteVersionProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listRepositories', () => { + it('invokes listRepositories without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), + ]; + client.innerApiCalls.listRepositories = stubSimpleCall(expectedResponse); + const [response] = await client.listRepositories(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositories without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), + ]; + client.innerApiCalls.listRepositories = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRepositories( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IRepository[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositories with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listRepositories = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listRepositories(request), expectedError); + const actualRequest = (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositoriesStream without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), + ]; + client.descriptors.page.listRepositories.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1beta2.Repository[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Repository) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRepositories, request)); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listRepositoriesStream with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1beta2.Repository[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Repository) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRepositories, request)); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRepositories without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), + ]; + client.descriptors.page.listRepositories.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1beta2.IRepository[] = []; + const iterable = client.listRepositoriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRepositories with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRepositoriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1beta2.IRepository[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listPackages', () => { + it('invokes listPackages without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), + ]; + client.innerApiCalls.listPackages = stubSimpleCall(expectedResponse); + const [response] = await client.listPackages(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPackages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPackages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPackages without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), + ]; + client.innerApiCalls.listPackages = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPackages( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IPackage[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPackages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPackages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPackages with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listPackages = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listPackages(request), expectedError); + const actualRequest = (client.innerApiCalls.listPackages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPackages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPackagesStream without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), + ]; + client.descriptors.page.listPackages.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listPackagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1beta2.Package[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Package) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listPackages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPackages, request)); + assert( + (client.descriptors.page.listPackages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listPackagesStream with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listPackages.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listPackagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1beta2.Package[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Package) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listPackages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPackages, request)); + assert( + (client.descriptors.page.listPackages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPackages without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), + ]; + client.descriptors.page.listPackages.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1beta2.IPackage[] = []; + const iterable = client.listPackagesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listPackages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPackages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPackages with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListPackagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listPackages.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPackagesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1beta2.IPackage[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listPackages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPackages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listVersions', () => { + it('invokes listVersions without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), + ]; + client.innerApiCalls.listVersions = stubSimpleCall(expectedResponse); + const [response] = await client.listVersions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVersions without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), + ]; + client.innerApiCalls.listVersions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listVersions( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IVersion[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVersions with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listVersions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listVersions(request), expectedError); + const actualRequest = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVersionsStream without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), + ]; + client.descriptors.page.listVersions.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1beta2.Version[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Version) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listVersions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listVersions, request)); + assert( + (client.descriptors.page.listVersions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listVersionsStream with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listVersions.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1beta2.Version[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Version) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listVersions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listVersions, request)); + assert( + (client.descriptors.page.listVersions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVersions without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), + ]; + client.descriptors.page.listVersions.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1beta2.IVersion[] = []; + const iterable = client.listVersionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listVersions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listVersions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVersions with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listVersionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1beta2.IVersion[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listVersions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listVersions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listFiles', () => { + it('invokes listFiles without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListFilesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), + ]; + client.innerApiCalls.listFiles = stubSimpleCall(expectedResponse); + const [response] = await client.listFiles(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFiles as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFiles as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFiles without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListFilesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), + ]; + client.innerApiCalls.listFiles = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFiles( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IFile[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFiles as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFiles as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFiles with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListFilesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFiles = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listFiles(request), expectedError); + const actualRequest = (client.innerApiCalls.listFiles as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFiles as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFilesStream without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListFilesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), + ]; + client.descriptors.page.listFiles.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listFilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1beta2.File[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.File) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listFiles.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFiles, request)); + assert( + (client.descriptors.page.listFiles.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listFilesStream with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListFilesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFiles.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listFilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1beta2.File[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.File) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listFiles.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFiles, request)); + assert( + (client.descriptors.page.listFiles.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFiles without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListFilesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), + ]; + client.descriptors.page.listFiles.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1beta2.IFile[] = []; + const iterable = client.listFilesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listFiles.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFiles.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFiles with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListFilesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFiles.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFilesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1beta2.IFile[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listFiles.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFiles.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listTags', () => { + it('invokes listTags without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), + ]; + client.innerApiCalls.listTags = stubSimpleCall(expectedResponse); + const [response] = await client.listTags(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listTags as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTags as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTags without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), + ]; + client.innerApiCalls.listTags = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTags( + request, + (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.ITag[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listTags as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTags as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTags with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listTags = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listTags(request), expectedError); + const actualRequest = (client.innerApiCalls.listTags as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTags as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTagsStream without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), + ]; + client.descriptors.page.listTags.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listTagsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1beta2.Tag[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Tag) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listTags.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listTags, request)); + assert( + (client.descriptors.page.listTags.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listTagsStream with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listTags.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listTagsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1beta2.Tag[] = []; + stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Tag) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listTags.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listTags, request)); + assert( + (client.descriptors.page.listTags.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTags without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), + generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), + ]; + client.descriptors.page.listTags.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1beta2.ITag[] = []; + const iterable = client.listTagsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listTags.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listTags.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTags with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListTagsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listTags.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listTagsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1beta2.ITag[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listTags.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listTags.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('aptArtifact', async () => { + 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', + }); + await 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', async () => { + const fakePath = "/rendered/path/file"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + file: "fileValue", + }; + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.filePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.filePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('filePath', () => { + const result = client.filePath("projectValue", "locationValue", "repositoryValue", "fileValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.filePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromFileName', () => { + const result = client.matchProjectFromFileName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.filePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFileName', () => { + const result = client.matchLocationFromFileName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.filePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRepositoryFromFileName', () => { + const result = client.matchRepositoryFromFileName(fakePath); + assert.strictEqual(result, "repositoryValue"); + assert((client.pathTemplates.filePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFileFromFileName', () => { + const result = client.matchFileFromFileName(fakePath); + assert.strictEqual(result, "fileValue"); + assert((client.pathTemplates.filePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectSettings', async () => { + const fakePath = "/rendered/path/projectSettings"; + const expectedParameters = { + project: "projectValue", + }; + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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', async () => { + const fakePath = "/rendered/path/repository"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + repository: "repositoryValue", + }; + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.repositoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.repositoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('repositoryPath', () => { + const result = client.repositoryPath("projectValue", "locationValue", "repositoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.repositoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromRepositoryName', () => { + const result = client.matchProjectFromRepositoryName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromRepositoryName', () => { + const result = client.matchLocationFromRepositoryName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRepositoryFromRepositoryName', () => { + const result = client.matchRepositoryFromRepositoryName(fakePath); + assert.strictEqual(result, "repositoryValue"); + assert((client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('tag', async () => { + 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', + }); + await 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', async () => { + 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', + }); + await 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', async () => { + 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', + }); + await 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)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-devtools-artifactregistry/tsconfig.json b/owl-bot-staging/google-devtools-artifactregistry/tsconfig.json new file mode 100644 index 00000000000..ca73e7bfc82 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/owl-bot-staging/google-devtools-artifactregistry/webpack.config.js b/owl-bot-staging/google-devtools-artifactregistry/webpack.config.js new file mode 100644 index 00000000000..d7daabc3ee8 --- /dev/null +++ b/owl-bot-staging/google-devtools-artifactregistry/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'ArtifactRegistry', + filename: './artifact-registry.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; From 1d6457244e37f5262e01d743dff3330b3b191447 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 20 Dec 2025 01:22:25 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.eslintignore | 7 - .../.eslintrc.json | 3 - .../.gitattributes | 4 - .../.gitignore | 14 - .../.jsdoc.js | 55 - .../.mocharc.js | 33 - .../google-devtools-artifactregistry/.nycrc | 24 - .../.prettierignore | 6 - .../.prettierrc.js | 22 - .../CODE_OF_CONDUCT.md | 94 - .../CONTRIBUTING.md | 76 - .../google-devtools-artifactregistry/LICENSE | 202 - .../README.md | 190 - .../artifactregistry/v1/apt_artifact.proto | 114 - .../artifactregistry/v1/artifact.proto | 399 - .../artifactregistry/v1/attachment.proto | 160 - .../devtools/artifactregistry/v1/export.proto | 99 - .../devtools/artifactregistry/v1/file.proto | 206 - .../artifactregistry/v1/generic.proto | 55 - .../devtools/artifactregistry/v1/go.proto | 52 - .../artifactregistry/v1/kfp_artifact.proto | 46 - .../artifactregistry/v1/package.proto | 166 - .../artifactregistry/v1/repository.proto | 765 - .../devtools/artifactregistry/v1/rule.proto | 157 - .../artifactregistry/v1/service.proto | 561 - .../artifactregistry/v1/settings.proto | 94 - .../devtools/artifactregistry/v1/tag.proto | 138 - .../artifactregistry/v1/version.proto | 224 - .../artifactregistry/v1/vpcsc_config.proto | 86 - .../artifactregistry/v1/yum_artifact.proto | 106 - .../v1beta2/apt_artifact.proto | 115 - .../artifactregistry/v1beta2/file.proto | 120 - .../artifactregistry/v1beta2/package.proto | 79 - .../artifactregistry/v1beta2/repository.proto | 201 - .../artifactregistry/v1beta2/service.proto | 304 - .../artifactregistry/v1beta2/settings.proto | 84 - .../artifactregistry/v1beta2/tag.proto | 118 - .../artifactregistry/v1beta2/version.proto | 127 - .../v1beta2/yum_artifact.proto | 107 - .../protos/protos.d.ts | 29137 ------- .../protos/protos.js | 71994 ---------------- .../protos/protos.json | 7531 -- ...artifact_registry.batch_delete_versions.js | 72 - .../v1/artifact_registry.create_attachment.js | 73 - .../v1/artifact_registry.create_repository.js | 73 - .../v1/artifact_registry.create_rule.js | 69 - .../v1/artifact_registry.create_tag.js | 68 - .../v1/artifact_registry.delete_attachment.js | 62 - .../v1/artifact_registry.delete_file.js | 62 - .../v1/artifact_registry.delete_package.js | 62 - .../v1/artifact_registry.delete_repository.js | 62 - .../v1/artifact_registry.delete_rule.js | 61 - .../v1/artifact_registry.delete_tag.js | 60 - .../v1/artifact_registry.delete_version.js | 66 - .../v1/artifact_registry.export_artifact.js | 81 - .../v1/artifact_registry.get_attachment.js | 61 - .../v1/artifact_registry.get_docker_image.js | 61 - .../v1/artifact_registry.get_file.js | 61 - .../v1/artifact_registry.get_iam_policy.js | 67 - .../artifact_registry.get_maven_artifact.js | 61 - .../v1/artifact_registry.get_npm_package.js | 61 - .../v1/artifact_registry.get_package.js | 61 - .../artifact_registry.get_project_settings.js | 61 - .../artifact_registry.get_python_package.js | 61 - .../v1/artifact_registry.get_repository.js | 61 - .../v1/artifact_registry.get_rule.js | 61 - .../generated/v1/artifact_registry.get_tag.js | 60 - .../artifact_registry.get_v_p_c_s_c_config.js | 61 - .../v1/artifact_registry.get_version.js | 64 - .../artifact_registry.import_apt_artifacts.js | 65 - .../artifact_registry.import_yum_artifacts.js | 65 - .../v1/artifact_registry.list_attachments.js | 79 - .../artifact_registry.list_docker_images.js | 76 - .../v1/artifact_registry.list_files.js | 113 - .../artifact_registry.list_maven_artifacts.js | 72 - .../v1/artifact_registry.list_npm_packages.js | 72 - .../v1/artifact_registry.list_packages.js | 109 - .../artifact_registry.list_python_packages.js | 72 - .../v1/artifact_registry.list_repositories.js | 92 - .../v1/artifact_registry.list_rules.js | 73 - .../v1/artifact_registry.list_tags.js | 94 - .../v1/artifact_registry.list_versions.js | 112 - .../v1/artifact_registry.set_iam_policy.js | 77 - .../artifact_registry.test_iam_permissions.js | 70 - .../v1/artifact_registry.update_file.js | 68 - .../v1/artifact_registry.update_package.js | 66 - ...tifact_registry.update_project_settings.js | 64 - .../v1/artifact_registry.update_repository.js | 66 - .../v1/artifact_registry.update_rule.js | 66 - .../v1/artifact_registry.update_tag.js | 66 - ...tifact_registry.update_v_p_c_s_c_config.js | 64 - .../v1/artifact_registry.update_version.js | 67 - ...a_google.devtools.artifactregistry.v1.json | 2267 - .../artifact_registry.create_repository.js | 70 - .../v1beta2/artifact_registry.create_tag.js | 68 - .../artifact_registry.delete_package.js | 61 - .../artifact_registry.delete_repository.js | 62 - .../v1beta2/artifact_registry.delete_tag.js | 60 - .../artifact_registry.delete_version.js | 66 - .../v1beta2/artifact_registry.get_file.js | 60 - .../artifact_registry.get_iam_policy.js | 67 - .../v1beta2/artifact_registry.get_package.js | 60 - .../artifact_registry.get_project_settings.js | 61 - .../artifact_registry.get_repository.js | 61 - .../v1beta2/artifact_registry.get_tag.js | 60 - .../v1beta2/artifact_registry.get_version.js | 64 - .../artifact_registry.import_apt_artifacts.js | 65 - .../artifact_registry.import_yum_artifacts.js | 65 - .../v1beta2/artifact_registry.list_files.js | 83 - .../artifact_registry.list_packages.js | 71 - .../artifact_registry.list_repositories.js | 71 - .../v1beta2/artifact_registry.list_tags.js | 79 - .../artifact_registry.list_versions.js | 78 - .../artifact_registry.set_iam_policy.js | 77 - .../artifact_registry.test_iam_permissions.js | 70 - ...tifact_registry.update_project_settings.js | 64 - .../artifact_registry.update_repository.js | 66 - .../v1beta2/artifact_registry.update_tag.js | 66 - ...gle.devtools.artifactregistry.v1beta2.json | 1131 - .../src/index.ts | 28 - .../src/v1/artifact_registry_client.ts | 8608 -- .../v1/artifact_registry_client_config.json | 276 - .../src/v1/artifact_registry_proto_list.json | 19 - .../src/v1/gapic_metadata.json | 567 - .../src/v1/index.ts | 19 - .../src/v1beta2/artifact_registry_client.ts | 4020 - .../artifact_registry_client_config.json | 149 - .../v1beta2/artifact_registry_proto_list.json | 11 - .../src/v1beta2/gapic_metadata.json | 293 - .../src/v1beta2/index.ts | 19 - .../system-test/fixtures/sample/src/index.js | 27 - .../system-test/fixtures/sample/src/index.ts | 32 - .../system-test/install.ts | 49 - .../test/gapic_artifact_registry_v1.ts | 9086 -- .../test/gapic_artifact_registry_v1beta2.ts | 4481 - .../tsconfig.json | 22 - .../webpack.config.js | 64 - .../artifactregistry/v1/service.proto | 2 +- .../artifactregistry/v1/version.proto | 6 + .../protos/protos.d.ts | 6 + .../protos/protos.js | 47 +- .../protos/protos.json | 8 + ...a_google.devtools.artifactregistry.v1.json | 2 +- .../src/v1/artifact_registry_client.ts | 2 +- 144 files changed, 69 insertions(+), 150423 deletions(-) delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/.eslintignore delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/.eslintrc.json delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/.gitattributes delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/.gitignore delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/.jsdoc.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/.mocharc.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/.nycrc delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/.prettierignore delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/.prettierrc.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/CODE_OF_CONDUCT.md delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/CONTRIBUTING.md delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/LICENSE delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/README.md delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/apt_artifact.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/artifact.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/attachment.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/export.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/file.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/generic.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/go.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/kfp_artifact.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/package.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/repository.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/rule.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/settings.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/tag.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/vpcsc_config.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/yum_artifact.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/apt_artifact.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/file.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/package.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/repository.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/service.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/settings.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/tag.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/version.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/yum_artifact.proto delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/protos.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/protos/protos.json delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.batch_delete_versions.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_attachment.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_repository.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_rule.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_tag.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_attachment.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_file.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_package.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_repository.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_rule.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_tag.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_version.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.export_artifact.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_attachment.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_docker_image.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_file.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_iam_policy.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_maven_artifact.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_npm_package.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_package.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_project_settings.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_python_package.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_repository.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_rule.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_tag.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_v_p_c_s_c_config.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_version.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_apt_artifacts.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_yum_artifacts.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_attachments.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_docker_images.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_files.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_maven_artifacts.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_npm_packages.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_packages.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_python_packages.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_rules.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_tags.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_versions.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.set_iam_policy.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.test_iam_permissions.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_file.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_package.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_project_settings.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_repository.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_rule.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_tag.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_v_p_c_s_c_config.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_version.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_repository.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_tag.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_package.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_repository.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_tag.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_version.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_file.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_iam_policy.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_package.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_project_settings.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_repository.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_tag.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_version.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_apt_artifacts.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_yum_artifacts.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_files.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_packages.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_repositories.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_tags.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_versions.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.set_iam_policy.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_project_settings.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_repository.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_tag.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/index.ts delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client_config.json delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_proto_list.json delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1/index.ts delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client_config.json delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_proto_list.json delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/index.ts delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/system-test/install.ts delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/tsconfig.json delete mode 100644 owl-bot-staging/google-devtools-artifactregistry/webpack.config.js diff --git a/owl-bot-staging/google-devtools-artifactregistry/.eslintignore b/owl-bot-staging/google-devtools-artifactregistry/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/.coverage -build/ -docs/ -protos/ -system-test/ -samples/generated/ diff --git a/owl-bot-staging/google-devtools-artifactregistry/.eslintrc.json b/owl-bot-staging/google-devtools-artifactregistry/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/.gitattributes b/owl-bot-staging/google-devtools-artifactregistry/.gitattributes deleted file mode 100644 index 33739cb74e4..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/.gitattributes +++ /dev/null @@ -1,4 +0,0 @@ -*.ts text eol=lf -*.js text eol=lf -protos/* linguist-generated -**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/owl-bot-staging/google-devtools-artifactregistry/.gitignore b/owl-bot-staging/google-devtools-artifactregistry/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -**/*.log -**/node_modules -/.coverage -/coverage -/.nyc_output -/docs/ -/out/ -/build/ -system-test/secrets.js -system-test/*key.json -*.lock -.DS_Store -package-lock.json -__pycache__ diff --git a/owl-bot-staging/google-devtools-artifactregistry/.jsdoc.js b/owl-bot-staging/google-devtools-artifactregistry/.jsdoc.js deleted file mode 100644 index 322c1ff7a8c..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2025 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'; - -module.exports = { - opts: { - readme: './README.md', - package: './package.json', - template: './node_modules/jsdoc-fresh', - recurse: true, - verbose: true, - destination: './docs/' - }, - plugins: [ - 'plugins/markdown', - 'jsdoc-region-tag' - ], - source: { - excludePattern: '(^|\\/|\\\\)[._]', - include: [ - 'build/src', - 'protos' - ], - includePattern: '\\.js$' - }, - templates: { - copyright: 'Copyright 2025 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/artifact-registry', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-devtools-artifactregistry/.mocharc.js b/owl-bot-staging/google-devtools-artifactregistry/.mocharc.js deleted file mode 100644 index 24e9d15257f..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2025 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. ** - -const config = { - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} -if (process.env.MOCHA_THROW_DEPRECATION === 'false') { - delete config['throw-deprecation']; -} -if (process.env.MOCHA_REPORTER) { - config.reporter = process.env.MOCHA_REPORTER; -} -if (process.env.MOCHA_REPORTER_OUTPUT) { - config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; -} -module.exports = config diff --git a/owl-bot-staging/google-devtools-artifactregistry/.nycrc b/owl-bot-staging/google-devtools-artifactregistry/.nycrc deleted file mode 100644 index 81a95fc94b0..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/.nycrc +++ /dev/null @@ -1,24 +0,0 @@ -{ - "report-dir": "./.coverage", - "reporter": ["text", "lcov"], - "exclude": [ - "**/*-test", - "**/.coverage", - "**/apis", - "**/benchmark", - "**/conformance", - "**/docs", - "**/samples", - "**/scripts", - "**/protos", - "**/test", - "**/*.d.ts", - ".jsdoc.js", - "**/.jsdoc.js", - "karma.conf.js", - "webpack-tests.config.js", - "webpack.config.js" - ], - "exclude-after-remap": false, - "all": true -} \ No newline at end of file diff --git a/owl-bot-staging/google-devtools-artifactregistry/.prettierignore b/owl-bot-staging/google-devtools-artifactregistry/.prettierignore deleted file mode 100644 index 9340ad9b86d..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/.prettierignore +++ /dev/null @@ -1,6 +0,0 @@ -**/node_modules -**/coverage -test/fixtures -build/ -docs/ -protos/ diff --git a/owl-bot-staging/google-devtools-artifactregistry/.prettierrc.js b/owl-bot-staging/google-devtools-artifactregistry/.prettierrc.js deleted file mode 100644 index d89a632f90b..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2025 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. ** - - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/CODE_OF_CONDUCT.md b/owl-bot-staging/google-devtools-artifactregistry/CODE_OF_CONDUCT.md deleted file mode 100644 index 2add2547a81..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,94 +0,0 @@ - -# Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of -experience, education, socio-economic status, nationality, personal appearance, -race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, or to ban temporarily or permanently any -contributor for other behaviors that they deem inappropriate, threatening, -offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -This Code of Conduct also applies outside the project spaces when the Project -Steward has a reasonable belief that an individual's behavior may have a -negative impact on the project or its community. - -## Conflict Resolution - -We do not believe that all conflict is bad; healthy debate and disagreement -often yield positive results. However, it is never okay to be disrespectful or -to engage in behavior that violates the project’s code of conduct. - -If you see someone violating the code of conduct, you are encouraged to address -the behavior directly with those involved. Many issues can be resolved quickly -and easily, and this gives people more control over the outcome of their -dispute. If you are unable to resolve the matter for any reason, or if the -behavior is threatening or harassing, report it. We are dedicated to providing -an environment where participants feel welcome and safe. - -Reports should be directed to *googleapis-stewards@google.com*, the -Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to -receive and address reported violations of the code of conduct. They will then -work with a committee consisting of representatives from the Open Source -Programs Office and the Google Open Source Strategy team. If for any reason you -are uncomfortable reaching out to the Project Steward, please email -opensource@google.com. - -We will investigate every complaint, but you may not receive a direct response. -We will use our discretion in determining when and how to follow up on reported -incidents, which may range from not taking action to permanent expulsion from -the project and project-sponsored spaces. We will notify the accused of the -report and provide them an opportunity to discuss it before any action is taken. -The identity of the reporter will be omitted from the details of the report -supplied to the accused. In potentially harmful situations, such as ongoing -harassment or threats to anyone's safety, we may take action without notice. - -## Attribution - -This Code of Conduct is adapted from the Contributor Covenant, version 1.4, -available at -https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/owl-bot-staging/google-devtools-artifactregistry/CONTRIBUTING.md b/owl-bot-staging/google-devtools-artifactregistry/CONTRIBUTING.md deleted file mode 100644 index c272f8d9345..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/CONTRIBUTING.md +++ /dev/null @@ -1,76 +0,0 @@ -# How to become a contributor and submit your own code - -**Table of contents** - -* [Contributor License Agreements](#contributor-license-agreements) -* [Contributing a patch](#contributing-a-patch) -* [Running the tests](#running-the-tests) -* [Releasing the library](#releasing-the-library) - -## Contributor License Agreements - -We'd love to accept your sample apps and patches! Before we can take them, we -have to jump a couple of legal hurdles. - -Please fill out either the individual or corporate Contributor License Agreement -(CLA). - - * If you are an individual writing original source code and you're sure you - own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). - * If you work for a company that wants to allow you to contribute your work, - then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). - -Follow either of the two links above to access the appropriate CLA and -instructions for how to sign and return it. Once we receive it, we'll be able to -accept your pull requests. - -## Contributing A Patch - -1. Submit an issue describing your proposed change to the repo in question. -1. The repo owner will respond to your issue promptly. -1. If your proposed change is accepted, and you haven't already done so, sign a - Contributor License Agreement (see details above). -1. Fork the desired repo, develop and test your code changes. -1. Ensure that your code adheres to the existing style in the code to which - you are contributing. -1. Ensure that your code has an appropriate set of tests which all pass. -1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. -1. Submit a pull request. - -### Before you begin - -1. [Select or create a Cloud Platform project][projects]. -1. [Enable billing for your project][billing]. -1. [Enable the Artifactregistry API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the - API from your local workstation. - - -## Running the tests - -1. [Prepare your environment for Node.js setup][setup]. - -1. Install dependencies: - - npm install - -1. Run the tests: - - # Run unit tests. - npm test - - # Run sample integration tests. - npm run samples-test - - # Run all system tests. - npm run system-test - -1. Lint (and maybe fix) any changes: - - npm run fix - -[setup]: https://cloud.google.com/nodejs/docs/setup -[projects]: https://console.cloud.google.com/project -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=artifactregistry.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/owl-bot-staging/google-devtools-artifactregistry/LICENSE b/owl-bot-staging/google-devtools-artifactregistry/LICENSE deleted file mode 100644 index d6456956733..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/owl-bot-staging/google-devtools-artifactregistry/README.md b/owl-bot-staging/google-devtools-artifactregistry/README.md deleted file mode 100644 index d3240ef1dc0..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/README.md +++ /dev/null @@ -1,190 +0,0 @@ -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." -[//]: # "The comments you see below are used to generate those parts of the template in later states." -Google Cloud Platform logo - -# [Artifact Registry API: Nodejs Client][homepage] - -This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways -unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **stable** libraries -are addressed with the highest priority - -[![npm version](https://img.shields.io/npm/v/@google-cloud/artifact-registry.svg)](https://www.npmjs.org/package/@google-cloud/artifact-registry) - -Artifact Registry API client for Node.js - -[//]: # "partials.introduction" - -A comprehensive list of changes in each version may be found in -[the CHANGELOG][homepage_changelog]. - -* [Artifact Registry API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/artifactregistry/latest) - - -Read more about the client libraries for Cloud APIs, including the older -Google APIs Client Libraries, in [Client Libraries Explained][explained]. - -[explained]: https://cloud.google.com/apis/docs/client-libraries-explained - -**Table of contents:** - -* [Quickstart](#quickstart) - * [Before you begin](#before-you-begin) - * [Installing the client library](#installing-the-client-library) - -* [Versioning](#versioning) -* [Contributing](#contributing) -* [License](#license) - -## Quickstart -### Before you begin - -1. [Select or create a Cloud Platform project][projects]. -1. [Enable billing for your project][billing]. -1. [Enable the Artifact Registry API API][enable_api]. -1. [Set up authentication][auth] so you can access the - API from your local workstation. -### Installing the client library - -```bash -npm install @google-cloud/artifact-registry -``` - -[//]: # "partials.body" - -## Samples - -Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. - -| Sample | Source Code | -| --------------------------- | --------------------------------- | -| batch delete versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.batch_delete_versions.js) | -| create attachment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_attachment.js) | -| create repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_repository.js) | -| create rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_rule.js) | -| create tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_tag.js) | -| delete attachment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_attachment.js) | -| delete file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_file.js) | -| delete package | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_package.js) | -| delete repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_repository.js) | -| delete rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_rule.js) | -| delete tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_tag.js) | -| delete version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_version.js) | -| export artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.export_artifact.js) | -| get attachment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_attachment.js) | -| get docker image | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_docker_image.js) | -| get file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_file.js) | -| get iam policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_iam_policy.js) | -| get maven artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_maven_artifact.js) | -| get npm package | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_npm_package.js) | -| get package | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_package.js) | -| get project settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_project_settings.js) | -| get python package | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_python_package.js) | -| get repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_repository.js) | -| get rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_rule.js) | -| get tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_tag.js) | -| get v p c s c config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_v_p_c_s_c_config.js) | -| get version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_version.js) | -| import apt artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_apt_artifacts.js) | -| import yum artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_yum_artifacts.js) | -| list attachments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_attachments.js) | -| list docker images | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_docker_images.js) | -| list files | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_files.js) | -| list maven artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_maven_artifacts.js) | -| list npm packages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_npm_packages.js) | -| list packages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_packages.js) | -| list python packages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_python_packages.js) | -| list repositories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js) | -| list rules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_rules.js) | -| list tags | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_tags.js) | -| list versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_versions.js) | -| set iam policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.set_iam_policy.js) | -| test iam permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.test_iam_permissions.js) | -| update file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_file.js) | -| update package | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_package.js) | -| update project settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_project_settings.js) | -| update repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_repository.js) | -| update rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_rule.js) | -| update tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_tag.js) | -| update v p c s c config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_v_p_c_s_c_config.js) | -| update version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_version.js) | -| devtools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json) | -| create repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_repository.js) | -| create tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_tag.js) | -| delete package | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_package.js) | -| delete repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_repository.js) | -| delete tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_tag.js) | -| delete version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_version.js) | -| get file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_file.js) | -| get iam policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_iam_policy.js) | -| get package | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_package.js) | -| get project settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_project_settings.js) | -| get repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_repository.js) | -| get tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_tag.js) | -| get version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_version.js) | -| import apt artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_apt_artifacts.js) | -| import yum artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_yum_artifacts.js) | -| list files | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_files.js) | -| list packages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_packages.js) | -| list repositories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_repositories.js) | -| list tags | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_tags.js) | -| list versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_versions.js) | -| set iam policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.set_iam_policy.js) | -| test iam permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js) | -| update project settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_project_settings.js) | -| update repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_repository.js) | -| update tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_tag.js) | -| devtools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json) | - - -## Supported Node.js Versions - -Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). -Libraries are compatible with all current _active_ and _maintenance_ versions of -Node.js. -If you are using an end-of-life version of Node.js, we recommend that you update -as soon as possible to an actively supported LTS version. - -Google's client libraries support legacy versions of Node.js runtimes on a -best-efforts basis with the following warnings: - -* Legacy versions are not tested in continuous integration. -* Some security patches and features cannot be backported. -* Dependencies cannot be kept up-to-date. - -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. -For example, `npm install @google-cloud/artifact-registry@legacy-8` installs client libraries -for versions compatible with Node.js 8. - -## Versioning - -This library follows [Semantic Versioning](http://semver.org/). - -More Information: [Google Cloud Platform Launch Stages][launch_stages] - -[launch_stages]: https://cloud.google.com/terms/launch-stages - -## Contributing - -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/CONTRIBUTING.md). - -Please note that this `README.md` -and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) -are generated from a central template. - -## License - -Apache Version 2.0 - -See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/LICENSE) - -[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[projects]: https://console.cloud.google.com/project -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=artifactregistry.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local -[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/samples -[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry/CHANGELOG.md -[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-artifactregistry diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/apt_artifact.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/apt_artifact.proto deleted file mode 100644 index c9da2a5d7be..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/apt_artifact.proto +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "AptArtifactProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// A detailed representation of an Apt artifact. Information in the record -// is derived from the archive's control file. -// See https://www.debian.org/doc/debian-policy/ch-controlfields.html -message AptArtifact { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/AptArtifact" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}" - }; - - // Package type is either binary or source. - enum PackageType { - // Package type is not specified. - PACKAGE_TYPE_UNSPECIFIED = 0; - - // Binary package. - BINARY = 1; - - // Source package. - SOURCE = 2; - } - - // Output only. The Artifact Registry resource name of the artifact. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The Apt package name of the artifact. - string package_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. An artifact is a binary or source package. - PackageType package_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Operating system architecture of the artifact. - string architecture = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Repository component of the artifact. - string component = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Contents of the artifact's control metadata file. - bytes control_file = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Google Cloud Storage location where the artifacts currently reside. -message ImportAptArtifactsGcsSource { - // Cloud Storage paths URI (e.g., gs://my_bucket//my_object). - repeated string uris = 1; - - // Supports URI wildcards for matching multiple objects from a single URI. - bool use_wildcards = 2; -} - -// The request to import new apt artifacts. -message ImportAptArtifactsRequest { - // The source location of the package binaries. - oneof source { - // Google Cloud Storage location where input content is located. - ImportAptArtifactsGcsSource gcs_source = 2; - } - - // The name of the parent resource where the artifacts will be imported. - string parent = 1; -} - -// Error information explaining why a package was not imported. -message ImportAptArtifactsErrorInfo { - // The source that was not imported. - oneof source { - // Google Cloud Storage location requested. - ImportAptArtifactsGcsSource gcs_source = 1; - } - - // The detailed error status. - google.rpc.Status error = 2; -} - -// The response message from importing APT artifacts. -message ImportAptArtifactsResponse { - // The Apt artifacts imported. - repeated AptArtifact apt_artifacts = 1; - - // Detailed error info for packages that were not imported. - repeated ImportAptArtifactsErrorInfo errors = 2; -} - -// The operation metadata for importing artifacts. -message ImportAptArtifactsMetadata {} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/artifact.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/artifact.proto deleted file mode 100644 index 691638efd8d..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/artifact.proto +++ /dev/null @@ -1,399 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "ArtifactProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// DockerImage represents a docker artifact. -// The following fields are returned as untyped metadata in the Version -// resource, using camelcase keys (i.e. metadata.imageSizeBytes): -// * imageSizeBytes -// * mediaType -// * buildTime -message DockerImage { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/DockerImage" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}" - }; - - // Required. registry_location, project_id, repository_name and image id forms - // a unique image - // name:`projects//locations//repositories//dockerImages/`. - // For example, - // "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ - // nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", - // where "us-west4" is the registry_location, "test-project" is the - // project_id, "test-repo" is the repository_name and - // "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" - // is the image's digest. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. URL to access the image. - // Example: - // us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf - string uri = 2 [(google.api.field_behavior) = REQUIRED]; - - // Tags attached to this image. - repeated string tags = 3; - - // Calculated size of the image. - // This field is returned as the 'metadata.imageSizeBytes' field in the - // Version resource. - int64 image_size_bytes = 4; - - // Time the image was uploaded. - google.protobuf.Timestamp upload_time = 5; - - // Media type of this image, e.g. - // "application/vnd.docker.distribution.manifest.v2+json". - // This field is returned as the 'metadata.mediaType' field in the - // Version resource. - string media_type = 6; - - // The time this image was built. - // This field is returned as the 'metadata.buildTime' field in the - // Version resource. - // The build time is returned to the client as an RFC 3339 string, which can - // be easily used with the JavaScript Date constructor. - google.protobuf.Timestamp build_time = 7; - - // Output only. The time when the docker image was last updated. - google.protobuf.Timestamp update_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // ArtifactType of this image, e.g. "application/vnd.example+type". - // If the `subject_digest` is set and no `artifact_type` is given, the - // `media_type` will be considered as the `artifact_type`. This field is - // returned as the `metadata.artifactType` field in the Version resource. - string artifact_type = 9; - - // Optional. For multi-arch images (manifest lists), this field contains the - // list of image manifests. - repeated ImageManifest image_manifests = 11 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Details of a single image manifest within a multi-arch image. -message ImageManifest { - // Optional. The CPU architecture of the image. - // Values are provided by the Docker client and are not validated by Artifact - // Registry. Example values include "amd64", "arm64", "ppc64le", "s390x", - // "riscv64", "mips64le", etc. - string architecture = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The operating system of the image. - // Values are provided by the Docker client and are not validated by Artifact - // Registry. Example values include "linux", "windows", "darwin", "aix", etc. - string os = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The manifest digest, in the format "sha256:". - string digest = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The media type of the manifest, e.g., - // "application/vnd.docker.distribution.manifest.v2+json" - string media_type = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The OS version of the image, for example on Windows - // `10.0.14393.1066`. - string os_version = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The required OS features for the image, for example on Windows - // `win32k`. - repeated string os_features = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The variant of the CPU in the image, for example `v7` to specify - // ARMv7 when architecture is `arm`. - string variant = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request to list docker images. -message ListDockerImagesRequest { - // Required. The name of the parent resource whose docker images will be - // listed. - string parent = 1 [(google.api.field_behavior) = REQUIRED]; - - // The maximum number of artifacts to return. Maximum page size is 1,000. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. - string page_token = 3; - - // The field to order the results by. - string order_by = 4; -} - -// The response from listing docker images. -message ListDockerImagesResponse { - // The docker images returned. - repeated DockerImage docker_images = 1; - - // The token to retrieve the next page of artifacts, or empty if there are no - // more artifacts to return. - string next_page_token = 2; -} - -// The request to get docker images. -message GetDockerImageRequest { - // Required. The name of the docker images. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/DockerImage" - } - ]; -} - -// MavenArtifact represents a maven artifact. -message MavenArtifact { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/MavenArtifact" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}" - }; - - // Required. registry_location, project_id, repository_name and maven_artifact - // forms a unique artifact For example, - // "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/ - // com.google.guava:guava:31.0-jre", - // where "us-west4" is the registry_location, "test-project" is the - // project_id, "test-repo" is the repository_name and - // "com.google.guava:guava:31.0-jre" - // is the maven artifact. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. URL to access the pom file of the artifact. - // Example: - // us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom - string pom_uri = 2 [(google.api.field_behavior) = REQUIRED]; - - // Group ID for the artifact. - // Example: - // com.google.guava - string group_id = 3; - - // Artifact ID for the artifact. - string artifact_id = 4; - - // Version of this artifact. - string version = 5; - - // Output only. Time the artifact was created. - google.protobuf.Timestamp create_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time the artifact was updated. - google.protobuf.Timestamp update_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request to list maven artifacts. -message ListMavenArtifactsRequest { - // Required. The name of the parent resource whose maven artifacts will be - // listed. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "artifactregistry.googleapis.com/MavenArtifact" - } - ]; - - // The maximum number of artifacts to return. Maximum page size is 1,000. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. - string page_token = 3; -} - -// The response from listing maven artifacts. -message ListMavenArtifactsResponse { - // The maven artifacts returned. - repeated MavenArtifact maven_artifacts = 1; - - // The token to retrieve the next page of artifacts, or empty if there are no - // more artifacts to return. - string next_page_token = 2; -} - -// The request to get maven artifacts. -message GetMavenArtifactRequest { - // Required. The name of the maven artifact. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/MavenArtifact" - } - ]; -} - -// NpmPackage represents an npm artifact. -message NpmPackage { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/NpmPackage" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}" - }; - - // Required. registry_location, project_id, repository_name and npm_package - // forms a unique package For example, - // "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ - // npm_test:1.0.0", - // where "us-west4" is the registry_location, "test-project" is the - // project_id, "test-repo" is the repository_name and - // npm_test:1.0.0" is the npm package. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Package for the artifact. - string package_name = 3; - - // Version of this package. - string version = 4; - - // Tags attached to this package. - repeated string tags = 5; - - // Output only. Time the package was created. - google.protobuf.Timestamp create_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time the package was updated. - google.protobuf.Timestamp update_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request to list npm packages. -message ListNpmPackagesRequest { - // Required. The name of the parent resource whose npm packages will be - // listed. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "artifactregistry.googleapis.com/NpmPackage" - } - ]; - - // The maximum number of artifacts to return. Maximum page size is 1,000. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. - string page_token = 3; -} - -// The response from listing npm packages. -message ListNpmPackagesResponse { - // The npm packages returned. - repeated NpmPackage npm_packages = 1; - - // The token to retrieve the next page of artifacts, or empty if there are no - // more artifacts to return. - string next_page_token = 2; -} - -// The request to get npm packages. -message GetNpmPackageRequest { - // Required. The name of the npm package. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/NpmPackage" - } - ]; -} - -// PythonPackage represents a python artifact. -message PythonPackage { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/PythonPackage" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}" - }; - - // Required. registry_location, project_id, repository_name and python_package - // forms a unique package - // name:`projects//locations//repository//pythonPackages/`. - // For example, - // "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/ - // python_package:1.0.0", - // where "us-west4" is the registry_location, "test-project" is the - // project_id, "test-repo" is the repository_name and - // python_package:1.0.0" is the python package. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. URL to access the package. - // Example: - // us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz - string uri = 2 [(google.api.field_behavior) = REQUIRED]; - - // Package for the artifact. - string package_name = 3; - - // Version of this package. - string version = 4; - - // Output only. Time the package was created. - google.protobuf.Timestamp create_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time the package was updated. - google.protobuf.Timestamp update_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request to list python packages. -message ListPythonPackagesRequest { - // Required. The name of the parent resource whose python packages will be - // listed. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "artifactregistry.googleapis.com/PythonPackage" - } - ]; - - // The maximum number of artifacts to return. Maximum page size is 1,000. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. - string page_token = 3; -} - -// The response from listing python packages. -message ListPythonPackagesResponse { - // The python packages returned. - repeated PythonPackage python_packages = 1; - - // The token to retrieve the next page of artifacts, or empty if there are no - // more artifacts to return. - string next_page_token = 2; -} - -// The request to get python packages. -message GetPythonPackageRequest { - // Required. The name of the python package. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/PythonPackage" - } - ]; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/attachment.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/attachment.proto deleted file mode 100644 index 7f283f684a8..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/attachment.proto +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "AttachmentProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// An Attachment refers to additional metadata that can be attached to -// artifacts in Artifact Registry. An attachment consists of one or more files. -message Attachment { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/Attachment" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/attachments/{attachment}" - }; - - // The name of the attachment. E.g. - // `projects/p1/locations/us/repositories/repo/attachments/sbom`. - string name = 1; - - // Required. The target the attachment is for, can be a Version, Package or - // Repository. E.g. - // `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. - string target = 2 [(google.api.field_behavior) = REQUIRED]; - - // Type of attachment. - // E.g. `application/vnd.spdx+json` - string type = 3; - - // The namespace this attachment belongs to. - // E.g. If an attachment is created by artifact analysis, namespace is set - // to `artifactanalysis.googleapis.com`. - string attachment_namespace = 4; - - // Optional. User annotations. These attributes can only be set and used by - // the user, and not by Artifact Registry. See - // https://google.aip.dev/128#annotations for more details such as format and - // size limitations. - map annotations = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time when the attachment was created. - google.protobuf.Timestamp create_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the attachment was last updated. - google.protobuf.Timestamp update_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The files that belong to this attachment. - // If the file ID part contains slashes, they are escaped. E.g. - // `projects/p1/locations/us-central1/repositories/repo1/files/sha:`. - repeated string files = 8 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/File" - } - ]; - - // Output only. The name of the OCI version that this attachment created. Only - // populated for Docker attachments. E.g. - // `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. - string oci_version_name = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request to list attachments. -message ListAttachmentsRequest { - // Required. The name of the parent resource whose attachments will be listed. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "artifactregistry.googleapis.com/Attachment" - } - ]; - - // Optional. An expression for filtering the results of the request. Filter - // rules are case insensitive. The fields eligible for filtering are: - // - // * `target` - // * `type` - // * `attachment_namespace` - string filter = 2 [(google.api.field_behavior) = OPTIONAL]; - - // The maximum number of attachments to return. Maximum page size is 1,000. - int32 page_size = 3; - - // The next_page_token value returned from a previous list request, if any. - string page_token = 4; -} - -// The response from listing attachments. -message ListAttachmentsResponse { - // The attachments returned. - repeated Attachment attachments = 1; - - // The token to retrieve the next page of attachments, or empty if there are - // no more attachments to return. - string next_page_token = 2; -} - -// The request to retrieve an attachment. -message GetAttachmentRequest { - // Required. The name of the attachment to retrieve. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/Attachment" - } - ]; -} - -// The request to create a new attachment. -message CreateAttachmentRequest { - // Required. The name of the parent resource where the attachment will be - // created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "artifactregistry.googleapis.com/Attachment" - } - ]; - - // Required. The attachment id to use for this attachment. - string attachment_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The attachment to be created. - Attachment attachment = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The request to delete an attachment. -message DeleteAttachmentRequest { - // Required. The name of the attachment to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/Attachment" - } - ]; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/export.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/export.proto deleted file mode 100644 index 2e89c126a96..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/export.proto +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/devtools/artifactregistry/v1/file.proto"; -import "google/devtools/artifactregistry/v1/version.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "ExportProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// The request for exporting an artifact to a destination. -message ExportArtifactRequest { - // The artifact to be exported. - oneof source_artifact { - // The artifact version to export. - // Format: - // projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version} - string source_version = 2 [(google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/Version" - }]; - - // The artifact tag to export. - // Format:projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag} - string source_tag = 4 [(google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/Tag" - }]; - } - - // The destination to export the artifact to. - oneof destination { - // The Cloud Storage path to export the artifact to. Should start with the - // bucket name, and optionally have a directory path. Examples: - // `dst_bucket`, `dst_bucket/sub_dir`. - // Existing objects with the same path will be overwritten. - string gcs_path = 3; - } - - // Required. The repository of the artifact to export. - // Format: projects/{project}/locations/{location}/repositories/{repository} - string repository = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/Repository" - } - ]; -} - -// The response for exporting an artifact to a destination. -message ExportArtifactResponse { - // The exported version. Should be the same as the request version with - // fingerprint resource name. - Version exported_version = 1; -} - -// The LRO metadata for exporting an artifact. -message ExportArtifactMetadata { - // The exported artifact file. - message ExportedFile { - // The destination the file was exported to. - oneof destination { - // Cloud Storage Object path of the exported file. Examples: - // `dst_bucket/file1`, `dst_bucket/sub_dir/file1` - string gcs_object_path = 2; - } - - // Name of the exported artifact file. - // Format: `projects/p1/locations/us/repositories/repo1/files/file1` - string name = 1 [(google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/File" - }]; - - // The hashes of the file content. - repeated Hash hashes = 3; - } - - // The exported artifact files. - repeated ExportedFile exported_files = 1; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/file.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/file.proto deleted file mode 100644 index 35b3ebde6f8..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/file.proto +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "FileProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// A hash of file content. -message Hash { - // The algorithm used to compute the hash. - enum HashType { - // Unspecified. - HASH_TYPE_UNSPECIFIED = 0; - - // SHA256 hash. - SHA256 = 1; - - // MD5 hash. - MD5 = 2; - } - - // The algorithm used to compute the hash value. - HashType type = 1; - - // The hash value. - bytes value = 2; -} - -// Files store content that is potentially associated with Packages or Versions. -message File { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/File" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/files/{file}" - }; - - // The name of the file, for example: - // `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`. - // If the file ID part contains slashes, they are escaped. - string name = 1; - - // The size of the File in bytes. - int64 size_bytes = 3; - - // The hashes of the file content. - repeated Hash hashes = 4; - - // Output only. The time when the File was created. - google.protobuf.Timestamp create_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the File was last updated. - google.protobuf.Timestamp update_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The name of the Package or Version that owns this file, if any. - string owner = 7; - - // Output only. The time when the last attempt to refresh the file's data was - // made. Only set when the repository is remote. - google.protobuf.Timestamp fetch_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Client specified annotations. - map annotations = 9 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request to list files. -message ListFilesRequest { - // Required. The name of the repository whose files will be listed. For - // example: "projects/p1/locations/us-central1/repositories/repo1 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "artifactregistry.googleapis.com/File" - } - ]; - - // An expression for filtering the results of the request. Filter rules are - // case insensitive. The fields eligible for filtering are: - // - // * `name` - // * `owner` - // * `annotations` - // - // Examples of using a filter: - // - // To filter the results of your request to files with the name `my_file.txt` - // in project `my-project` in the `us-central` region, in repository - // `my-repo`, append the following filter expression to your request: - // - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` - // - // You can also use wildcards to match any number of characters before or - // after the value: - // - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` - // - // To filter the results of your request to files owned by the version `1.0` - // in package `pkg1`, append the following filter expression to your request: - // - // * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - // - // To filter the results of your request to files with the annotation - // key-value pair [`external_link`: `external_link_value`], append the - // following filter expression to your request: - // - // * `"annotations.external_link:external_link_value"` - // - // To filter just for a specific annotation key `external_link`, append the - // following filter expression to your request: - // - // * `"annotations.external_link"` - // - // If the annotation key or value contains special characters, you can escape - // them by surrounding the value with backticks. For example, to filter the - // results of your request to files with the annotation key-value pair - // [`external.link`:`https://example.com/my-file`], append the following - // filter expression to your request: - // - // * `` "annotations.`external.link`:`https://example.com/my-file`" `` - // - // You can also filter with annotations with a wildcard to - // match any number of characters before or after the value: - // - // * `` "annotations.*_link:`*example.com*`" `` - string filter = 4; - - // The maximum number of files to return. Maximum page size is 1,000. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. - string page_token = 3; - - // The field to order the results by. - string order_by = 5; -} - -// The response from listing files. -message ListFilesResponse { - // The files returned. - repeated File files = 1; - - // The token to retrieve the next page of files, or empty if there are no - // more files to return. - string next_page_token = 2; -} - -// The request to retrieve a file. -message GetFileRequest { - // Required. The name of the file to retrieve. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/File" - } - ]; -} - -// The request to delete a file. -message DeleteFileRequest { - // Required. The name of the file to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/File" - } - ]; -} - -// The request to update a file. -message UpdateFileRequest { - // Required. The File that replaces the resource on the server. - File file = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The update mask applies to the resource. For the `FieldMask` - // definition, see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/generic.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/generic.proto deleted file mode 100644 index b26f31a9e78..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/generic.proto +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "GenericProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// GenericArtifact represents a generic artifact -message GenericArtifact { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/GenericArtifact" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/genericArtifacts/{generic_artifact}" - }; - - // Resource name of the generic artifact. - // project, location, repository, package_id and version_id - // create a unique generic artifact. - // i.e. "projects/test-project/locations/us-west4/repositories/test-repo/ - // genericArtifacts/package_id:version_id" - string name = 1; - - // The version of the generic artifact. - string version = 2; - - // Output only. The time when the Generic module is created. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the Generic module is updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/go.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/go.proto deleted file mode 100644 index 0f459b4f1cf..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/go.proto +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "GoProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// GoModule represents a Go module. -message GoModule { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/GoModule" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/goModules/{go_module}" - }; - - // The resource name of a Go module. - string name = 1; - - // The version of the Go module. Must be a valid canonical version as defined - // in https://go.dev/ref/mod#glos-canonical-version. - string version = 2; - - // Output only. The time when the Go module is created. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the Go module is updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/kfp_artifact.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/kfp_artifact.proto deleted file mode 100644 index 94641accdbb..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/kfp_artifact.proto +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "KfpArtifactProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// A detailed representation of a KFP artifact. -message KfpArtifact { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/KfpArtifact" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/kfpArtifacts/{kfp_artifact}" - }; - - // Output only. Resource name of the KFP artifact. Since users don't directly - // interact with this resource, the name will be derived from the associated - // version. For example, when version = ".../versions/sha256:abcdef...", the - // name will be ".../kfpArtifacts/sha256:abcdef...". - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The version associated with the KFP artifact. Must follow the Semantic - // Versioning standard. - string version = 2; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/package.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/package.proto deleted file mode 100644 index 35ae37ef1e5..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/package.proto +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "PackageProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// Packages are named collections of versions. -message Package { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/Package" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}" - }; - - // The name of the package, for example: - // `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. - // If the package ID part contains slashes, the slashes are escaped. - string name = 1; - - // The display name of the package. - string display_name = 2; - - // The time when the package was created. - google.protobuf.Timestamp create_time = 5; - - // The time when the package was last updated. This includes publishing a new - // version of the package. - google.protobuf.Timestamp update_time = 6; - - // Optional. Client specified annotations. - map annotations = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request to list packages. -message ListPackagesRequest { - // Required. The name of the parent resource whose packages will be listed. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "artifactregistry.googleapis.com/Package" - } - ]; - - // The maximum number of packages to return. Maximum page size is 1,000. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. - string page_token = 3; - - // Optional. An expression for filtering the results of the request. Filter - // rules are case insensitive. The fields eligible for filtering are: - // - // * `name` - // * `annotations` - // - // Examples of using a filter: - // - // To filter the results of your request to packages with the name - // `my-package` in project `my-project` in the `us-central` region, in - // repository `my-repo`, append the following filter expression to your - // request: - // - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` - // - // You can also use wildcards to match any number of characters before or - // after the value: - // - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` - // - // To filter the results of your request to packages with the annotation - // key-value pair [`external_link`: `external_link_value`], append the - // following filter expression to your request": - // - // * `"annotations.external_link:external_link_value"` - // - // To filter the results just for a specific annotation key `external_link`, - // append the following filter expression to your request: - // - // * `"annotations.external_link"` - // - // If the annotation key or value contains special characters, you can escape - // them by surrounding the value with backticks. For example, to filter the - // results of your request to packages with the annotation key-value pair - // [`external.link`:`https://example.com/my-package`], append the following - // filter expression to your request: - // - // * `` "annotations.`external.link`:`https://example.com/my-package`" `` - // - // You can also filter with annotations with a wildcard to - // match any number of characters before or after the value: - // - // * `` "annotations.*_link:`*example.com*`" `` - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The field to order the results by. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response from listing packages. -message ListPackagesResponse { - // The packages returned. - repeated Package packages = 1; - - // The token to retrieve the next page of packages, or empty if there are no - // more packages to return. - string next_page_token = 2; -} - -// The request to retrieve a package. -message GetPackageRequest { - // Required. The name of the package to retrieve. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/Package" - } - ]; -} - -// The request to delete a package. -message DeletePackageRequest { - // Required. The name of the package to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/Package" - } - ]; -} - -// The request to update a package. -message UpdatePackageRequest { - // The package that replaces the resource on the server. - Package package = 1; - - // The update mask applies to the resource. For the `FieldMask` definition, - // see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/repository.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/repository.proto deleted file mode 100644 index 40fc30a008a..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/repository.proto +++ /dev/null @@ -1,765 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "RepositoryProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; -option (google.api.resource_definition) = { - type: "secretmanager.googleapis.com/SecretVersion" - pattern: "projects/{project}/secrets/{secret}/versions/{secret_version}" -}; -option (google.api.resource_definition) = { - type: "servicedirectory.googleapis.com/Service" - pattern: "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}" -}; - -// Artifact policy configuration for the repository contents. -message UpstreamPolicy { - // The user-provided ID of the upstream policy. - string id = 1; - - // A reference to the repository resource, for example: - // `projects/p1/locations/us-central1/repositories/repo1`. - string repository = 2 [(google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/Repository" - }]; - - // Entries with a greater priority value take precedence in the pull order. - int32 priority = 3; -} - -// CleanupPolicyCondition is a set of conditions attached to a CleanupPolicy. -// If multiple entries are set, all must be satisfied for the condition to be -// satisfied. -message CleanupPolicyCondition { - // Statuses applying to versions. - enum TagState { - // Tag status not specified. - TAG_STATE_UNSPECIFIED = 0; - - // Applies to tagged versions only. - TAGGED = 1; - - // Applies to untagged versions only. - UNTAGGED = 2; - - // Applies to all versions. - ANY = 3; - } - - // Match versions by tag status. - optional TagState tag_state = 2; - - // Match versions by tag prefix. Applied on any prefix match. - repeated string tag_prefixes = 3; - - // Match versions by version name prefix. Applied on any prefix match. - repeated string version_name_prefixes = 4; - - // Match versions by package prefix. Applied on any prefix match. - repeated string package_name_prefixes = 5; - - // Match versions older than a duration. - optional google.protobuf.Duration older_than = 6; - - // Match versions newer than a duration. - optional google.protobuf.Duration newer_than = 7; -} - -// CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy -// for retaining a minimum number of versions. -message CleanupPolicyMostRecentVersions { - // List of package name prefixes that will apply this rule. - repeated string package_name_prefixes = 1; - - // Minimum number of versions to keep. - optional int32 keep_count = 2; -} - -// Artifact policy configuration for repository cleanup policies. -message CleanupPolicy { - // Action type for a cleanup policy. - enum Action { - // Action not specified. - ACTION_UNSPECIFIED = 0; - - // Delete action. - DELETE = 1; - - // Keep action. - KEEP = 2; - } - - oneof condition_type { - // Policy condition for matching versions. - CleanupPolicyCondition condition = 2; - - // Policy condition for retaining a minimum number of versions. May only be - // specified with a Keep action. - CleanupPolicyMostRecentVersions most_recent_versions = 4; - } - - // The user-provided ID of the cleanup policy. - string id = 1; - - // Policy action. - Action action = 3; -} - -// Virtual repository configuration. -message VirtualRepositoryConfig { - // Policies that configure the upstream artifacts distributed by the Virtual - // Repository. Upstream policies cannot be set on a standard repository. - repeated UpstreamPolicy upstream_policies = 1; -} - -// Remote repository configuration. -message RemoteRepositoryConfig { - // The credentials to access the remote repository. - message UpstreamCredentials { - // Username and password credentials. - message UsernamePasswordCredentials { - // The username to access the remote repository. - string username = 1; - - // The Secret Manager key version that holds the password to access the - // remote repository. Must be in the format of - // `projects/{project}/secrets/{secret}/versions/{version}`. - string password_secret_version = 2 [(google.api.resource_reference) = { - type: "secretmanager.googleapis.com/SecretVersion" - }]; - } - - oneof credentials { - // Use username and password to access the remote repository. - UsernamePasswordCredentials username_password_credentials = 1; - } - } - - // Configuration for a Docker remote repository. - message DockerRepository { - // Customer-specified publicly available remote repository. - message CustomRepository { - // An http/https uri reference to the custom remote repository, for ex: - // "https://registry-1.docker.io". - string uri = 1; - } - - // Predefined list of publicly available Docker repositories like Docker - // Hub. - enum PublicRepository { - // Unspecified repository. - PUBLIC_REPOSITORY_UNSPECIFIED = 0; - - // Docker Hub. - DOCKER_HUB = 1; - } - - // Address of the remote repository. - oneof upstream { - // One of the publicly available Docker repositories supported by Artifact - // Registry. - PublicRepository public_repository = 1; - - // Customer-specified remote repository. - CustomRepository custom_repository = 3; - } - } - - // Configuration for a Maven remote repository. - message MavenRepository { - // Customer-specified publicly available remote repository. - message CustomRepository { - // An http/https uri reference to the upstream remote repository, for ex: - // "https://my.maven.registry/". - string uri = 1; - } - - // Predefined list of publicly available Maven repositories like Maven - // Central. - enum PublicRepository { - // Unspecified repository. - PUBLIC_REPOSITORY_UNSPECIFIED = 0; - - // Maven Central. - MAVEN_CENTRAL = 1; - } - - // Address of the remote repository. - oneof upstream { - // One of the publicly available Maven repositories supported by Artifact - // Registry. - PublicRepository public_repository = 1; - - // Customer-specified remote repository. - CustomRepository custom_repository = 3; - } - } - - // Configuration for a Npm remote repository. - message NpmRepository { - // Customer-specified publicly available remote repository. - message CustomRepository { - // An http/https uri reference to the upstream remote repository, for ex: - // "https://my.npm.registry/". - string uri = 1; - } - - // Predefined list of publicly available NPM repositories like npmjs. - enum PublicRepository { - // Unspecified repository. - PUBLIC_REPOSITORY_UNSPECIFIED = 0; - - // npmjs. - NPMJS = 1; - } - - // Address of the remote repository - oneof upstream { - // One of the publicly available Npm repositories supported by Artifact - // Registry. - PublicRepository public_repository = 1; - - // Customer-specified remote repository. - CustomRepository custom_repository = 3; - } - } - - // Configuration for a Python remote repository. - message PythonRepository { - // Customer-specified publicly available remote repository. - message CustomRepository { - // An http/https uri reference to the upstream remote repository, for ex: - // "https://my.python.registry/". - string uri = 1; - } - - // Predefined list of publicly available Python repositories like PyPI.org. - enum PublicRepository { - // Unspecified repository. - PUBLIC_REPOSITORY_UNSPECIFIED = 0; - - // PyPI. - PYPI = 1; - } - - // Address of the remote repository. - oneof upstream { - // One of the publicly available Python repositories supported by Artifact - // Registry. - PublicRepository public_repository = 1; - - // Customer-specified remote repository. - CustomRepository custom_repository = 3; - } - } - - // Configuration for an Apt remote repository. - message AptRepository { - // Publicly available Apt repositories constructed from a common repository - // base and a custom repository path. - message PublicRepository { - // Predefined list of publicly available repository bases for Apt. - enum RepositoryBase { - // Unspecified repository base. - REPOSITORY_BASE_UNSPECIFIED = 0; - - // Debian. - DEBIAN = 1; - - // Ubuntu LTS/Pro. - UBUNTU = 2; - - // Archived Debian. - DEBIAN_SNAPSHOT = 3; - } - - // A common public repository base for Apt. - RepositoryBase repository_base = 1; - - // A custom field to define a path to a specific repository from the base. - string repository_path = 2; - } - - // Customer-specified publicly available remote repository. - message CustomRepository { - // An http/https uri reference to the upstream remote repository, for ex: - // "https://my.apt.registry/". - string uri = 1; - } - - // Address of the remote repository. - oneof upstream { - // One of the publicly available Apt repositories supported by Artifact - // Registry. - PublicRepository public_repository = 1; - - // Customer-specified remote repository. - CustomRepository custom_repository = 3; - } - } - - // Configuration for a Yum remote repository. - message YumRepository { - // Publicly available Yum repositories constructed from a common repository - // base and a custom repository path. - message PublicRepository { - // Predefined list of publicly available repository bases for Yum. - enum RepositoryBase { - // Unspecified repository base. - REPOSITORY_BASE_UNSPECIFIED = 0; - - // CentOS. - CENTOS = 1; - - // CentOS Debug. - CENTOS_DEBUG = 2; - - // CentOS Vault. - CENTOS_VAULT = 3; - - // CentOS Stream. - CENTOS_STREAM = 4; - - // Rocky. - ROCKY = 5; - - // Fedora Extra Packages for Enterprise Linux (EPEL). - EPEL = 6; - } - - // A common public repository base for Yum. - RepositoryBase repository_base = 1; - - // A custom field to define a path to a specific repository from the base. - string repository_path = 2; - } - - // Customer-specified publicly available remote repository. - message CustomRepository { - // An http/https uri reference to the upstream remote repository, for ex: - // "https://my.yum.registry/". - string uri = 1; - } - - // Address of the remote repository. - oneof upstream { - // One of the publicly available Yum repositories supported by Artifact - // Registry. - PublicRepository public_repository = 1; - - // Customer-specified remote repository. - CustomRepository custom_repository = 3; - } - } - - // Common remote repository settings type. - message CommonRemoteRepository { - // Required. A common public repository base for remote repository. - string uri = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Settings specific to the remote repository. - oneof remote_source { - // Specific settings for a Docker remote repository. - DockerRepository docker_repository = 2; - - // Specific settings for a Maven remote repository. - MavenRepository maven_repository = 3; - - // Specific settings for an Npm remote repository. - NpmRepository npm_repository = 4; - - // Specific settings for a Python remote repository. - PythonRepository python_repository = 5; - - // Specific settings for an Apt remote repository. - AptRepository apt_repository = 6; - - // Specific settings for a Yum remote repository. - YumRepository yum_repository = 7; - - // Common remote repository settings. - // Used as the remote repository upstream URL. - CommonRemoteRepository common_repository = 14; - } - - // The description of the remote source. - string description = 1; - - // Optional. The credentials used to access the remote repository. - UpstreamCredentials upstream_credentials = 9 - [(google.api.field_behavior) = OPTIONAL]; - - // Input only. A create/update remote repo option to avoid making a HEAD/GET - // request to validate a remote repo and any supplied upstream credentials. - bool disable_upstream_validation = 12 - [(google.api.field_behavior) = INPUT_ONLY]; -} - -// A Repository for storing artifacts with a specific format. -message Repository { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/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; - } - - // DockerRepositoryConfig is docker related repository details. - // Provides additional configuration details for repositories of the docker - // format type. - message DockerRepositoryConfig { - // The repository which enabled this flag prevents all tags from being - // modified, moved or deleted. This does not prevent tags from being - // created. - bool immutable_tags = 1; - } - - // Config on whether to perform vulnerability scanning for resources in this - // repository, as well as output fields describing current state. - message VulnerabilityScanningConfig { - // Config for vulnerability scanning of resources in this repository. - enum EnablementConfig { - // Not set. This will be treated as INHERITED for Docker repositories and - // DISABLED for non-Docker repositories. - ENABLEMENT_CONFIG_UNSPECIFIED = 0; - - // Scanning is Enabled, but dependent on API enablement. - INHERITED = 1; - - // No automatic vulnerability scanning will be performed for this - // repository. - DISABLED = 2; - } - - // Describes the state of vulnerability scanning in this repository, - // including both repository enablement and API enablement. - enum EnablementState { - // Enablement state is unclear. - ENABLEMENT_STATE_UNSPECIFIED = 0; - - // Repository does not support vulnerability scanning. - SCANNING_UNSUPPORTED = 1; - - // Vulnerability scanning is disabled for this repository. - SCANNING_DISABLED = 2; - - // Vulnerability scanning is active for this repository. - SCANNING_ACTIVE = 3; - } - - // Optional. Config for whether this repository has vulnerability scanning - // disabled. - EnablementConfig enablement_config = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The last time this repository config was enabled. - google.protobuf.Timestamp last_enable_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. State of feature enablement, combining repository enablement - // config and API enablement state. - EnablementState enablement_state = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reason for the repository state. - string enablement_state_reason = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // A package format. - enum Format { - // Unspecified package format. - FORMAT_UNSPECIFIED = 0; - - // 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; - - // Kubeflow Pipelines package format. - KFP = 9; - - // Go package format. - GO = 10; - - // Generic package format. - GENERIC = 11; - - // Ruby package format. - RUBY = 12; - } - - // The mode configures the repository to serve artifacts from different - // sources. - enum Mode { - // Unspecified mode. - MODE_UNSPECIFIED = 0; - - // A standard repository storing artifacts. - STANDARD_REPOSITORY = 1; - - // A virtual repository to serve artifacts from one or more sources. - VIRTUAL_REPOSITORY = 2; - - // A remote repository to serve artifacts from a remote source. - REMOTE_REPOSITORY = 3; - } - - // Repository-specific configurations. - oneof format_config { - // Maven repository config contains repository level configuration - // for the repositories of maven type. - MavenRepositoryConfig maven_config = 9; - - // Docker repository config contains repository level configuration - // for the repositories of docker type. - DockerRepositoryConfig docker_config = 17; - } - - // Repository configuration specific to the Mode value being selected (Remote - // or Virtual) - oneof mode_config { - // Configuration specific for a Virtual Repository. - VirtualRepositoryConfig virtual_repository_config = 14; - - // Configuration specific for a Remote Repository. - RemoteRepositoryConfig remote_repository_config = 15; - } - - // The name of the repository, for example: - // `projects/p1/locations/us-central1/repositories/repo1`. For each location - // in a project, repository names must be unique. - string name = 1; - - // Optional. The format of packages that are stored in the repository. - Format format = 2 [(google.api.field_behavior) = OPTIONAL]; - - // The user-provided description of the repository. - string description = 3; - - // Labels with user-defined metadata. - // This field may contain up to 64 entries. Label keys and values may be no - // longer than 63 characters. Label keys must begin with a lowercase letter - // and may only contain lowercase letters, numeric characters, underscores, - // and dashes. - map labels = 4; - - // Output only. The time when the repository was created. - google.protobuf.Timestamp create_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the repository was last updated. - google.protobuf.Timestamp update_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The Cloud KMS resource name of the customer managed encryption key that's - // used to encrypt the contents of the Repository. Has the form: - // `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. - // This value may not be changed after the Repository has been created. - string kms_key_name = 8; - - // Optional. The mode of the repository. - Mode mode = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Cleanup policies for this repository. Cleanup policies indicate - // when certain package versions can be automatically deleted. Map keys are - // policy IDs supplied by users during policy creation. They must unique - // within a repository and be under 128 characters in length. - map cleanup_policies = 12 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The size, in bytes, of all artifact storage in this - // repository. Repositories that are generally available or in public preview - // use this to calculate storage costs. - int64 size_bytes = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Whether or not this repository satisfies PZS. - bool satisfies_pzs = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. If true, the cleanup pipeline is prevented from deleting versions - // in this repository. - bool cleanup_policy_dry_run = 18 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Config and state for vulnerability scanning of resources within - // this Repository. - VulnerabilityScanningConfig vulnerability_scanning_config = 19 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If this is true, an unspecified repo type will be treated as - // error rather than defaulting to standard. - bool disallow_unspecified_mode = 21 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Whether or not this repository satisfies PZI. - bool satisfies_pzi = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The repository endpoint, for example: - // `us-docker.pkg.dev/my-proj/my-repo`. - string registry_uri = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request to list repositories. -message ListRepositoriesRequest { - // 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. - string page_token = 3; - - // Optional. An expression for filtering the results of the request. Filter - // rules are case insensitive. The fields eligible for filtering are: - // - // * `name` - // - // Examples of using a filter: - // - // To filter the results of your request to repositories with the name - // `my-repo` in project `my-project` in the `us-central` region, append the - // following filter expression to your request: - // - // * `name="projects/my-project/locations/us-central1/repositories/my-repo"` - // - // You can also use wildcards to match any number of characters before or - // after the value: - // - // * `name="projects/my-project/locations/us-central1/repositories/my-*"` - // * `name="projects/my-project/locations/us-central1/repositories/*repo"` - // * `name="projects/my-project/locations/us-central1/repositories/*repo*"` - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The field to order the results by. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response from listing repositories. -message ListRepositoriesResponse { - // The repositories returned. - repeated Repository repositories = 1; - - // The token to retrieve the next page of repositories, or empty if there are - // no more repositories to return. - string next_page_token = 2; -} - -// The request to retrieve a repository. -message GetRepositoryRequest { - // 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 { - // 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" - } - ]; - - // Required. The repository id to use for this repository. - string repository_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The repository to be created. - Repository repository = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The request to update a repository. -message UpdateRepositoryRequest { - // The repository that replaces the resource on the server. - Repository repository = 1; - - // The update mask applies to the resource. For the `FieldMask` definition, - // see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2; -} - -// The request to delete a repository. -message DeleteRepositoryRequest { - // Required. The name of the repository to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/Repository" - } - ]; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/rule.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/rule.proto deleted file mode 100644 index cfe5be0ab58..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/rule.proto +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/field_mask.proto"; -import "google/type/expr.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "RuleProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// A rule defines the deny or allow action of the operation it applies to and -// the conditions required for the rule to apply. You can set one rule for an -// entire repository and one rule for each package within. -message Rule { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/Rule" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/rules/{rule}" - }; - - // Defines the action of the rule. - enum Action { - // Action not specified. - ACTION_UNSPECIFIED = 0; - - // Allow the operation. - ALLOW = 1; - - // Deny the operation. - DENY = 2; - } - - // The operation the rule applies to. - enum Operation { - // Operation not specified. - OPERATION_UNSPECIFIED = 0; - - // Download operation. - DOWNLOAD = 1; - } - - // The name of the rule, for example: - // `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`. - string name = 1; - - // The action this rule takes. - Action action = 2; - - Operation operation = 3; - - // Optional. A CEL expression for conditions that must be met in order for the - // rule to apply. If not provided, the rule matches all objects. - google.type.Expr condition = 4 [(google.api.field_behavior) = OPTIONAL]; - - // The package ID the rule applies to. - // If empty, this rule applies to all packages inside the repository. - string package_id = 5; -} - -// The request to list rules. -message ListRulesRequest { - // Required. The name of the parent repository whose rules will be listed. - // For example: - // `projects/p1/locations/us-central1/repositories/repo1`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "artifactregistry.googleapis.com/Rule" - } - ]; - - // The maximum number of rules to return. Maximum page size is 1,000. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. - string page_token = 3; -} - -// The response from listing rules. -message ListRulesResponse { - // The rules returned. - repeated Rule rules = 1; - - // The token to retrieve the next page of rules, or empty if there are no - // more rules to return. - string next_page_token = 2; -} - -// The request to retrieve a rule. -message GetRuleRequest { - // Required. The name of the rule to retrieve. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/Rule" - } - ]; -} - -// The request to create a new rule. -message CreateRuleRequest { - // Required. The name of the parent resource where the rule will be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "artifactregistry.googleapis.com/Rule" - } - ]; - - // The rule id to use for this repository. - string rule_id = 2; - - // The rule to be created. - Rule rule = 3; -} - -// The request to update a rule. -message UpdateRuleRequest { - // The rule that replaces the resource on the server. - Rule rule = 1; - - // The update mask applies to the resource. For the `FieldMask` definition, - // see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2; -} - -// The request to delete a rule. -message DeleteRuleRequest { - // Required. The name of the rule to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/Rule" - } - ]; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto deleted file mode 100644 index b7e7c368092..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto +++ /dev/null @@ -1,561 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/devtools/artifactregistry/v1/apt_artifact.proto"; -import "google/devtools/artifactregistry/v1/artifact.proto"; -import "google/devtools/artifactregistry/v1/attachment.proto"; -import "google/devtools/artifactregistry/v1/export.proto"; -import "google/devtools/artifactregistry/v1/file.proto"; -import "google/devtools/artifactregistry/v1/package.proto"; -import "google/devtools/artifactregistry/v1/repository.proto"; -import "google/devtools/artifactregistry/v1/rule.proto"; -import "google/devtools/artifactregistry/v1/settings.proto"; -import "google/devtools/artifactregistry/v1/tag.proto"; -import "google/devtools/artifactregistry/v1/version.proto"; -import "google/devtools/artifactregistry/v1/vpcsc_config.proto"; -import "google/devtools/artifactregistry/v1/yum_artifact.proto"; -import "google/iam/v1/iam_policy.proto"; -import "google/iam/v1/policy.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "ServiceProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// The Artifact Registry API service. -// -// Artifact Registry is an artifact management system for storing artifacts -// from different package management systems. -// -// The resources managed by this API are: -// -// * Repositories, which group packages and their data. -// * Packages, which group versions and their tags. -// * Versions, which are specific forms of a package. -// * Tags, which represent alternative names for versions. -// * Files, which contain content and are optionally associated with a Package -// or Version. -service ArtifactRegistry { - option (google.api.default_host) = "artifactregistry.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform," - "https://www.googleapis.com/auth/cloud-platform.read-only"; - - // Lists docker images. - rpc ListDockerImages(ListDockerImagesRequest) - returns (ListDockerImagesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a docker image. - rpc GetDockerImage(GetDockerImageRequest) returns (DockerImage) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists maven artifacts. - rpc ListMavenArtifacts(ListMavenArtifactsRequest) - returns (ListMavenArtifactsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/repositories/*}/mavenArtifacts" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a maven artifact. - rpc GetMavenArtifact(GetMavenArtifactRequest) returns (MavenArtifact) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/repositories/*/mavenArtifacts/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists npm packages. - rpc ListNpmPackages(ListNpmPackagesRequest) - returns (ListNpmPackagesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/repositories/*}/npmPackages" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a npm package. - rpc GetNpmPackage(GetNpmPackageRequest) returns (NpmPackage) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/repositories/*/npmPackages/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists python packages. - rpc ListPythonPackages(ListPythonPackagesRequest) - returns (ListPythonPackagesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/repositories/*}/pythonPackages" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a python package. - rpc GetPythonPackage(GetPythonPackageRequest) returns (PythonPackage) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/repositories/*/pythonPackages/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Imports Apt artifacts. The returned Operation will complete once the - // resources are imported. Package, Version, and File resources are created - // based on the imported artifacts. Imported artifacts that conflict with - // existing resources are ignored. - rpc ImportAptArtifacts(ImportAptArtifactsRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.devtools.artifactregistry.v1.ImportAptArtifactsResponse" - metadata_type: "google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata" - }; - } - - // Imports Yum (RPM) artifacts. The returned Operation will complete once the - // resources are imported. Package, Version, and File resources are created - // based on the imported artifacts. Imported artifacts that conflict with - // existing resources are ignored. - rpc ImportYumArtifacts(ImportYumArtifactsRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.devtools.artifactregistry.v1.ImportYumArtifactsResponse" - metadata_type: "google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata" - }; - } - - // Lists repositories. - rpc ListRepositories(ListRepositoriesRequest) - returns (ListRepositoriesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/repositories" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a repository. - rpc GetRepository(GetRepositoryRequest) returns (Repository) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/repositories/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a repository. The returned Operation will finish once the - // repository has been created. Its response will be the created Repository. - rpc CreateRepository(CreateRepositoryRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/repositories" - body: "repository" - }; - option (google.api.method_signature) = "parent,repository,repository_id"; - option (google.longrunning.operation_info) = { - response_type: "google.devtools.artifactregistry.v1.Repository" - metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" - }; - } - - // Updates a repository. - rpc UpdateRepository(UpdateRepositoryRequest) returns (Repository) { - option (google.api.http) = { - patch: "/v1/{repository.name=projects/*/locations/*/repositories/*}" - body: "repository" - }; - option (google.api.method_signature) = "repository,update_mask"; - } - - // Deletes a repository and all of its contents. The returned Operation will - // finish once the repository has been deleted. It will not have any Operation - // metadata and will return a google.protobuf.Empty response. - rpc DeleteRepository(DeleteRepositoryRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/repositories/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" - }; - } - - // Lists packages. - rpc ListPackages(ListPackagesRequest) returns (ListPackagesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/repositories/*}/packages" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a package. - rpc GetPackage(GetPackageRequest) returns (Package) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Deletes a package and all of its versions and tags. The returned operation - // will complete once the package has been deleted. - rpc DeletePackage(DeletePackageRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" - }; - } - - // Lists versions. - rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a version - rpc GetVersion(GetVersionRequest) returns (Version) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Deletes a version and all of its content. The returned operation will - // complete once the version has been deleted. - rpc DeleteVersion(DeleteVersionRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" - }; - } - - // Deletes multiple versions across a repository. The returned operation will - // complete once the versions have been deleted. - rpc BatchDeleteVersions(BatchDeleteVersionsRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions:batchDelete" - body: "*" - }; - option (google.api.method_signature) = "parent,names"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata" - }; - } - - // Updates a version. - rpc UpdateVersion(UpdateVersionRequest) returns (Version) { - option (google.api.http) = { - patch: "/v1/{version.name=projects/*/locations/*/repositories/*/packages/*/versions/*}" - body: "version" - }; - option (google.api.method_signature) = "version,update_mask"; - } - - // Lists files. - rpc ListFiles(ListFilesRequest) returns (ListFilesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/repositories/*}/files" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a file. - rpc GetFile(GetFileRequest) returns (File) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/repositories/*/files/**}" - }; - option (google.api.method_signature) = "name"; - } - - // Deletes a file and all of its content. It is only allowed on generic - // repositories. The returned operation will complete once the file has been - // deleted. - rpc DeleteFile(DeleteFileRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/repositories/*/files/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" - }; - } - - // Updates a file. - rpc UpdateFile(UpdateFileRequest) returns (File) { - option (google.api.http) = { - patch: "/v1/{file.name=projects/*/locations/*/repositories/*/files/*}" - body: "file" - }; - option (google.api.method_signature) = "file,update_mask"; - } - - // Lists tags. - rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a tag. - rpc GetTag(GetTagRequest) returns (Tag) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a tag. - rpc CreateTag(CreateTagRequest) returns (Tag) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" - body: "tag" - }; - option (google.api.method_signature) = "parent,tag,tag_id"; - } - - // Updates a tag. - rpc UpdateTag(UpdateTagRequest) returns (Tag) { - option (google.api.http) = { - patch: "/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}" - body: "tag" - }; - option (google.api.method_signature) = "tag,update_mask"; - } - - // Deletes a tag. - rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a rule. - rpc CreateRule(CreateRuleRequest) returns (Rule) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/repositories/*}/rules" - body: "rule" - }; - option (google.api.method_signature) = "parent,rule,rule_id"; - } - - // Lists rules. - rpc ListRules(ListRulesRequest) returns (ListRulesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/repositories/*}/rules" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a rule. - rpc GetRule(GetRuleRequest) returns (Rule) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/repositories/*/rules/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates a rule. - rpc UpdateRule(UpdateRuleRequest) returns (Rule) { - option (google.api.http) = { - patch: "/v1/{rule.name=projects/*/locations/*/repositories/*/rules/*}" - body: "rule" - }; - option (google.api.method_signature) = "rule,update_mask"; - } - - // Deletes a rule. - rpc DeleteRule(DeleteRuleRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/repositories/*/rules/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the IAM policy for a given resource. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy" - body: "*" - }; - } - - // Gets the IAM policy for a given resource. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { - option (google.api.http) = { - get: "/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" - }; - } - - // Tests if the caller has a list of permissions on a resource. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions" - body: "*" - }; - } - - // Retrieves the Settings for the Project. - rpc GetProjectSettings(GetProjectSettingsRequest) returns (ProjectSettings) { - option (google.api.http) = { - get: "/v1/{name=projects/*/projectSettings}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the Settings for the Project. - rpc UpdateProjectSettings(UpdateProjectSettingsRequest) - returns (ProjectSettings) { - option (google.api.http) = { - patch: "/v1/{project_settings.name=projects/*/projectSettings}" - body: "project_settings" - }; - option (google.api.method_signature) = "project_settings,update_mask"; - } - - // Retrieves the VPCSC Config for the Project. - rpc GetVPCSCConfig(GetVPCSCConfigRequest) returns (VPCSCConfig) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/vpcscConfig}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the VPCSC Config for the Project. - rpc UpdateVPCSCConfig(UpdateVPCSCConfigRequest) returns (VPCSCConfig) { - option (google.api.http) = { - patch: "/v1/{vpcsc_config.name=projects/*/locations/*/vpcscConfig}" - body: "vpcsc_config" - }; - option (google.api.method_signature) = "vpcsc_config,update_mask"; - } - - // Updates a package. - rpc UpdatePackage(UpdatePackageRequest) returns (Package) { - option (google.api.http) = { - patch: "/v1/{package.name=projects/*/locations/*/repositories/*/packages/*}" - body: "package" - }; - option (google.api.method_signature) = "package,update_mask"; - } - - // Lists attachments. - rpc ListAttachments(ListAttachmentsRequest) - returns (ListAttachmentsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/repositories/*}/attachments" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets an attachment. - rpc GetAttachment(GetAttachmentRequest) returns (Attachment) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/repositories/*/attachments/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates an attachment. The returned Operation will finish once the - // attachment has been created. Its response will be the created attachment. - rpc CreateAttachment(CreateAttachmentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/repositories/*}/attachments" - body: "attachment" - }; - option (google.api.method_signature) = "parent,attachment,attachment_id"; - option (google.longrunning.operation_info) = { - response_type: "google.devtools.artifactregistry.v1.Attachment" - metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" - }; - } - - // Deletes an attachment. The returned Operation will - // finish once the attachments has been deleted. It will not have any - // Operation metadata and will return a `google.protobuf.Empty` response. - rpc DeleteAttachment(DeleteAttachmentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/repositories/*/attachments/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" - }; - } - - // Exports an artifact to a Cloud Storage bucket. - rpc ExportArtifact(ExportArtifactRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{repository=projects/*/locations/*/repositories/*}:exportArtifact" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.devtools.artifactregistry.v1.ExportArtifactResponse" - metadata_type: "google.devtools.artifactregistry.v1.ExportArtifactMetadata" - }; - } -} - -// Metadata type for longrunning-operations, currently empty. -message OperationMetadata {} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/settings.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/settings.proto deleted file mode 100644 index 54f94b30a78..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/settings.proto +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/field_mask.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "SettingsProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// The Artifact Registry settings that apply to a Project. -message ProjectSettings { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/ProjectSettings" - pattern: "projects/{project}/projectSettings" - }; - - // The possible redirection states for legacy repositories. - enum RedirectionState { - // No redirection status has been set. - REDIRECTION_STATE_UNSPECIFIED = 0; - - // Redirection is disabled. - REDIRECTION_FROM_GCR_IO_DISABLED = 1; - - // Redirection is enabled. - REDIRECTION_FROM_GCR_IO_ENABLED = 2; - - // Redirection is enabled, and has been finalized so cannot be reverted. - REDIRECTION_FROM_GCR_IO_FINALIZED = 3 [deprecated = true]; - - // Redirection is enabled and missing images are copied from GCR - REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING = 5; - - // Redirection is partially enabled and missing images are copied from GCR - REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING = 6; - } - - // 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; - - // The percentage of pull traffic to redirect from GCR to AR when using - // partial redirection. - int32 pull_percent = 3; -} - -// 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/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/tag.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/tag.proto deleted file mode 100644 index 3268a2f8ad0..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/tag.proto +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/resource.proto"; -import "google/protobuf/field_mask.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "TagProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// Tags point to a version and represent an alternative name that can be used -// to access the version. -message Tag { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/Tag" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}" - }; - - // The name of the tag, for example: - // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". - // If the package part contains slashes, the slashes are escaped. - // The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else - // must be URL encoded. - string name = 1; - - // The name of the version the tag refers to, for example: - // `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811` - // If the package or version ID parts contain slashes, the slashes are - // escaped. - string version = 2; -} - -// The request to list tags. -message ListTagsRequest { - // The name of the parent package whose tags will be listed. - // For example: - // `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. - string parent = 1; - - // An expression for filtering the results of the request. Filter rules are - // case insensitive. The fields eligible for filtering are: - // - // * `name` - // * `version` - // - // Examples of using a filter: - // - // To filter the results of your request to tags with the name `my-tag` in - // package `my-package` in repository `my-repo` in project "`y-project` in - // the us-central region, append the following filter expression to your - // request: - // - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` - // - // You can also use wildcards to match any number of characters before or - // after the value: - // - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` - // - // To filter the results of your request to tags applied to the version - // `1.0` in package `my-package`, append the following filter expression to - // your request: - // - // * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - string filter = 4; - - // The maximum number of tags to return. Maximum page size is 1,000. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. - string page_token = 3; -} - -// The response from listing tags. -message ListTagsResponse { - // The tags returned. - repeated Tag tags = 1; - - // The token to retrieve the next page of tags, or empty if there are no - // more tags to return. - string next_page_token = 2; -} - -// The request to retrieve a tag. -message GetTagRequest { - // The name of the tag to retrieve. - string name = 1; -} - -// The request to create a new tag. -message CreateTagRequest { - // The name of the parent resource where the tag will be created. - string parent = 1; - - // The tag id to use for this repository. - string tag_id = 2; - - // The tag to be created. - Tag tag = 3; -} - -// The request to create or update a tag. -message UpdateTagRequest { - // The tag that replaces the resource on the server. - Tag tag = 1; - - // The update mask applies to the resource. For the `FieldMask` definition, - // see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2; -} - -// The request to delete a tag. -message DeleteTagRequest { - // The name of the tag to delete. - string name = 1; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto deleted file mode 100644 index 4efa5c15fec..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/devtools/artifactregistry/v1/file.proto"; -import "google/devtools/artifactregistry/v1/tag.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "VersionProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// The view, which determines what version information is returned in a -// response. -enum VersionView { - // The default / unset value. - // The API will default to the BASIC view. - VERSION_VIEW_UNSPECIFIED = 0; - - // Includes basic information about the version, but not any related tags. - BASIC = 1; - - // Include everything. - FULL = 2; -} - -// The body of a version resource. A version resource represents a -// collection of components, such as files and other data. This may correspond -// to a version in many package management schemes. -message Version { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/Version" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}" - }; - - // The name of the version, for example: - // `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1`. - // If the package or version ID parts contain slashes, the slashes are - // escaped. - string name = 1; - - // Optional. Description of the version, as specified in its metadata. - string description = 3; - - // The time when the version was created. - google.protobuf.Timestamp create_time = 5; - - // The time when the version was last updated. - google.protobuf.Timestamp update_time = 6; - - // Output only. A list of related tags. Will contain up to 100 tags that - // reference this version. - repeated Tag related_tags = 7; - - // Output only. Repository-specific Metadata stored against this version. - // The fields returned are defined by the underlying repository-specific - // resource. Currently, the resources could be: - // [DockerImage][google.devtools.artifactregistry.v1.DockerImage] - // [MavenArtifact][google.devtools.artifactregistry.v1.MavenArtifact] - google.protobuf.Struct metadata = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Client specified annotations. - map annotations = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Immutable reference for the version, calculated based on the - // version's content. Currently we only support dirsum_sha256 hash algorithm. - // Additional hash algorithms may be added in the future. - repeated Hash fingerprints = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request to list versions. -message ListVersionsRequest { - // The name of the parent resource whose versions will be listed. - string parent = 1; - - // The maximum number of versions to return. Maximum page size is 1,000. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. - string page_token = 3; - - // The view that should be returned in the response. - VersionView view = 4; - - // Optional. The field to order the results by. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. An expression for filtering the results of the request. Filter - // rules are case insensitive. The fields eligible for filtering are: - // - // * `name` - // * `annotations` - // - // Examples of using a filter: - // - // To filter the results of your request to versions with the name - // `my-version` in project `my-project` in the `us-central` region, in - // repository `my-repo`, append the following filter expression to your - // request: - // - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` - // - // You can also use wildcards to match any number of characters before or - // after the value: - // - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` - // * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` - // - // To filter the results of your request to versions with the annotation - // key-value pair [`external_link`: `external_link_value`], append the - // following filter expression to your request: - // - // * `"annotations.external_link:external_link_value"` - // - // To filter just for a specific annotation key `external_link`, append the - // following filter expression to your request: - // - // * `"annotations.external_link"` - // - // If the annotation key or value contains special characters, you can escape - // them by surrounding the value with backticks. For example, to filter the - // results of your request to versions with the annotation key-value pair - // [`external.link`:`https://example.com/my-version`], append the following - // filter expression to your request: - // - // * `` "annotations.`external.link`:`https://example.com/my-version`" `` - // - // You can also filter with annotations with a wildcard to - // match any number of characters before or after the value: - // - // * `` "annotations.*_link:`*example.com*`" `` - string filter = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response from listing versions. -message ListVersionsResponse { - // The versions returned. - repeated Version versions = 1; - - // The token to retrieve the next page of versions, or empty if there are no - // more versions to return. - string next_page_token = 2; -} - -// The request to retrieve a version. -message GetVersionRequest { - // The name of the version to retrieve. - string name = 1; - - // The view that should be returned in the response. - VersionView view = 2; -} - -// The request to delete a version. -message DeleteVersionRequest { - // The name of the version to delete. - string name = 1; - - // By default, a version that is tagged may not be deleted. If force=true, the - // version and any tags pointing to the version are deleted. - bool force = 2; -} - -// The request to delete multiple versions across a repository. -message BatchDeleteVersionsRequest { - // The name of the repository holding all requested versions. - string parent = 1 [(google.api.resource_reference) = { - child_type: "artifactregistry.googleapis.com/Version" - }]; - - // Required. The names of the versions to delete. - // The maximum number of versions deleted per batch is determined by the - // service and is dependent on the available resources in the region. - repeated string names = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/Version" - } - ]; - - // If true, the request is performed without deleting data, following AIP-163. - bool validate_only = 3; -} - -// The metadata of an LRO from deleting multiple versions. -message BatchDeleteVersionsMetadata { - // The versions the operation failed to delete. - repeated string failed_versions = 2; -} - -// The request to update a version. -message UpdateVersionRequest { - // Required. The Version that replaces the resource on the server. - Version version = 1 [(google.api.field_behavior) = REQUIRED]; - - // The update mask applies to the resource. For the `FieldMask` definition, - // see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/vpcsc_config.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/vpcsc_config.proto deleted file mode 100644 index 477bbda9a89..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/vpcsc_config.proto +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/field_mask.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "VPCSCConfigProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// The Artifact Registry VPC SC config that apply to a Project. -message VPCSCConfig { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/VpcscConfig" - pattern: "projects/{project}/locations/{location}/vpcscConfig" - }; - - // VPCSCPolicy is the VPC SC policy for project and location. - enum VPCSCPolicy { - // VPCSC_POLICY_UNSPECIFIED - the VPS SC policy is not defined. - // When VPS SC policy is not defined - the Service will use the default - // behavior (VPCSC_DENY). - VPCSC_POLICY_UNSPECIFIED = 0; - - // VPCSC_DENY - repository will block the requests to the Upstreams for the - // Remote Repositories if the resource is in the perimeter. - DENY = 1; - - // VPCSC_ALLOW - repository will allow the requests to the Upstreams for the - // Remote Repositories if the resource is in the perimeter. - ALLOW = 2; - } - - // The name of the project's VPC SC Config. - // - // Always of the form: - // projects/{projectID}/locations/{location}/vpcscConfig - // - // In update request: never set - // In response: always set - string name = 1; - - // The project per location VPC SC policy that defines the VPC SC behavior for - // the Remote Repository (Allow/Deny). - VPCSCPolicy vpcsc_policy = 2; -} - -// Gets the VPC SC config for a project. -message GetVPCSCConfigRequest { - // Required. The name of the VPCSCConfig resource. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/VpcscConfig" - } - ]; -} - -// Sets the VPCSC config of the project. -message UpdateVPCSCConfigRequest { - // The project config. - VPCSCConfig vpcsc_config = 1; - - // Field mask to support partial updates. - google.protobuf.FieldMask update_mask = 2; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/yum_artifact.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/yum_artifact.proto deleted file mode 100644 index 3592c8f4896..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/yum_artifact.proto +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.devtools.artifactregistry.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "YumArtifactProto"; -option java_package = "com.google.devtools.artifactregistry.v1"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; - -// A detailed representation of a Yum artifact. -message YumArtifact { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/YumArtifact" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}" - }; - - // Package type is either binary or source. - enum PackageType { - // Package type is not specified. - PACKAGE_TYPE_UNSPECIFIED = 0; - - // Binary package (.rpm). - BINARY = 1; - - // Source package (.srpm). - SOURCE = 2; - } - - // Output only. The Artifact Registry resource name of the artifact. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The yum package name of the artifact. - string package_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. An artifact is a binary or source package. - PackageType package_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Operating system architecture of the artifact. - string architecture = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Google Cloud Storage location where the artifacts currently reside. -message ImportYumArtifactsGcsSource { - // Cloud Storage paths URI (e.g., gs://my_bucket//my_object). - repeated string uris = 1; - - // Supports URI wildcards for matching multiple objects from a single URI. - bool use_wildcards = 2; -} - -// The request to import new yum artifacts. -message ImportYumArtifactsRequest { - // The source location of the package binaries. - oneof source { - // Google Cloud Storage location where input content is located. - ImportYumArtifactsGcsSource gcs_source = 2; - } - - // The name of the parent resource where the artifacts will be imported. - string parent = 1; -} - -// Error information explaining why a package was not imported. -message ImportYumArtifactsErrorInfo { - // The source that was not imported. - oneof source { - // Google Cloud Storage location requested. - ImportYumArtifactsGcsSource gcs_source = 1; - } - - // The detailed error status. - google.rpc.Status error = 2; -} - -// The response message from importing YUM artifacts. -message ImportYumArtifactsResponse { - // The yum artifacts imported. - repeated YumArtifact yum_artifacts = 1; - - // Detailed error info for packages that were not imported. - repeated ImportYumArtifactsErrorInfo errors = 2; -} - -// The operation metadata for importing artifacts. -message ImportYumArtifactsMetadata {} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/apt_artifact.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/apt_artifact.proto deleted file mode 100644 index a46acf0c1b0..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/apt_artifact.proto +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2025 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/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; -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/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/file.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/file.proto deleted file mode 100644 index 8e315002f64..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/file.proto +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2025 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/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "FileProto"; -option java_package = "com.google.devtools.artifactregistry.v1beta2"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2"; - -// A hash of file content. -message Hash { - // The algorithm used to compute the hash. - enum HashType { - // Unspecified. - HASH_TYPE_UNSPECIFIED = 0; - - // SHA256 hash. - SHA256 = 1; - - // MD5 hash. - MD5 = 2; - } - - // The algorithm used to compute the hash value. - HashType type = 1; - - // The hash value. - bytes value = 2; -} - -// Files store content that is potentially associated with Packages or Versions. -message File { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/File" - pattern: "projects/{project}/locations/{location}/repositories/{repository}/files/{file}" - }; - - // The name of the file, for example: - // "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt". - // If the file ID part contains slashes, they are escaped. - string name = 1; - - // The size of the File in bytes. - int64 size_bytes = 3; - - // The hashes of the file content. - repeated Hash hashes = 4; - - // The time when the File was created. - google.protobuf.Timestamp create_time = 5; - - // The time when the File was last updated. - google.protobuf.Timestamp update_time = 6; - - // The name of the Package or Version that owns this file, if any. - string owner = 7; -} - -// The request to list files. -message ListFilesRequest { - // The name of the repository whose files will be listed. For example: - // "projects/p1/locations/us-central1/repositories/repo1 - string parent = 1; - - // An expression for filtering the results of the request. Filter rules are - // case insensitive. The fields eligible for filtering are: - // - // * `name` - // * `owner` - // - // An example of using a filter: - // - // * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an - // ID starting with "a/b/". - // * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> - // Files owned by the version `1.0` in package `pkg1`. - string filter = 4; - - // The maximum number of files to return. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. - string page_token = 3; -} - -// The response from listing files. -message ListFilesResponse { - // The files returned. - repeated File files = 1; - - // The token to retrieve the next page of files, or empty if there are no - // more files to return. - string next_page_token = 2; -} - -// The request to retrieve a file. -message GetFileRequest { - // The name of the file to retrieve. - string name = 1; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/package.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/package.proto deleted file mode 100644 index c56676be704..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/package.proto +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2025 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/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "PackageProto"; -option java_package = "com.google.devtools.artifactregistry.v1beta2"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2"; - -// Packages are named collections of versions. -message Package { - // The name of the package, for example: - // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1". - string name = 1; - - // The display name of the package. - string display_name = 2; - - // The time when the package was created. - google.protobuf.Timestamp create_time = 5; - - // The time when the package was last updated. This includes publishing a new - // version of the package. - google.protobuf.Timestamp update_time = 6; -} - -// The request to list packages. -message ListPackagesRequest { - // The name of the parent resource whose packages will be listed. - string parent = 1; - - // The maximum number of packages to return. - // Maximum page size is 10,000. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. - string page_token = 3; -} - -// The response from listing packages. -message ListPackagesResponse { - // The packages returned. - repeated Package packages = 1; - - // The token to retrieve the next page of packages, or empty if there are no - // more packages to return. - string next_page_token = 2; -} - -// The request to retrieve a package. -message GetPackageRequest { - // The name of the package to retrieve. - string name = 1; -} - -// The request to delete a package. -message DeletePackageRequest { - // The name of the package to delete. - string name = 1; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/repository.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/repository.proto deleted file mode 100644 index 942d6d31349..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/repository.proto +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright 2025 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/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "RepositoryProto"; -option java_package = "com.google.devtools.artifactregistry.v1beta2"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2"; -option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2"; - -// A Repository for storing artifacts with a specific format. -message Repository { - option (google.api.resource) = { - type: "artifactregistry.googleapis.com/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. - FORMAT_UNSPECIFIED = 0; - - // 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: - // "projects/p1/locations/us-central1/repositories/repo1". - string name = 1; - - // The format of packages that are stored in the repository. - Format format = 2; - - // The user-provided description of the repository. - string description = 3; - - // Labels with user-defined metadata. - // This field may contain up to 64 entries. Label keys and values may be no - // longer than 63 characters. Label keys must begin with a lowercase letter - // and may only contain lowercase letters, numeric characters, underscores, - // and dashes. - map labels = 4; - - // The time when the repository was created. - google.protobuf.Timestamp create_time = 5; - - // The time when the repository was last updated. - google.protobuf.Timestamp update_time = 6; - - // The Cloud KMS resource name of the customer managed encryption key that’s - // used to encrypt the contents of the Repository. Has the form: - // `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. - // This value may not be changed after the Repository has been created. - string kms_key_name = 8; -} - -// The request to list repositories. -message ListRepositoriesRequest { - // 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. - string page_token = 3; -} - -// The response from listing repositories. -message ListRepositoriesResponse { - // The repositories returned. - repeated Repository repositories = 1; - - // The token to retrieve the next page of repositories, or empty if there are - // no more repositories to return. - string next_page_token = 2; -} - -// The request to retrieve a repository. -message GetRepositoryRequest { - // 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 { - // Required. The name of the parent resource where the repository will be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "artifactregistry.googleapis.com/Repository" - } - ]; - - // The repository id to use for this repository. - string repository_id = 2; - - // The repository to be created. - Repository repository = 3; -} - -// The request to update a repository. -message UpdateRepositoryRequest { - // The repository that replaces the resource on the server. - Repository repository = 1; - - // The update mask applies to the resource. For the `FieldMask` definition, - // see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2; -} - -// The request to delete a repository. -message DeleteRepositoryRequest { - // Required. The name of the repository to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "artifactregistry.googleapis.com/Repository" - } - ]; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/service.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/service.proto deleted file mode 100644 index 0f872fa737d..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/service.proto +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright 2025 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/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"; -import "google/protobuf/empty.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "ServiceProto"; -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 API service. -// -// Artifact Registry is an artifact management system for storing artifacts -// from different package management systems. -// -// The resources managed by this API are: -// -// * Repositories, which group packages and their data. -// * Packages, which group versions and their tags. -// * Versions, which are specific forms of a package. -// * Tags, which represent alternative names for versions. -// * Files, which contain content and are optionally associated with a Package -// or Version. -service ArtifactRegistry { - option (google.api.default_host) = "artifactregistry.googleapis.com"; - option (google.api.oauth_scopes) = - "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) = { - get: "/v1beta2/{parent=projects/*/locations/*}/repositories" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a repository. - rpc GetRepository(GetRepositoryRequest) returns (Repository) { - option (google.api.http) = { - get: "/v1beta2/{name=projects/*/locations/*/repositories/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a repository. The returned Operation will finish once the - // repository has been created. Its response will be the created Repository. - rpc CreateRepository(CreateRepositoryRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta2/{parent=projects/*/locations/*}/repositories" - body: "repository" - }; - option (google.api.method_signature) = "parent,repository,repository_id"; - option (google.longrunning.operation_info) = { - response_type: "google.devtools.artifactregistry.v1beta2.Repository" - metadata_type: "google.devtools.artifactregistry.v1beta2.OperationMetadata" - }; - } - - // Updates a repository. - rpc UpdateRepository(UpdateRepositoryRequest) returns (Repository) { - option (google.api.http) = { - patch: "/v1beta2/{repository.name=projects/*/locations/*/repositories/*}" - body: "repository" - }; - option (google.api.method_signature) = "repository,update_mask"; - } - - // Deletes a repository and all of its contents. The returned Operation will - // finish once the repository has been deleted. It will not have any Operation - // metadata and will return a google.protobuf.Empty response. - rpc DeleteRepository(DeleteRepositoryRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta2/{name=projects/*/locations/*/repositories/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.devtools.artifactregistry.v1beta2.OperationMetadata" - }; - } - - // Lists packages. - rpc ListPackages(ListPackagesRequest) returns (ListPackagesResponse) { - option (google.api.http) = { - get: "/v1beta2/{parent=projects/*/locations/*/repositories/*}/packages" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a package. - rpc GetPackage(GetPackageRequest) returns (Package) { - option (google.api.http) = { - get: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Deletes a package and all of its versions and tags. The returned operation - // will complete once the package has been deleted. - rpc DeletePackage(DeletePackageRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.devtools.artifactregistry.v1beta2.OperationMetadata" - }; - } - - // Lists versions. - rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) { - option (google.api.http) = { - get: "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/versions" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a version - rpc GetVersion(GetVersionRequest) returns (Version) { - option (google.api.http) = { - get: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Deletes a version and all of its content. The returned operation will - // complete once the version has been deleted. - rpc DeleteVersion(DeleteVersionRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.devtools.artifactregistry.v1beta2.OperationMetadata" - }; - } - - // Lists files. - rpc ListFiles(ListFilesRequest) returns (ListFilesResponse) { - option (google.api.http) = { - get: "/v1beta2/{parent=projects/*/locations/*/repositories/*}/files" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a file. - rpc GetFile(GetFileRequest) returns (File) { - option (google.api.http) = { - get: "/v1beta2/{name=projects/*/locations/*/repositories/*/files/**}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists tags. - rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { - option (google.api.http) = { - get: "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a tag. - rpc GetTag(GetTagRequest) returns (Tag) { - option (google.api.http) = { - get: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a tag. - rpc CreateTag(CreateTagRequest) returns (Tag) { - option (google.api.http) = { - post: "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" - body: "tag" - }; - option (google.api.method_signature) = "parent,tag,tag_id"; - } - - // Updates a tag. - rpc UpdateTag(UpdateTagRequest) returns (Tag) { - option (google.api.http) = { - patch: "/v1beta2/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}" - body: "tag" - }; - option (google.api.method_signature) = "tag,update_mask"; - } - - // Deletes a tag. - rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the IAM policy for a given resource. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1beta2/{resource=projects/*/locations/*/repositories/*}:setIamPolicy" - body: "*" - }; - } - - // Gets the IAM policy for a given resource. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - get: "/v1beta2/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" - }; - } - - // Tests if the caller has a list of permissions on a resource. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1beta2/{resource=projects/*/locations/*/repositories/*}:testIamPermissions" - 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 { - -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/settings.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/settings.proto deleted file mode 100644 index 844bc0080f2..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/settings.proto +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2025 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/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/field_mask.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -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/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/tag.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/tag.proto deleted file mode 100644 index 5ca0805ff70..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/tag.proto +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2025 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/resource.proto"; -import "google/protobuf/field_mask.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "TagProto"; -option java_package = "com.google.devtools.artifactregistry.v1beta2"; -option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2"; -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; -} - -// The request to list tags. -message ListTagsRequest { - // The name of the parent resource whose tags will be listed. - string parent = 1; - - // An expression for filtering the results of the request. Filter rules are - // case insensitive. The fields eligible for filtering are: - // - // * `version` - // - // An example of using a filter: - // - // * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` - // --> Tags that are applied to the version `1.0` in package `pkg1`. - string filter = 4; - - // The maximum number of tags to return. Maximum page size is 10,000. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. - string page_token = 3; -} - -// The response from listing tags. -message ListTagsResponse { - // The tags returned. - repeated Tag tags = 1; - - // The token to retrieve the next page of tags, or empty if there are no - // more tags to return. - string next_page_token = 2; -} - -// The request to retrieve a tag. -message GetTagRequest { - // The name of the tag to retrieve. - string name = 1; -} - -// The request to create a new tag. -message CreateTagRequest { - // The name of the parent resource where the tag will be created. - string parent = 1; - - // The tag id to use for this repository. - string tag_id = 2; - - // The tag to be created. - Tag tag = 3; -} - -// The request to create or update a tag. -message UpdateTagRequest { - // The tag that replaces the resource on the server. - Tag tag = 1; - - // The update mask applies to the resource. For the `FieldMask` definition, - // see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2; -} - -// The request to delete a tag. -message DeleteTagRequest { - // The name of the tag to delete. - string name = 1; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/version.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/version.proto deleted file mode 100644 index 92d157cb3d3..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/version.proto +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2025 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/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"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; -option java_multiple_files = true; -option java_outer_classname = "VersionProto"; -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. - string description = 3; - - // The time when the version was created. - google.protobuf.Timestamp create_time = 5; - - // The time when the version was last updated. - google.protobuf.Timestamp update_time = 6; - - // Output only. A list of related tags. Will contain up to 100 tags that - // reference this version. - repeated Tag related_tags = 7; - - // Output only. Repository-specific Metadata stored against this version. - // The fields returned are defined by the underlying repository-specific - // resource. Currently, the only resource in use is - // [DockerImage][google.devtools.artifactregistry.v1.DockerImage] - google.protobuf.Struct metadata = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request to list versions. -message ListVersionsRequest { - // The name of the parent resource whose versions will be listed. - string parent = 1; - - // The maximum number of versions to return. Maximum page size is 1,000. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. - string page_token = 3; - - // The view that should be returned in the response. - VersionView view = 4; - - // Optional. The field to order the results by. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response from listing versions. -message ListVersionsResponse { - // The versions returned. - repeated Version versions = 1; - - // The token to retrieve the next page of versions, or empty if there are no - // more versions to return. - string next_page_token = 2; -} - -// The request to retrieve a version. -message GetVersionRequest { - // The name of the version to retrieve. - string name = 1; - - // The view that should be returned in the response. - VersionView view = 2; -} - -// The request to delete a version. -message DeleteVersionRequest { - // The name of the version to delete. - string name = 1; - - // By default, a version that is tagged may not be deleted. If force=true, the - // version and any tags pointing to the version are deleted. - bool force = 2; -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/yum_artifact.proto b/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/yum_artifact.proto deleted file mode 100644 index 1df2158b2a5..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1beta2/yum_artifact.proto +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2025 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/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; -option go_package = "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb"; -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/owl-bot-staging/google-devtools-artifactregistry/protos/protos.d.ts b/owl-bot-staging/google-devtools-artifactregistry/protos/protos.d.ts deleted file mode 100644 index 1f77436a9c4..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/protos.d.ts +++ /dev/null @@ -1,29137 +0,0 @@ -// Copyright 2025 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. - -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace devtools. */ - namespace devtools { - - /** Namespace artifactregistry. */ - namespace artifactregistry { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of an AptArtifact. */ - interface IAptArtifact { - - /** AptArtifact name */ - name?: (string|null); - - /** AptArtifact packageName */ - packageName?: (string|null); - - /** AptArtifact packageType */ - packageType?: (google.devtools.artifactregistry.v1.AptArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1.AptArtifact.PackageType|null); - - /** AptArtifact architecture */ - architecture?: (string|null); - - /** AptArtifact component */ - component?: (string|null); - - /** AptArtifact controlFile */ - controlFile?: (Uint8Array|Buffer|string|null); - } - - /** Represents an AptArtifact. */ - class AptArtifact implements IAptArtifact { - - /** - * Constructs a new AptArtifact. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IAptArtifact); - - /** AptArtifact name. */ - public name: string; - - /** AptArtifact packageName. */ - public packageName: string; - - /** AptArtifact packageType. */ - public packageType: (google.devtools.artifactregistry.v1.AptArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1.AptArtifact.PackageType); - - /** AptArtifact architecture. */ - public architecture: string; - - /** AptArtifact component. */ - public component: string; - - /** AptArtifact controlFile. */ - public controlFile: (Uint8Array|Buffer|string); - - /** - * Creates a new AptArtifact instance using the specified properties. - * @param [properties] Properties to set - * @returns AptArtifact instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IAptArtifact): google.devtools.artifactregistry.v1.AptArtifact; - - /** - * Encodes the specified AptArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.AptArtifact.verify|verify} messages. - * @param message AptArtifact message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IAptArtifact, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AptArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.AptArtifact.verify|verify} messages. - * @param message AptArtifact message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IAptArtifact, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 AptArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.AptArtifact; - - /** - * Decodes an AptArtifact message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AptArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.AptArtifact; - - /** - * 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 an AptArtifact message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AptArtifact - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.AptArtifact; - - /** - * Creates a plain object from an AptArtifact message. Also converts values to other types if specified. - * @param message AptArtifact - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.AptArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AptArtifact to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AptArtifact - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AptArtifact { - - /** PackageType enum. */ - enum PackageType { - PACKAGE_TYPE_UNSPECIFIED = 0, - BINARY = 1, - SOURCE = 2 - } - } - - /** Properties of an ImportAptArtifactsGcsSource. */ - interface IImportAptArtifactsGcsSource { - - /** ImportAptArtifactsGcsSource uris */ - uris?: (string[]|null); - - /** ImportAptArtifactsGcsSource useWildcards */ - useWildcards?: (boolean|null); - } - - /** Represents an ImportAptArtifactsGcsSource. */ - class ImportAptArtifactsGcsSource implements IImportAptArtifactsGcsSource { - - /** - * Constructs a new ImportAptArtifactsGcsSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource); - - /** ImportAptArtifactsGcsSource uris. */ - public uris: string[]; - - /** ImportAptArtifactsGcsSource useWildcards. */ - public useWildcards: boolean; - - /** - * Creates a new ImportAptArtifactsGcsSource instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportAptArtifactsGcsSource instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource): google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource; - - /** - * Encodes the specified ImportAptArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.verify|verify} messages. - * @param message ImportAptArtifactsGcsSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportAptArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.verify|verify} messages. - * @param message ImportAptArtifactsGcsSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 ImportAptArtifactsGcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource; - - /** - * Decodes an ImportAptArtifactsGcsSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportAptArtifactsGcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource; - - /** - * 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 an ImportAptArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportAptArtifactsGcsSource - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource; - - /** - * Creates a plain object from an ImportAptArtifactsGcsSource message. Also converts values to other types if specified. - * @param message ImportAptArtifactsGcsSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportAptArtifactsGcsSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportAptArtifactsGcsSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportAptArtifactsRequest. */ - interface IImportAptArtifactsRequest { - - /** ImportAptArtifactsRequest gcsSource */ - gcsSource?: (google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null); - - /** ImportAptArtifactsRequest parent */ - parent?: (string|null); - } - - /** Represents an ImportAptArtifactsRequest. */ - class ImportAptArtifactsRequest implements IImportAptArtifactsRequest { - - /** - * Constructs a new ImportAptArtifactsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest); - - /** ImportAptArtifactsRequest gcsSource. */ - public gcsSource?: (google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null); - - /** ImportAptArtifactsRequest parent. */ - public parent: string; - - /** ImportAptArtifactsRequest source. */ - public source?: "gcsSource"; - - /** - * Creates a new ImportAptArtifactsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportAptArtifactsRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest): google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; - - /** - * Encodes the specified ImportAptArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.verify|verify} messages. - * @param message ImportAptArtifactsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportAptArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.verify|verify} messages. - * @param message ImportAptArtifactsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 ImportAptArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; - - /** - * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportAptArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; - - /** - * 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 an ImportAptArtifactsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportAptArtifactsRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; - - /** - * Creates a plain object from an ImportAptArtifactsRequest message. Also converts values to other types if specified. - * @param message ImportAptArtifactsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportAptArtifactsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportAptArtifactsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportAptArtifactsErrorInfo. */ - interface IImportAptArtifactsErrorInfo { - - /** ImportAptArtifactsErrorInfo gcsSource */ - gcsSource?: (google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null); - - /** ImportAptArtifactsErrorInfo error */ - error?: (google.rpc.IStatus|null); - } - - /** Represents an ImportAptArtifactsErrorInfo. */ - class ImportAptArtifactsErrorInfo implements IImportAptArtifactsErrorInfo { - - /** - * Constructs a new ImportAptArtifactsErrorInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo); - - /** ImportAptArtifactsErrorInfo gcsSource. */ - public gcsSource?: (google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null); - - /** ImportAptArtifactsErrorInfo error. */ - public error?: (google.rpc.IStatus|null); - - /** ImportAptArtifactsErrorInfo source. */ - public source?: "gcsSource"; - - /** - * Creates a new ImportAptArtifactsErrorInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportAptArtifactsErrorInfo instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo): google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo; - - /** - * Encodes the specified ImportAptArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify|verify} messages. - * @param message ImportAptArtifactsErrorInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportAptArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify|verify} messages. - * @param message ImportAptArtifactsErrorInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 ImportAptArtifactsErrorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo; - - /** - * Decodes an ImportAptArtifactsErrorInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportAptArtifactsErrorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo; - - /** - * 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 an ImportAptArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportAptArtifactsErrorInfo - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo; - - /** - * Creates a plain object from an ImportAptArtifactsErrorInfo message. Also converts values to other types if specified. - * @param message ImportAptArtifactsErrorInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportAptArtifactsErrorInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportAptArtifactsErrorInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportAptArtifactsResponse. */ - interface IImportAptArtifactsResponse { - - /** ImportAptArtifactsResponse aptArtifacts */ - aptArtifacts?: (google.devtools.artifactregistry.v1.IAptArtifact[]|null); - - /** ImportAptArtifactsResponse errors */ - errors?: (google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo[]|null); - } - - /** Represents an ImportAptArtifactsResponse. */ - class ImportAptArtifactsResponse implements IImportAptArtifactsResponse { - - /** - * Constructs a new ImportAptArtifactsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsResponse); - - /** ImportAptArtifactsResponse aptArtifacts. */ - public aptArtifacts: google.devtools.artifactregistry.v1.IAptArtifact[]; - - /** ImportAptArtifactsResponse errors. */ - public errors: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo[]; - - /** - * Creates a new ImportAptArtifactsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportAptArtifactsResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsResponse): google.devtools.artifactregistry.v1.ImportAptArtifactsResponse; - - /** - * Encodes the specified ImportAptArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.verify|verify} messages. - * @param message ImportAptArtifactsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportAptArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.verify|verify} messages. - * @param message ImportAptArtifactsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 ImportAptArtifactsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsResponse; - - /** - * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportAptArtifactsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsResponse; - - /** - * 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 an ImportAptArtifactsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportAptArtifactsResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsResponse; - - /** - * Creates a plain object from an ImportAptArtifactsResponse message. Also converts values to other types if specified. - * @param message ImportAptArtifactsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportAptArtifactsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportAptArtifactsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportAptArtifactsMetadata. */ - interface IImportAptArtifactsMetadata { - } - - /** Represents an ImportAptArtifactsMetadata. */ - class ImportAptArtifactsMetadata implements IImportAptArtifactsMetadata { - - /** - * Constructs a new ImportAptArtifactsMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata); - - /** - * Creates a new ImportAptArtifactsMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportAptArtifactsMetadata instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata): google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; - - /** - * Encodes the specified ImportAptArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata.verify|verify} messages. - * @param message ImportAptArtifactsMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportAptArtifactsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata.verify|verify} messages. - * @param message ImportAptArtifactsMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 ImportAptArtifactsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; - - /** - * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportAptArtifactsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; - - /** - * 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 an ImportAptArtifactsMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportAptArtifactsMetadata - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; - - /** - * Creates a plain object from an ImportAptArtifactsMetadata message. Also converts values to other types if specified. - * @param message ImportAptArtifactsMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportAptArtifactsMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportAptArtifactsMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DockerImage. */ - interface IDockerImage { - - /** DockerImage name */ - name?: (string|null); - - /** DockerImage uri */ - uri?: (string|null); - - /** DockerImage tags */ - tags?: (string[]|null); - - /** DockerImage imageSizeBytes */ - imageSizeBytes?: (number|Long|string|null); - - /** DockerImage uploadTime */ - uploadTime?: (google.protobuf.ITimestamp|null); - - /** DockerImage mediaType */ - mediaType?: (string|null); - - /** DockerImage buildTime */ - buildTime?: (google.protobuf.ITimestamp|null); - - /** DockerImage updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** DockerImage artifactType */ - artifactType?: (string|null); - - /** DockerImage imageManifests */ - imageManifests?: (google.devtools.artifactregistry.v1.IImageManifest[]|null); - } - - /** Represents a DockerImage. */ - class DockerImage implements IDockerImage { - - /** - * Constructs a new DockerImage. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IDockerImage); - - /** DockerImage name. */ - public name: string; - - /** DockerImage uri. */ - public uri: string; - - /** DockerImage tags. */ - public tags: string[]; - - /** DockerImage imageSizeBytes. */ - public imageSizeBytes: (number|Long|string); - - /** DockerImage uploadTime. */ - public uploadTime?: (google.protobuf.ITimestamp|null); - - /** DockerImage mediaType. */ - public mediaType: string; - - /** DockerImage buildTime. */ - public buildTime?: (google.protobuf.ITimestamp|null); - - /** DockerImage updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** DockerImage artifactType. */ - public artifactType: string; - - /** DockerImage imageManifests. */ - public imageManifests: google.devtools.artifactregistry.v1.IImageManifest[]; - - /** - * Creates a new DockerImage instance using the specified properties. - * @param [properties] Properties to set - * @returns DockerImage instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IDockerImage): google.devtools.artifactregistry.v1.DockerImage; - - /** - * Encodes the specified DockerImage message. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. - * @param message DockerImage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IDockerImage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DockerImage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. - * @param message DockerImage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDockerImage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DockerImage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DockerImage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DockerImage; - - /** - * Decodes a DockerImage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DockerImage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DockerImage; - - /** - * Verifies a DockerImage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DockerImage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DockerImage - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DockerImage; - - /** - * Creates a plain object from a DockerImage message. Also converts values to other types if specified. - * @param message DockerImage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.DockerImage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DockerImage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DockerImage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImageManifest. */ - interface IImageManifest { - - /** ImageManifest architecture */ - architecture?: (string|null); - - /** ImageManifest os */ - os?: (string|null); - - /** ImageManifest digest */ - digest?: (string|null); - - /** ImageManifest mediaType */ - mediaType?: (string|null); - - /** ImageManifest osVersion */ - osVersion?: (string|null); - - /** ImageManifest osFeatures */ - osFeatures?: (string[]|null); - - /** ImageManifest variant */ - variant?: (string|null); - } - - /** Represents an ImageManifest. */ - class ImageManifest implements IImageManifest { - - /** - * Constructs a new ImageManifest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IImageManifest); - - /** ImageManifest architecture. */ - public architecture: string; - - /** ImageManifest os. */ - public os: string; - - /** ImageManifest digest. */ - public digest: string; - - /** ImageManifest mediaType. */ - public mediaType: string; - - /** ImageManifest osVersion. */ - public osVersion: string; - - /** ImageManifest osFeatures. */ - public osFeatures: string[]; - - /** ImageManifest variant. */ - public variant: string; - - /** - * Creates a new ImageManifest instance using the specified properties. - * @param [properties] Properties to set - * @returns ImageManifest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IImageManifest): google.devtools.artifactregistry.v1.ImageManifest; - - /** - * Encodes the specified ImageManifest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImageManifest.verify|verify} messages. - * @param message ImageManifest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IImageManifest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImageManifest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImageManifest.verify|verify} messages. - * @param message ImageManifest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImageManifest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImageManifest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImageManifest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImageManifest; - - /** - * Decodes an ImageManifest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImageManifest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImageManifest; - - /** - * Verifies an ImageManifest 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 ImageManifest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImageManifest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImageManifest; - - /** - * Creates a plain object from an ImageManifest message. Also converts values to other types if specified. - * @param message ImageManifest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ImageManifest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImageManifest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImageManifest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDockerImagesRequest. */ - interface IListDockerImagesRequest { - - /** ListDockerImagesRequest parent */ - parent?: (string|null); - - /** ListDockerImagesRequest pageSize */ - pageSize?: (number|null); - - /** ListDockerImagesRequest pageToken */ - pageToken?: (string|null); - - /** ListDockerImagesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListDockerImagesRequest. */ - class ListDockerImagesRequest implements IListDockerImagesRequest { - - /** - * Constructs a new ListDockerImagesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListDockerImagesRequest); - - /** ListDockerImagesRequest parent. */ - public parent: string; - - /** ListDockerImagesRequest pageSize. */ - public pageSize: number; - - /** ListDockerImagesRequest pageToken. */ - public pageToken: string; - - /** ListDockerImagesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListDockerImagesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDockerImagesRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListDockerImagesRequest): google.devtools.artifactregistry.v1.ListDockerImagesRequest; - - /** - * Encodes the specified ListDockerImagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. - * @param message ListDockerImagesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListDockerImagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDockerImagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. - * @param message ListDockerImagesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListDockerImagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDockerImagesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDockerImagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListDockerImagesRequest; - - /** - * Decodes a ListDockerImagesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDockerImagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListDockerImagesRequest; - - /** - * Verifies a ListDockerImagesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDockerImagesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDockerImagesRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListDockerImagesRequest; - - /** - * Creates a plain object from a ListDockerImagesRequest message. Also converts values to other types if specified. - * @param message ListDockerImagesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListDockerImagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDockerImagesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDockerImagesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDockerImagesResponse. */ - interface IListDockerImagesResponse { - - /** ListDockerImagesResponse dockerImages */ - dockerImages?: (google.devtools.artifactregistry.v1.IDockerImage[]|null); - - /** ListDockerImagesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListDockerImagesResponse. */ - class ListDockerImagesResponse implements IListDockerImagesResponse { - - /** - * Constructs a new ListDockerImagesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListDockerImagesResponse); - - /** ListDockerImagesResponse dockerImages. */ - public dockerImages: google.devtools.artifactregistry.v1.IDockerImage[]; - - /** ListDockerImagesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListDockerImagesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDockerImagesResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListDockerImagesResponse): google.devtools.artifactregistry.v1.ListDockerImagesResponse; - - /** - * Encodes the specified ListDockerImagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. - * @param message ListDockerImagesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListDockerImagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDockerImagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. - * @param message ListDockerImagesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListDockerImagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDockerImagesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDockerImagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListDockerImagesResponse; - - /** - * Decodes a ListDockerImagesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDockerImagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListDockerImagesResponse; - - /** - * Verifies a ListDockerImagesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDockerImagesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDockerImagesResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListDockerImagesResponse; - - /** - * Creates a plain object from a ListDockerImagesResponse message. Also converts values to other types if specified. - * @param message ListDockerImagesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListDockerImagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDockerImagesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDockerImagesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetDockerImageRequest. */ - interface IGetDockerImageRequest { - - /** GetDockerImageRequest name */ - name?: (string|null); - } - - /** Represents a GetDockerImageRequest. */ - class GetDockerImageRequest implements IGetDockerImageRequest { - - /** - * Constructs a new GetDockerImageRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGetDockerImageRequest); - - /** GetDockerImageRequest name. */ - public name: string; - - /** - * Creates a new GetDockerImageRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetDockerImageRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGetDockerImageRequest): google.devtools.artifactregistry.v1.GetDockerImageRequest; - - /** - * Encodes the specified GetDockerImageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetDockerImageRequest.verify|verify} messages. - * @param message GetDockerImageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGetDockerImageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetDockerImageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetDockerImageRequest.verify|verify} messages. - * @param message GetDockerImageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetDockerImageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetDockerImageRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetDockerImageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetDockerImageRequest; - - /** - * Decodes a GetDockerImageRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetDockerImageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetDockerImageRequest; - - /** - * Verifies a GetDockerImageRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetDockerImageRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDockerImageRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetDockerImageRequest; - - /** - * Creates a plain object from a GetDockerImageRequest message. Also converts values to other types if specified. - * @param message GetDockerImageRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GetDockerImageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetDockerImageRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetDockerImageRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MavenArtifact. */ - interface IMavenArtifact { - - /** MavenArtifact name */ - name?: (string|null); - - /** MavenArtifact pomUri */ - pomUri?: (string|null); - - /** MavenArtifact groupId */ - groupId?: (string|null); - - /** MavenArtifact artifactId */ - artifactId?: (string|null); - - /** MavenArtifact version */ - version?: (string|null); - - /** MavenArtifact createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** MavenArtifact updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a MavenArtifact. */ - class MavenArtifact implements IMavenArtifact { - - /** - * Constructs a new MavenArtifact. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IMavenArtifact); - - /** MavenArtifact name. */ - public name: string; - - /** MavenArtifact pomUri. */ - public pomUri: string; - - /** MavenArtifact groupId. */ - public groupId: string; - - /** MavenArtifact artifactId. */ - public artifactId: string; - - /** MavenArtifact version. */ - public version: string; - - /** MavenArtifact createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** MavenArtifact updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new MavenArtifact instance using the specified properties. - * @param [properties] Properties to set - * @returns MavenArtifact instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IMavenArtifact): google.devtools.artifactregistry.v1.MavenArtifact; - - /** - * Encodes the specified MavenArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.MavenArtifact.verify|verify} messages. - * @param message MavenArtifact message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IMavenArtifact, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MavenArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.MavenArtifact.verify|verify} messages. - * @param message MavenArtifact message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IMavenArtifact, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MavenArtifact message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MavenArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.MavenArtifact; - - /** - * Decodes a MavenArtifact message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MavenArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.MavenArtifact; - - /** - * Verifies a MavenArtifact 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 MavenArtifact message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MavenArtifact - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.MavenArtifact; - - /** - * Creates a plain object from a MavenArtifact message. Also converts values to other types if specified. - * @param message MavenArtifact - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.MavenArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MavenArtifact to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MavenArtifact - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListMavenArtifactsRequest. */ - interface IListMavenArtifactsRequest { - - /** ListMavenArtifactsRequest parent */ - parent?: (string|null); - - /** ListMavenArtifactsRequest pageSize */ - pageSize?: (number|null); - - /** ListMavenArtifactsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListMavenArtifactsRequest. */ - class ListMavenArtifactsRequest implements IListMavenArtifactsRequest { - - /** - * Constructs a new ListMavenArtifactsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListMavenArtifactsRequest); - - /** ListMavenArtifactsRequest parent. */ - public parent: string; - - /** ListMavenArtifactsRequest pageSize. */ - public pageSize: number; - - /** ListMavenArtifactsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListMavenArtifactsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMavenArtifactsRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListMavenArtifactsRequest): google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; - - /** - * Encodes the specified ListMavenArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.verify|verify} messages. - * @param message ListMavenArtifactsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMavenArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.verify|verify} messages. - * @param message ListMavenArtifactsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMavenArtifactsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMavenArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; - - /** - * Decodes a ListMavenArtifactsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMavenArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; - - /** - * Verifies a ListMavenArtifactsRequest 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 ListMavenArtifactsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMavenArtifactsRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListMavenArtifactsRequest; - - /** - * Creates a plain object from a ListMavenArtifactsRequest message. Also converts values to other types if specified. - * @param message ListMavenArtifactsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListMavenArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMavenArtifactsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListMavenArtifactsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListMavenArtifactsResponse. */ - interface IListMavenArtifactsResponse { - - /** ListMavenArtifactsResponse mavenArtifacts */ - mavenArtifacts?: (google.devtools.artifactregistry.v1.IMavenArtifact[]|null); - - /** ListMavenArtifactsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListMavenArtifactsResponse. */ - class ListMavenArtifactsResponse implements IListMavenArtifactsResponse { - - /** - * Constructs a new ListMavenArtifactsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListMavenArtifactsResponse); - - /** ListMavenArtifactsResponse mavenArtifacts. */ - public mavenArtifacts: google.devtools.artifactregistry.v1.IMavenArtifact[]; - - /** ListMavenArtifactsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListMavenArtifactsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMavenArtifactsResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListMavenArtifactsResponse): google.devtools.artifactregistry.v1.ListMavenArtifactsResponse; - - /** - * Encodes the specified ListMavenArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.verify|verify} messages. - * @param message ListMavenArtifactsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListMavenArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMavenArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.verify|verify} messages. - * @param message ListMavenArtifactsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListMavenArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMavenArtifactsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMavenArtifactsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListMavenArtifactsResponse; - - /** - * Decodes a ListMavenArtifactsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMavenArtifactsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListMavenArtifactsResponse; - - /** - * Verifies a ListMavenArtifactsResponse 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 ListMavenArtifactsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMavenArtifactsResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListMavenArtifactsResponse; - - /** - * Creates a plain object from a ListMavenArtifactsResponse message. Also converts values to other types if specified. - * @param message ListMavenArtifactsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListMavenArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMavenArtifactsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListMavenArtifactsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetMavenArtifactRequest. */ - interface IGetMavenArtifactRequest { - - /** GetMavenArtifactRequest name */ - name?: (string|null); - } - - /** Represents a GetMavenArtifactRequest. */ - class GetMavenArtifactRequest implements IGetMavenArtifactRequest { - - /** - * Constructs a new GetMavenArtifactRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGetMavenArtifactRequest); - - /** GetMavenArtifactRequest name. */ - public name: string; - - /** - * Creates a new GetMavenArtifactRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetMavenArtifactRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGetMavenArtifactRequest): google.devtools.artifactregistry.v1.GetMavenArtifactRequest; - - /** - * Encodes the specified GetMavenArtifactRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetMavenArtifactRequest.verify|verify} messages. - * @param message GetMavenArtifactRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGetMavenArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetMavenArtifactRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetMavenArtifactRequest.verify|verify} messages. - * @param message GetMavenArtifactRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetMavenArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetMavenArtifactRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetMavenArtifactRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetMavenArtifactRequest; - - /** - * Decodes a GetMavenArtifactRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetMavenArtifactRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetMavenArtifactRequest; - - /** - * Verifies a GetMavenArtifactRequest 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 GetMavenArtifactRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetMavenArtifactRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetMavenArtifactRequest; - - /** - * Creates a plain object from a GetMavenArtifactRequest message. Also converts values to other types if specified. - * @param message GetMavenArtifactRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GetMavenArtifactRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetMavenArtifactRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetMavenArtifactRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NpmPackage. */ - interface INpmPackage { - - /** NpmPackage name */ - name?: (string|null); - - /** NpmPackage packageName */ - packageName?: (string|null); - - /** NpmPackage version */ - version?: (string|null); - - /** NpmPackage tags */ - tags?: (string[]|null); - - /** NpmPackage createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** NpmPackage updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a NpmPackage. */ - class NpmPackage implements INpmPackage { - - /** - * Constructs a new NpmPackage. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.INpmPackage); - - /** NpmPackage name. */ - public name: string; - - /** NpmPackage packageName. */ - public packageName: string; - - /** NpmPackage version. */ - public version: string; - - /** NpmPackage tags. */ - public tags: string[]; - - /** NpmPackage createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** NpmPackage updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new NpmPackage instance using the specified properties. - * @param [properties] Properties to set - * @returns NpmPackage instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.INpmPackage): google.devtools.artifactregistry.v1.NpmPackage; - - /** - * Encodes the specified NpmPackage message. Does not implicitly {@link google.devtools.artifactregistry.v1.NpmPackage.verify|verify} messages. - * @param message NpmPackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.INpmPackage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NpmPackage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.NpmPackage.verify|verify} messages. - * @param message NpmPackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.INpmPackage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NpmPackage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NpmPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.NpmPackage; - - /** - * Decodes a NpmPackage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NpmPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.NpmPackage; - - /** - * Verifies a NpmPackage 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 NpmPackage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NpmPackage - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.NpmPackage; - - /** - * Creates a plain object from a NpmPackage message. Also converts values to other types if specified. - * @param message NpmPackage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.NpmPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NpmPackage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NpmPackage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListNpmPackagesRequest. */ - interface IListNpmPackagesRequest { - - /** ListNpmPackagesRequest parent */ - parent?: (string|null); - - /** ListNpmPackagesRequest pageSize */ - pageSize?: (number|null); - - /** ListNpmPackagesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListNpmPackagesRequest. */ - class ListNpmPackagesRequest implements IListNpmPackagesRequest { - - /** - * Constructs a new ListNpmPackagesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListNpmPackagesRequest); - - /** ListNpmPackagesRequest parent. */ - public parent: string; - - /** ListNpmPackagesRequest pageSize. */ - public pageSize: number; - - /** ListNpmPackagesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListNpmPackagesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNpmPackagesRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListNpmPackagesRequest): google.devtools.artifactregistry.v1.ListNpmPackagesRequest; - - /** - * Encodes the specified ListNpmPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesRequest.verify|verify} messages. - * @param message ListNpmPackagesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListNpmPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListNpmPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesRequest.verify|verify} messages. - * @param message ListNpmPackagesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListNpmPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListNpmPackagesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListNpmPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListNpmPackagesRequest; - - /** - * Decodes a ListNpmPackagesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNpmPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListNpmPackagesRequest; - - /** - * Verifies a ListNpmPackagesRequest 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 ListNpmPackagesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListNpmPackagesRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListNpmPackagesRequest; - - /** - * Creates a plain object from a ListNpmPackagesRequest message. Also converts values to other types if specified. - * @param message ListNpmPackagesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListNpmPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListNpmPackagesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListNpmPackagesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListNpmPackagesResponse. */ - interface IListNpmPackagesResponse { - - /** ListNpmPackagesResponse npmPackages */ - npmPackages?: (google.devtools.artifactregistry.v1.INpmPackage[]|null); - - /** ListNpmPackagesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListNpmPackagesResponse. */ - class ListNpmPackagesResponse implements IListNpmPackagesResponse { - - /** - * Constructs a new ListNpmPackagesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListNpmPackagesResponse); - - /** ListNpmPackagesResponse npmPackages. */ - public npmPackages: google.devtools.artifactregistry.v1.INpmPackage[]; - - /** ListNpmPackagesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListNpmPackagesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNpmPackagesResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListNpmPackagesResponse): google.devtools.artifactregistry.v1.ListNpmPackagesResponse; - - /** - * Encodes the specified ListNpmPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesResponse.verify|verify} messages. - * @param message ListNpmPackagesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListNpmPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListNpmPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesResponse.verify|verify} messages. - * @param message ListNpmPackagesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListNpmPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListNpmPackagesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListNpmPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListNpmPackagesResponse; - - /** - * Decodes a ListNpmPackagesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNpmPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListNpmPackagesResponse; - - /** - * Verifies a ListNpmPackagesResponse 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 ListNpmPackagesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListNpmPackagesResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListNpmPackagesResponse; - - /** - * Creates a plain object from a ListNpmPackagesResponse message. Also converts values to other types if specified. - * @param message ListNpmPackagesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListNpmPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListNpmPackagesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListNpmPackagesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNpmPackageRequest. */ - interface IGetNpmPackageRequest { - - /** GetNpmPackageRequest name */ - name?: (string|null); - } - - /** Represents a GetNpmPackageRequest. */ - class GetNpmPackageRequest implements IGetNpmPackageRequest { - - /** - * Constructs a new GetNpmPackageRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGetNpmPackageRequest); - - /** GetNpmPackageRequest name. */ - public name: string; - - /** - * Creates a new GetNpmPackageRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNpmPackageRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGetNpmPackageRequest): google.devtools.artifactregistry.v1.GetNpmPackageRequest; - - /** - * Encodes the specified GetNpmPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetNpmPackageRequest.verify|verify} messages. - * @param message GetNpmPackageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGetNpmPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNpmPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetNpmPackageRequest.verify|verify} messages. - * @param message GetNpmPackageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetNpmPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNpmPackageRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNpmPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetNpmPackageRequest; - - /** - * Decodes a GetNpmPackageRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNpmPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetNpmPackageRequest; - - /** - * Verifies a GetNpmPackageRequest 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 GetNpmPackageRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNpmPackageRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetNpmPackageRequest; - - /** - * Creates a plain object from a GetNpmPackageRequest message. Also converts values to other types if specified. - * @param message GetNpmPackageRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GetNpmPackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNpmPackageRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNpmPackageRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonPackage. */ - interface IPythonPackage { - - /** PythonPackage name */ - name?: (string|null); - - /** PythonPackage uri */ - uri?: (string|null); - - /** PythonPackage packageName */ - packageName?: (string|null); - - /** PythonPackage version */ - version?: (string|null); - - /** PythonPackage createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** PythonPackage updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a PythonPackage. */ - class PythonPackage implements IPythonPackage { - - /** - * Constructs a new PythonPackage. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IPythonPackage); - - /** PythonPackage name. */ - public name: string; - - /** PythonPackage uri. */ - public uri: string; - - /** PythonPackage packageName. */ - public packageName: string; - - /** PythonPackage version. */ - public version: string; - - /** PythonPackage createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** PythonPackage updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new PythonPackage instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonPackage instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IPythonPackage): google.devtools.artifactregistry.v1.PythonPackage; - - /** - * Encodes the specified PythonPackage message. Does not implicitly {@link google.devtools.artifactregistry.v1.PythonPackage.verify|verify} messages. - * @param message PythonPackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IPythonPackage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonPackage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.PythonPackage.verify|verify} messages. - * @param message PythonPackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IPythonPackage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonPackage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.PythonPackage; - - /** - * Decodes a PythonPackage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.PythonPackage; - - /** - * Verifies a PythonPackage 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 PythonPackage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonPackage - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.PythonPackage; - - /** - * Creates a plain object from a PythonPackage message. Also converts values to other types if specified. - * @param message PythonPackage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.PythonPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonPackage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonPackage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPythonPackagesRequest. */ - interface IListPythonPackagesRequest { - - /** ListPythonPackagesRequest parent */ - parent?: (string|null); - - /** ListPythonPackagesRequest pageSize */ - pageSize?: (number|null); - - /** ListPythonPackagesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListPythonPackagesRequest. */ - class ListPythonPackagesRequest implements IListPythonPackagesRequest { - - /** - * Constructs a new ListPythonPackagesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListPythonPackagesRequest); - - /** ListPythonPackagesRequest parent. */ - public parent: string; - - /** ListPythonPackagesRequest pageSize. */ - public pageSize: number; - - /** ListPythonPackagesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListPythonPackagesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPythonPackagesRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListPythonPackagesRequest): google.devtools.artifactregistry.v1.ListPythonPackagesRequest; - - /** - * Encodes the specified ListPythonPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesRequest.verify|verify} messages. - * @param message ListPythonPackagesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListPythonPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPythonPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesRequest.verify|verify} messages. - * @param message ListPythonPackagesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListPythonPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPythonPackagesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPythonPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListPythonPackagesRequest; - - /** - * Decodes a ListPythonPackagesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPythonPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListPythonPackagesRequest; - - /** - * Verifies a ListPythonPackagesRequest 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 ListPythonPackagesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPythonPackagesRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListPythonPackagesRequest; - - /** - * Creates a plain object from a ListPythonPackagesRequest message. Also converts values to other types if specified. - * @param message ListPythonPackagesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListPythonPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPythonPackagesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPythonPackagesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPythonPackagesResponse. */ - interface IListPythonPackagesResponse { - - /** ListPythonPackagesResponse pythonPackages */ - pythonPackages?: (google.devtools.artifactregistry.v1.IPythonPackage[]|null); - - /** ListPythonPackagesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListPythonPackagesResponse. */ - class ListPythonPackagesResponse implements IListPythonPackagesResponse { - - /** - * Constructs a new ListPythonPackagesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListPythonPackagesResponse); - - /** ListPythonPackagesResponse pythonPackages. */ - public pythonPackages: google.devtools.artifactregistry.v1.IPythonPackage[]; - - /** ListPythonPackagesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListPythonPackagesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPythonPackagesResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListPythonPackagesResponse): google.devtools.artifactregistry.v1.ListPythonPackagesResponse; - - /** - * Encodes the specified ListPythonPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesResponse.verify|verify} messages. - * @param message ListPythonPackagesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListPythonPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPythonPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesResponse.verify|verify} messages. - * @param message ListPythonPackagesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListPythonPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPythonPackagesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPythonPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListPythonPackagesResponse; - - /** - * Decodes a ListPythonPackagesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPythonPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListPythonPackagesResponse; - - /** - * Verifies a ListPythonPackagesResponse 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 ListPythonPackagesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPythonPackagesResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListPythonPackagesResponse; - - /** - * Creates a plain object from a ListPythonPackagesResponse message. Also converts values to other types if specified. - * @param message ListPythonPackagesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListPythonPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPythonPackagesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPythonPackagesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPythonPackageRequest. */ - interface IGetPythonPackageRequest { - - /** GetPythonPackageRequest name */ - name?: (string|null); - } - - /** Represents a GetPythonPackageRequest. */ - class GetPythonPackageRequest implements IGetPythonPackageRequest { - - /** - * Constructs a new GetPythonPackageRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGetPythonPackageRequest); - - /** GetPythonPackageRequest name. */ - public name: string; - - /** - * Creates a new GetPythonPackageRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPythonPackageRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGetPythonPackageRequest): google.devtools.artifactregistry.v1.GetPythonPackageRequest; - - /** - * Encodes the specified GetPythonPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPythonPackageRequest.verify|verify} messages. - * @param message GetPythonPackageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGetPythonPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPythonPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPythonPackageRequest.verify|verify} messages. - * @param message GetPythonPackageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetPythonPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPythonPackageRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPythonPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetPythonPackageRequest; - - /** - * Decodes a GetPythonPackageRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPythonPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetPythonPackageRequest; - - /** - * Verifies a GetPythonPackageRequest 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 GetPythonPackageRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPythonPackageRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetPythonPackageRequest; - - /** - * Creates a plain object from a GetPythonPackageRequest message. Also converts values to other types if specified. - * @param message GetPythonPackageRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GetPythonPackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPythonPackageRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPythonPackageRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Attachment. */ - interface IAttachment { - - /** Attachment name */ - name?: (string|null); - - /** Attachment target */ - target?: (string|null); - - /** Attachment type */ - type?: (string|null); - - /** Attachment attachmentNamespace */ - attachmentNamespace?: (string|null); - - /** Attachment annotations */ - annotations?: ({ [k: string]: string }|null); - - /** Attachment createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Attachment updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Attachment files */ - files?: (string[]|null); - - /** Attachment ociVersionName */ - ociVersionName?: (string|null); - } - - /** Represents an Attachment. */ - class Attachment implements IAttachment { - - /** - * Constructs a new Attachment. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IAttachment); - - /** Attachment name. */ - public name: string; - - /** Attachment target. */ - public target: string; - - /** Attachment type. */ - public type: string; - - /** Attachment attachmentNamespace. */ - public attachmentNamespace: string; - - /** Attachment annotations. */ - public annotations: { [k: string]: string }; - - /** Attachment createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Attachment updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Attachment files. */ - public files: string[]; - - /** Attachment ociVersionName. */ - public ociVersionName: string; - - /** - * Creates a new Attachment instance using the specified properties. - * @param [properties] Properties to set - * @returns Attachment instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IAttachment): google.devtools.artifactregistry.v1.Attachment; - - /** - * Encodes the specified Attachment message. Does not implicitly {@link google.devtools.artifactregistry.v1.Attachment.verify|verify} messages. - * @param message Attachment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IAttachment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Attachment message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Attachment.verify|verify} messages. - * @param message Attachment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IAttachment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Attachment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Attachment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Attachment; - - /** - * Decodes an Attachment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Attachment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Attachment; - - /** - * Verifies an Attachment 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 Attachment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Attachment - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Attachment; - - /** - * Creates a plain object from an Attachment message. Also converts values to other types if specified. - * @param message Attachment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.Attachment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Attachment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Attachment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListAttachmentsRequest. */ - interface IListAttachmentsRequest { - - /** ListAttachmentsRequest parent */ - parent?: (string|null); - - /** ListAttachmentsRequest filter */ - filter?: (string|null); - - /** ListAttachmentsRequest pageSize */ - pageSize?: (number|null); - - /** ListAttachmentsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListAttachmentsRequest. */ - class ListAttachmentsRequest implements IListAttachmentsRequest { - - /** - * Constructs a new ListAttachmentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListAttachmentsRequest); - - /** ListAttachmentsRequest parent. */ - public parent: string; - - /** ListAttachmentsRequest filter. */ - public filter: string; - - /** ListAttachmentsRequest pageSize. */ - public pageSize: number; - - /** ListAttachmentsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListAttachmentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAttachmentsRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListAttachmentsRequest): google.devtools.artifactregistry.v1.ListAttachmentsRequest; - - /** - * Encodes the specified ListAttachmentsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsRequest.verify|verify} messages. - * @param message ListAttachmentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListAttachmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListAttachmentsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsRequest.verify|verify} messages. - * @param message ListAttachmentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListAttachmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListAttachmentsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAttachmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListAttachmentsRequest; - - /** - * Decodes a ListAttachmentsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAttachmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListAttachmentsRequest; - - /** - * Verifies a ListAttachmentsRequest 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 ListAttachmentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAttachmentsRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListAttachmentsRequest; - - /** - * Creates a plain object from a ListAttachmentsRequest message. Also converts values to other types if specified. - * @param message ListAttachmentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListAttachmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListAttachmentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListAttachmentsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListAttachmentsResponse. */ - interface IListAttachmentsResponse { - - /** ListAttachmentsResponse attachments */ - attachments?: (google.devtools.artifactregistry.v1.IAttachment[]|null); - - /** ListAttachmentsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListAttachmentsResponse. */ - class ListAttachmentsResponse implements IListAttachmentsResponse { - - /** - * Constructs a new ListAttachmentsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListAttachmentsResponse); - - /** ListAttachmentsResponse attachments. */ - public attachments: google.devtools.artifactregistry.v1.IAttachment[]; - - /** ListAttachmentsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListAttachmentsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAttachmentsResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListAttachmentsResponse): google.devtools.artifactregistry.v1.ListAttachmentsResponse; - - /** - * Encodes the specified ListAttachmentsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsResponse.verify|verify} messages. - * @param message ListAttachmentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListAttachmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListAttachmentsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsResponse.verify|verify} messages. - * @param message ListAttachmentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListAttachmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListAttachmentsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAttachmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListAttachmentsResponse; - - /** - * Decodes a ListAttachmentsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAttachmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListAttachmentsResponse; - - /** - * Verifies a ListAttachmentsResponse 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 ListAttachmentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAttachmentsResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListAttachmentsResponse; - - /** - * Creates a plain object from a ListAttachmentsResponse message. Also converts values to other types if specified. - * @param message ListAttachmentsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListAttachmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListAttachmentsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListAttachmentsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetAttachmentRequest. */ - interface IGetAttachmentRequest { - - /** GetAttachmentRequest name */ - name?: (string|null); - } - - /** Represents a GetAttachmentRequest. */ - class GetAttachmentRequest implements IGetAttachmentRequest { - - /** - * Constructs a new GetAttachmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGetAttachmentRequest); - - /** GetAttachmentRequest name. */ - public name: string; - - /** - * Creates a new GetAttachmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetAttachmentRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGetAttachmentRequest): google.devtools.artifactregistry.v1.GetAttachmentRequest; - - /** - * Encodes the specified GetAttachmentRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetAttachmentRequest.verify|verify} messages. - * @param message GetAttachmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGetAttachmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetAttachmentRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetAttachmentRequest.verify|verify} messages. - * @param message GetAttachmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetAttachmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetAttachmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetAttachmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetAttachmentRequest; - - /** - * Decodes a GetAttachmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetAttachmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetAttachmentRequest; - - /** - * Verifies a GetAttachmentRequest 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 GetAttachmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetAttachmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetAttachmentRequest; - - /** - * Creates a plain object from a GetAttachmentRequest message. Also converts values to other types if specified. - * @param message GetAttachmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GetAttachmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetAttachmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetAttachmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateAttachmentRequest. */ - interface ICreateAttachmentRequest { - - /** CreateAttachmentRequest parent */ - parent?: (string|null); - - /** CreateAttachmentRequest attachmentId */ - attachmentId?: (string|null); - - /** CreateAttachmentRequest attachment */ - attachment?: (google.devtools.artifactregistry.v1.IAttachment|null); - } - - /** Represents a CreateAttachmentRequest. */ - class CreateAttachmentRequest implements ICreateAttachmentRequest { - - /** - * Constructs a new CreateAttachmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.ICreateAttachmentRequest); - - /** CreateAttachmentRequest parent. */ - public parent: string; - - /** CreateAttachmentRequest attachmentId. */ - public attachmentId: string; - - /** CreateAttachmentRequest attachment. */ - public attachment?: (google.devtools.artifactregistry.v1.IAttachment|null); - - /** - * Creates a new CreateAttachmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateAttachmentRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.ICreateAttachmentRequest): google.devtools.artifactregistry.v1.CreateAttachmentRequest; - - /** - * Encodes the specified CreateAttachmentRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateAttachmentRequest.verify|verify} messages. - * @param message CreateAttachmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.ICreateAttachmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateAttachmentRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateAttachmentRequest.verify|verify} messages. - * @param message CreateAttachmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICreateAttachmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateAttachmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateAttachmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.CreateAttachmentRequest; - - /** - * Decodes a CreateAttachmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateAttachmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.CreateAttachmentRequest; - - /** - * Verifies a CreateAttachmentRequest 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 CreateAttachmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateAttachmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CreateAttachmentRequest; - - /** - * Creates a plain object from a CreateAttachmentRequest message. Also converts values to other types if specified. - * @param message CreateAttachmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.CreateAttachmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateAttachmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateAttachmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteAttachmentRequest. */ - interface IDeleteAttachmentRequest { - - /** DeleteAttachmentRequest name */ - name?: (string|null); - } - - /** Represents a DeleteAttachmentRequest. */ - class DeleteAttachmentRequest implements IDeleteAttachmentRequest { - - /** - * Constructs a new DeleteAttachmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IDeleteAttachmentRequest); - - /** DeleteAttachmentRequest name. */ - public name: string; - - /** - * Creates a new DeleteAttachmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteAttachmentRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IDeleteAttachmentRequest): google.devtools.artifactregistry.v1.DeleteAttachmentRequest; - - /** - * Encodes the specified DeleteAttachmentRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteAttachmentRequest.verify|verify} messages. - * @param message DeleteAttachmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IDeleteAttachmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteAttachmentRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteAttachmentRequest.verify|verify} messages. - * @param message DeleteAttachmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteAttachmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteAttachmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteAttachmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DeleteAttachmentRequest; - - /** - * Decodes a DeleteAttachmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteAttachmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DeleteAttachmentRequest; - - /** - * Verifies a DeleteAttachmentRequest 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 DeleteAttachmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteAttachmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteAttachmentRequest; - - /** - * Creates a plain object from a DeleteAttachmentRequest message. Also converts values to other types if specified. - * @param message DeleteAttachmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.DeleteAttachmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteAttachmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteAttachmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExportArtifactRequest. */ - interface IExportArtifactRequest { - - /** ExportArtifactRequest sourceVersion */ - sourceVersion?: (string|null); - - /** ExportArtifactRequest sourceTag */ - sourceTag?: (string|null); - - /** ExportArtifactRequest gcsPath */ - gcsPath?: (string|null); - - /** ExportArtifactRequest repository */ - repository?: (string|null); - } - - /** Represents an ExportArtifactRequest. */ - class ExportArtifactRequest implements IExportArtifactRequest { - - /** - * Constructs a new ExportArtifactRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IExportArtifactRequest); - - /** ExportArtifactRequest sourceVersion. */ - public sourceVersion?: (string|null); - - /** ExportArtifactRequest sourceTag. */ - public sourceTag?: (string|null); - - /** ExportArtifactRequest gcsPath. */ - public gcsPath?: (string|null); - - /** ExportArtifactRequest repository. */ - public repository: string; - - /** ExportArtifactRequest sourceArtifact. */ - public sourceArtifact?: ("sourceVersion"|"sourceTag"); - - /** ExportArtifactRequest destination. */ - public destination?: "gcsPath"; - - /** - * Creates a new ExportArtifactRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportArtifactRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IExportArtifactRequest): google.devtools.artifactregistry.v1.ExportArtifactRequest; - - /** - * Encodes the specified ExportArtifactRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactRequest.verify|verify} messages. - * @param message ExportArtifactRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IExportArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportArtifactRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactRequest.verify|verify} messages. - * @param message ExportArtifactRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IExportArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportArtifactRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportArtifactRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ExportArtifactRequest; - - /** - * Decodes an ExportArtifactRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportArtifactRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ExportArtifactRequest; - - /** - * Verifies an ExportArtifactRequest 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 ExportArtifactRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportArtifactRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ExportArtifactRequest; - - /** - * Creates a plain object from an ExportArtifactRequest message. Also converts values to other types if specified. - * @param message ExportArtifactRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ExportArtifactRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportArtifactRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportArtifactRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExportArtifactResponse. */ - interface IExportArtifactResponse { - - /** ExportArtifactResponse exportedVersion */ - exportedVersion?: (google.devtools.artifactregistry.v1.IVersion|null); - } - - /** Represents an ExportArtifactResponse. */ - class ExportArtifactResponse implements IExportArtifactResponse { - - /** - * Constructs a new ExportArtifactResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IExportArtifactResponse); - - /** ExportArtifactResponse exportedVersion. */ - public exportedVersion?: (google.devtools.artifactregistry.v1.IVersion|null); - - /** - * Creates a new ExportArtifactResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportArtifactResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IExportArtifactResponse): google.devtools.artifactregistry.v1.ExportArtifactResponse; - - /** - * Encodes the specified ExportArtifactResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactResponse.verify|verify} messages. - * @param message ExportArtifactResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IExportArtifactResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportArtifactResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactResponse.verify|verify} messages. - * @param message ExportArtifactResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IExportArtifactResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportArtifactResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportArtifactResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ExportArtifactResponse; - - /** - * Decodes an ExportArtifactResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportArtifactResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ExportArtifactResponse; - - /** - * Verifies an ExportArtifactResponse 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 ExportArtifactResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportArtifactResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ExportArtifactResponse; - - /** - * Creates a plain object from an ExportArtifactResponse message. Also converts values to other types if specified. - * @param message ExportArtifactResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ExportArtifactResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportArtifactResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportArtifactResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExportArtifactMetadata. */ - interface IExportArtifactMetadata { - - /** ExportArtifactMetadata exportedFiles */ - exportedFiles?: (google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile[]|null); - } - - /** Represents an ExportArtifactMetadata. */ - class ExportArtifactMetadata implements IExportArtifactMetadata { - - /** - * Constructs a new ExportArtifactMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IExportArtifactMetadata); - - /** ExportArtifactMetadata exportedFiles. */ - public exportedFiles: google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile[]; - - /** - * Creates a new ExportArtifactMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportArtifactMetadata instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IExportArtifactMetadata): google.devtools.artifactregistry.v1.ExportArtifactMetadata; - - /** - * Encodes the specified ExportArtifactMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.verify|verify} messages. - * @param message ExportArtifactMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IExportArtifactMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportArtifactMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.verify|verify} messages. - * @param message ExportArtifactMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IExportArtifactMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportArtifactMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportArtifactMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ExportArtifactMetadata; - - /** - * Decodes an ExportArtifactMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportArtifactMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ExportArtifactMetadata; - - /** - * Verifies an ExportArtifactMetadata 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 ExportArtifactMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportArtifactMetadata - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ExportArtifactMetadata; - - /** - * Creates a plain object from an ExportArtifactMetadata message. Also converts values to other types if specified. - * @param message ExportArtifactMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ExportArtifactMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportArtifactMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportArtifactMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExportArtifactMetadata { - - /** Properties of an ExportedFile. */ - interface IExportedFile { - - /** ExportedFile gcsObjectPath */ - gcsObjectPath?: (string|null); - - /** ExportedFile name */ - name?: (string|null); - - /** ExportedFile hashes */ - hashes?: (google.devtools.artifactregistry.v1.IHash[]|null); - } - - /** Represents an ExportedFile. */ - class ExportedFile implements IExportedFile { - - /** - * Constructs a new ExportedFile. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile); - - /** ExportedFile gcsObjectPath. */ - public gcsObjectPath?: (string|null); - - /** ExportedFile name. */ - public name: string; - - /** ExportedFile hashes. */ - public hashes: google.devtools.artifactregistry.v1.IHash[]; - - /** ExportedFile destination. */ - public destination?: "gcsObjectPath"; - - /** - * Creates a new ExportedFile instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportedFile instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile): google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile; - - /** - * Encodes the specified ExportedFile message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.verify|verify} messages. - * @param message ExportedFile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportedFile message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.verify|verify} messages. - * @param message ExportedFile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportedFile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportedFile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile; - - /** - * Decodes an ExportedFile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportedFile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile; - - /** - * Verifies an ExportedFile 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 ExportedFile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportedFile - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile; - - /** - * Creates a plain object from an ExportedFile message. Also converts values to other types if specified. - * @param message ExportedFile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportedFile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportedFile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a Hash. */ - interface IHash { - - /** Hash type */ - type?: (google.devtools.artifactregistry.v1.Hash.HashType|keyof typeof google.devtools.artifactregistry.v1.Hash.HashType|null); - - /** Hash value */ - value?: (Uint8Array|Buffer|string|null); - } - - /** Represents a Hash. */ - class Hash implements IHash { - - /** - * Constructs a new Hash. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IHash); - - /** Hash type. */ - public type: (google.devtools.artifactregistry.v1.Hash.HashType|keyof typeof google.devtools.artifactregistry.v1.Hash.HashType); - - /** Hash value. */ - public value: (Uint8Array|Buffer|string); - - /** - * Creates a new Hash instance using the specified properties. - * @param [properties] Properties to set - * @returns Hash instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IHash): google.devtools.artifactregistry.v1.Hash; - - /** - * Encodes the specified Hash message. Does not implicitly {@link google.devtools.artifactregistry.v1.Hash.verify|verify} messages. - * @param message Hash message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IHash, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Hash message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Hash.verify|verify} messages. - * @param message Hash message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IHash, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Hash message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Hash - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Hash; - - /** - * Decodes a Hash message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Hash - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Hash; - - /** - * Verifies a Hash message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Hash message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Hash - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Hash; - - /** - * Creates a plain object from a Hash message. Also converts values to other types if specified. - * @param message Hash - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.Hash, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Hash to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Hash - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Hash { - - /** HashType enum. */ - enum HashType { - HASH_TYPE_UNSPECIFIED = 0, - SHA256 = 1, - MD5 = 2 - } - } - - /** Properties of a File. */ - interface IFile { - - /** File name */ - name?: (string|null); - - /** File sizeBytes */ - sizeBytes?: (number|Long|string|null); - - /** File hashes */ - hashes?: (google.devtools.artifactregistry.v1.IHash[]|null); - - /** File createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** File updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** File owner */ - owner?: (string|null); - - /** File fetchTime */ - fetchTime?: (google.protobuf.ITimestamp|null); - - /** File annotations */ - annotations?: ({ [k: string]: string }|null); - } - - /** Represents a File. */ - class File implements IFile { - - /** - * Constructs a new File. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IFile); - - /** File name. */ - public name: string; - - /** File sizeBytes. */ - public sizeBytes: (number|Long|string); - - /** File hashes. */ - public hashes: google.devtools.artifactregistry.v1.IHash[]; - - /** File createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** File updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** File owner. */ - public owner: string; - - /** File fetchTime. */ - public fetchTime?: (google.protobuf.ITimestamp|null); - - /** File annotations. */ - public annotations: { [k: string]: string }; - - /** - * Creates a new File instance using the specified properties. - * @param [properties] Properties to set - * @returns File instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IFile): google.devtools.artifactregistry.v1.File; - - /** - * Encodes the specified File message. Does not implicitly {@link google.devtools.artifactregistry.v1.File.verify|verify} messages. - * @param message File message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IFile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified File message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.File.verify|verify} messages. - * @param message File message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IFile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a File message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns File - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.File; - - /** - * Decodes a File message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns File - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.File; - - /** - * Verifies a File message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a File message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns File - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.File; - - /** - * Creates a plain object from a File message. Also converts values to other types if specified. - * @param message File - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this File to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for File - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListFilesRequest. */ - interface IListFilesRequest { - - /** ListFilesRequest parent */ - parent?: (string|null); - - /** ListFilesRequest filter */ - filter?: (string|null); - - /** ListFilesRequest pageSize */ - pageSize?: (number|null); - - /** ListFilesRequest pageToken */ - pageToken?: (string|null); - - /** ListFilesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListFilesRequest. */ - class ListFilesRequest implements IListFilesRequest { - - /** - * Constructs a new ListFilesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListFilesRequest); - - /** ListFilesRequest parent. */ - public parent: string; - - /** ListFilesRequest filter. */ - public filter: string; - - /** ListFilesRequest pageSize. */ - public pageSize: number; - - /** ListFilesRequest pageToken. */ - public pageToken: string; - - /** ListFilesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListFilesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFilesRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListFilesRequest): google.devtools.artifactregistry.v1.ListFilesRequest; - - /** - * Encodes the specified ListFilesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesRequest.verify|verify} messages. - * @param message ListFilesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListFilesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesRequest.verify|verify} messages. - * @param message ListFilesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFilesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFilesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListFilesRequest; - - /** - * Decodes a ListFilesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFilesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListFilesRequest; - - /** - * Verifies a ListFilesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFilesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFilesRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListFilesRequest; - - /** - * Creates a plain object from a ListFilesRequest message. Also converts values to other types if specified. - * @param message ListFilesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListFilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFilesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListFilesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListFilesResponse. */ - interface IListFilesResponse { - - /** ListFilesResponse files */ - files?: (google.devtools.artifactregistry.v1.IFile[]|null); - - /** ListFilesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListFilesResponse. */ - class ListFilesResponse implements IListFilesResponse { - - /** - * Constructs a new ListFilesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListFilesResponse); - - /** ListFilesResponse files. */ - public files: google.devtools.artifactregistry.v1.IFile[]; - - /** ListFilesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListFilesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFilesResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListFilesResponse): google.devtools.artifactregistry.v1.ListFilesResponse; - - /** - * Encodes the specified ListFilesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesResponse.verify|verify} messages. - * @param message ListFilesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListFilesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesResponse.verify|verify} messages. - * @param message ListFilesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFilesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListFilesResponse; - - /** - * Decodes a ListFilesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListFilesResponse; - - /** - * Verifies a ListFilesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFilesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFilesResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListFilesResponse; - - /** - * Creates a plain object from a ListFilesResponse message. Also converts values to other types if specified. - * @param message ListFilesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListFilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFilesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListFilesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetFileRequest. */ - interface IGetFileRequest { - - /** GetFileRequest name */ - name?: (string|null); - } - - /** Represents a GetFileRequest. */ - class GetFileRequest implements IGetFileRequest { - - /** - * Constructs a new GetFileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGetFileRequest); - - /** GetFileRequest name. */ - public name: string; - - /** - * Creates a new GetFileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetFileRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGetFileRequest): google.devtools.artifactregistry.v1.GetFileRequest; - - /** - * Encodes the specified GetFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetFileRequest.verify|verify} messages. - * @param message GetFileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGetFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetFileRequest.verify|verify} messages. - * @param message GetFileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetFileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetFileRequest; - - /** - * Decodes a GetFileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetFileRequest; - - /** - * Verifies a GetFileRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetFileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetFileRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetFileRequest; - - /** - * Creates a plain object from a GetFileRequest message. Also converts values to other types if specified. - * @param message GetFileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GetFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetFileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetFileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteFileRequest. */ - interface IDeleteFileRequest { - - /** DeleteFileRequest name */ - name?: (string|null); - } - - /** Represents a DeleteFileRequest. */ - class DeleteFileRequest implements IDeleteFileRequest { - - /** - * Constructs a new DeleteFileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IDeleteFileRequest); - - /** DeleteFileRequest name. */ - public name: string; - - /** - * Creates a new DeleteFileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteFileRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IDeleteFileRequest): google.devtools.artifactregistry.v1.DeleteFileRequest; - - /** - * Encodes the specified DeleteFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteFileRequest.verify|verify} messages. - * @param message DeleteFileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IDeleteFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteFileRequest.verify|verify} messages. - * @param message DeleteFileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteFileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DeleteFileRequest; - - /** - * Decodes a DeleteFileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DeleteFileRequest; - - /** - * Verifies a DeleteFileRequest 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 DeleteFileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteFileRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteFileRequest; - - /** - * Creates a plain object from a DeleteFileRequest message. Also converts values to other types if specified. - * @param message DeleteFileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.DeleteFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteFileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteFileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFileRequest. */ - interface IUpdateFileRequest { - - /** UpdateFileRequest file */ - file?: (google.devtools.artifactregistry.v1.IFile|null); - - /** UpdateFileRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateFileRequest. */ - class UpdateFileRequest implements IUpdateFileRequest { - - /** - * Constructs a new UpdateFileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IUpdateFileRequest); - - /** UpdateFileRequest file. */ - public file?: (google.devtools.artifactregistry.v1.IFile|null); - - /** UpdateFileRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateFileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFileRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IUpdateFileRequest): google.devtools.artifactregistry.v1.UpdateFileRequest; - - /** - * Encodes the specified UpdateFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateFileRequest.verify|verify} messages. - * @param message UpdateFileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IUpdateFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateFileRequest.verify|verify} messages. - * @param message UpdateFileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateFileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdateFileRequest; - - /** - * Decodes an UpdateFileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdateFileRequest; - - /** - * Verifies an UpdateFileRequest 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 UpdateFileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFileRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateFileRequest; - - /** - * Creates a plain object from an UpdateFileRequest message. Also converts values to other types if specified. - * @param message UpdateFileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.UpdateFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateFileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VersionView enum. */ - enum VersionView { - VERSION_VIEW_UNSPECIFIED = 0, - BASIC = 1, - FULL = 2 - } - - /** Properties of a Version. */ - interface IVersion { - - /** Version name */ - name?: (string|null); - - /** Version description */ - description?: (string|null); - - /** Version createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Version updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Version relatedTags */ - relatedTags?: (google.devtools.artifactregistry.v1.ITag[]|null); - - /** Version metadata */ - metadata?: (google.protobuf.IStruct|null); - - /** Version annotations */ - annotations?: ({ [k: string]: string }|null); - - /** Version fingerprints */ - fingerprints?: (google.devtools.artifactregistry.v1.IHash[]|null); - } - - /** Represents a Version. */ - class Version implements IVersion { - - /** - * Constructs a new Version. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IVersion); - - /** Version name. */ - public name: string; - - /** Version description. */ - public description: string; - - /** Version createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Version updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Version relatedTags. */ - public relatedTags: google.devtools.artifactregistry.v1.ITag[]; - - /** Version metadata. */ - public metadata?: (google.protobuf.IStruct|null); - - /** Version annotations. */ - public annotations: { [k: string]: string }; - - /** Version fingerprints. */ - public fingerprints: google.devtools.artifactregistry.v1.IHash[]; - - /** - * Creates a new Version instance using the specified properties. - * @param [properties] Properties to set - * @returns Version instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IVersion): google.devtools.artifactregistry.v1.Version; - - /** - * Encodes the specified Version message. Does not implicitly {@link google.devtools.artifactregistry.v1.Version.verify|verify} messages. - * @param message Version message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Version.verify|verify} messages. - * @param message Version message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Version message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Version - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Version; - - /** - * Decodes a Version message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Version - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Version; - - /** - * Verifies a Version message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Version - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Version; - - /** - * Creates a plain object from a Version message. Also converts values to other types if specified. - * @param message Version - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Version to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Version - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListVersionsRequest. */ - interface IListVersionsRequest { - - /** ListVersionsRequest parent */ - parent?: (string|null); - - /** ListVersionsRequest pageSize */ - pageSize?: (number|null); - - /** ListVersionsRequest pageToken */ - pageToken?: (string|null); - - /** ListVersionsRequest view */ - view?: (google.devtools.artifactregistry.v1.VersionView|keyof typeof google.devtools.artifactregistry.v1.VersionView|null); - - /** ListVersionsRequest orderBy */ - orderBy?: (string|null); - - /** ListVersionsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListVersionsRequest. */ - class ListVersionsRequest implements IListVersionsRequest { - - /** - * Constructs a new ListVersionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListVersionsRequest); - - /** ListVersionsRequest parent. */ - public parent: string; - - /** ListVersionsRequest pageSize. */ - public pageSize: number; - - /** ListVersionsRequest pageToken. */ - public pageToken: string; - - /** ListVersionsRequest view. */ - public view: (google.devtools.artifactregistry.v1.VersionView|keyof typeof google.devtools.artifactregistry.v1.VersionView); - - /** ListVersionsRequest orderBy. */ - public orderBy: string; - - /** ListVersionsRequest filter. */ - public filter: string; - - /** - * Creates a new ListVersionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListVersionsRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListVersionsRequest): google.devtools.artifactregistry.v1.ListVersionsRequest; - - /** - * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsRequest.verify|verify} messages. - * @param message ListVersionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsRequest.verify|verify} messages. - * @param message ListVersionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListVersionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListVersionsRequest; - - /** - * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListVersionsRequest; - - /** - * Verifies a ListVersionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListVersionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListVersionsRequest; - - /** - * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. - * @param message ListVersionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListVersionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListVersionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListVersionsResponse. */ - interface IListVersionsResponse { - - /** ListVersionsResponse versions */ - versions?: (google.devtools.artifactregistry.v1.IVersion[]|null); - - /** ListVersionsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListVersionsResponse. */ - class ListVersionsResponse implements IListVersionsResponse { - - /** - * Constructs a new ListVersionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListVersionsResponse); - - /** ListVersionsResponse versions. */ - public versions: google.devtools.artifactregistry.v1.IVersion[]; - - /** ListVersionsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListVersionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListVersionsResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListVersionsResponse): google.devtools.artifactregistry.v1.ListVersionsResponse; - - /** - * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsResponse.verify|verify} messages. - * @param message ListVersionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsResponse.verify|verify} messages. - * @param message ListVersionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListVersionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListVersionsResponse; - - /** - * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListVersionsResponse; - - /** - * Verifies a ListVersionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListVersionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListVersionsResponse; - - /** - * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. - * @param message ListVersionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListVersionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListVersionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetVersionRequest. */ - interface IGetVersionRequest { - - /** GetVersionRequest name */ - name?: (string|null); - - /** GetVersionRequest view */ - view?: (google.devtools.artifactregistry.v1.VersionView|keyof typeof google.devtools.artifactregistry.v1.VersionView|null); - } - - /** Represents a GetVersionRequest. */ - class GetVersionRequest implements IGetVersionRequest { - - /** - * Constructs a new GetVersionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGetVersionRequest); - - /** GetVersionRequest name. */ - public name: string; - - /** GetVersionRequest view. */ - public view: (google.devtools.artifactregistry.v1.VersionView|keyof typeof google.devtools.artifactregistry.v1.VersionView); - - /** - * Creates a new GetVersionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetVersionRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGetVersionRequest): google.devtools.artifactregistry.v1.GetVersionRequest; - - /** - * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVersionRequest.verify|verify} messages. - * @param message GetVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVersionRequest.verify|verify} messages. - * @param message GetVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetVersionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetVersionRequest; - - /** - * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetVersionRequest; - - /** - * Verifies a GetVersionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetVersionRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetVersionRequest; - - /** - * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. - * @param message GetVersionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GetVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetVersionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetVersionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteVersionRequest. */ - interface IDeleteVersionRequest { - - /** DeleteVersionRequest name */ - name?: (string|null); - - /** DeleteVersionRequest force */ - force?: (boolean|null); - } - - /** Represents a DeleteVersionRequest. */ - class DeleteVersionRequest implements IDeleteVersionRequest { - - /** - * Constructs a new DeleteVersionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IDeleteVersionRequest); - - /** DeleteVersionRequest name. */ - public name: string; - - /** DeleteVersionRequest force. */ - public force: boolean; - - /** - * Creates a new DeleteVersionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteVersionRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IDeleteVersionRequest): google.devtools.artifactregistry.v1.DeleteVersionRequest; - - /** - * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteVersionRequest.verify|verify} messages. - * @param message DeleteVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteVersionRequest.verify|verify} messages. - * @param message DeleteVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DeleteVersionRequest; - - /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DeleteVersionRequest; - - /** - * Verifies a DeleteVersionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteVersionRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteVersionRequest; - - /** - * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. - * @param message DeleteVersionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.DeleteVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteVersionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteVersionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchDeleteVersionsRequest. */ - interface IBatchDeleteVersionsRequest { - - /** BatchDeleteVersionsRequest parent */ - parent?: (string|null); - - /** BatchDeleteVersionsRequest names */ - names?: (string[]|null); - - /** BatchDeleteVersionsRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a BatchDeleteVersionsRequest. */ - class BatchDeleteVersionsRequest implements IBatchDeleteVersionsRequest { - - /** - * Constructs a new BatchDeleteVersionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest); - - /** BatchDeleteVersionsRequest parent. */ - public parent: string; - - /** BatchDeleteVersionsRequest names. */ - public names: string[]; - - /** BatchDeleteVersionsRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new BatchDeleteVersionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchDeleteVersionsRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest): google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; - - /** - * Encodes the specified BatchDeleteVersionsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.verify|verify} messages. - * @param message BatchDeleteVersionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchDeleteVersionsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.verify|verify} messages. - * @param message BatchDeleteVersionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchDeleteVersionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchDeleteVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; - - /** - * Decodes a BatchDeleteVersionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchDeleteVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; - - /** - * Verifies a BatchDeleteVersionsRequest 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 BatchDeleteVersionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchDeleteVersionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; - - /** - * Creates a plain object from a BatchDeleteVersionsRequest message. Also converts values to other types if specified. - * @param message BatchDeleteVersionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchDeleteVersionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchDeleteVersionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchDeleteVersionsMetadata. */ - interface IBatchDeleteVersionsMetadata { - - /** BatchDeleteVersionsMetadata failedVersions */ - failedVersions?: (string[]|null); - } - - /** Represents a BatchDeleteVersionsMetadata. */ - class BatchDeleteVersionsMetadata implements IBatchDeleteVersionsMetadata { - - /** - * Constructs a new BatchDeleteVersionsMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata); - - /** BatchDeleteVersionsMetadata failedVersions. */ - public failedVersions: string[]; - - /** - * Creates a new BatchDeleteVersionsMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchDeleteVersionsMetadata instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata): google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata; - - /** - * Encodes the specified BatchDeleteVersionsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.verify|verify} messages. - * @param message BatchDeleteVersionsMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchDeleteVersionsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.verify|verify} messages. - * @param message BatchDeleteVersionsMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchDeleteVersionsMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchDeleteVersionsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata; - - /** - * Decodes a BatchDeleteVersionsMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchDeleteVersionsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata; - - /** - * Verifies a BatchDeleteVersionsMetadata 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 BatchDeleteVersionsMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchDeleteVersionsMetadata - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata; - - /** - * Creates a plain object from a BatchDeleteVersionsMetadata message. Also converts values to other types if specified. - * @param message BatchDeleteVersionsMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchDeleteVersionsMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchDeleteVersionsMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateVersionRequest. */ - interface IUpdateVersionRequest { - - /** UpdateVersionRequest version */ - version?: (google.devtools.artifactregistry.v1.IVersion|null); - - /** UpdateVersionRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateVersionRequest. */ - class UpdateVersionRequest implements IUpdateVersionRequest { - - /** - * Constructs a new UpdateVersionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IUpdateVersionRequest); - - /** UpdateVersionRequest version. */ - public version?: (google.devtools.artifactregistry.v1.IVersion|null); - - /** UpdateVersionRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateVersionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateVersionRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IUpdateVersionRequest): google.devtools.artifactregistry.v1.UpdateVersionRequest; - - /** - * Encodes the specified UpdateVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVersionRequest.verify|verify} messages. - * @param message UpdateVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IUpdateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVersionRequest.verify|verify} messages. - * @param message UpdateVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateVersionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdateVersionRequest; - - /** - * Decodes an UpdateVersionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdateVersionRequest; - - /** - * Verifies an UpdateVersionRequest 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 UpdateVersionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateVersionRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateVersionRequest; - - /** - * Creates a plain object from an UpdateVersionRequest message. Also converts values to other types if specified. - * @param message UpdateVersionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.UpdateVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateVersionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateVersionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Tag. */ - interface ITag { - - /** Tag name */ - name?: (string|null); - - /** Tag version */ - version?: (string|null); - } - - /** Represents a Tag. */ - class Tag implements ITag { - - /** - * Constructs a new Tag. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.ITag); - - /** Tag name. */ - public name: string; - - /** Tag version. */ - public version: string; - - /** - * Creates a new Tag instance using the specified properties. - * @param [properties] Properties to set - * @returns Tag instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.ITag): google.devtools.artifactregistry.v1.Tag; - - /** - * Encodes the specified Tag message. Does not implicitly {@link google.devtools.artifactregistry.v1.Tag.verify|verify} messages. - * @param message Tag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.ITag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Tag.verify|verify} messages. - * @param message Tag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.ITag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Tag message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Tag; - - /** - * Decodes a Tag message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Tag; - - /** - * Verifies a Tag message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Tag message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Tag - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Tag; - - /** - * Creates a plain object from a Tag message. Also converts values to other types if specified. - * @param message Tag - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.Tag, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Tag to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Tag - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTagsRequest. */ - interface IListTagsRequest { - - /** ListTagsRequest parent */ - parent?: (string|null); - - /** ListTagsRequest filter */ - filter?: (string|null); - - /** ListTagsRequest pageSize */ - pageSize?: (number|null); - - /** ListTagsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListTagsRequest. */ - class ListTagsRequest implements IListTagsRequest { - - /** - * Constructs a new ListTagsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListTagsRequest); - - /** ListTagsRequest parent. */ - public parent: string; - - /** ListTagsRequest filter. */ - public filter: string; - - /** ListTagsRequest pageSize. */ - public pageSize: number; - - /** ListTagsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListTagsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTagsRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListTagsRequest): google.devtools.artifactregistry.v1.ListTagsRequest; - - /** - * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsRequest.verify|verify} messages. - * @param message ListTagsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsRequest.verify|verify} messages. - * @param message ListTagsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTagsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListTagsRequest; - - /** - * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListTagsRequest; - - /** - * Verifies a ListTagsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTagsRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListTagsRequest; - - /** - * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. - * @param message ListTagsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTagsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTagsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTagsResponse. */ - interface IListTagsResponse { - - /** ListTagsResponse tags */ - tags?: (google.devtools.artifactregistry.v1.ITag[]|null); - - /** ListTagsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListTagsResponse. */ - class ListTagsResponse implements IListTagsResponse { - - /** - * Constructs a new ListTagsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListTagsResponse); - - /** ListTagsResponse tags. */ - public tags: google.devtools.artifactregistry.v1.ITag[]; - - /** ListTagsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListTagsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTagsResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListTagsResponse): google.devtools.artifactregistry.v1.ListTagsResponse; - - /** - * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsResponse.verify|verify} messages. - * @param message ListTagsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTagsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsResponse.verify|verify} messages. - * @param message ListTagsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTagsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListTagsResponse; - - /** - * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListTagsResponse; - - /** - * Verifies a ListTagsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTagsResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListTagsResponse; - - /** - * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. - * @param message ListTagsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTagsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTagsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetTagRequest. */ - interface IGetTagRequest { - - /** GetTagRequest name */ - name?: (string|null); - } - - /** Represents a GetTagRequest. */ - class GetTagRequest implements IGetTagRequest { - - /** - * Constructs a new GetTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGetTagRequest); - - /** GetTagRequest name. */ - public name: string; - - /** - * Creates a new GetTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTagRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGetTagRequest): google.devtools.artifactregistry.v1.GetTagRequest; - - /** - * Encodes the specified GetTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetTagRequest.verify|verify} messages. - * @param message GetTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGetTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetTagRequest.verify|verify} messages. - * @param message GetTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetTagRequest; - - /** - * Decodes a GetTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetTagRequest; - - /** - * Verifies a GetTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetTagRequest; - - /** - * Creates a plain object from a GetTagRequest message. Also converts values to other types if specified. - * @param message GetTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GetTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateTagRequest. */ - interface ICreateTagRequest { - - /** CreateTagRequest parent */ - parent?: (string|null); - - /** CreateTagRequest tagId */ - tagId?: (string|null); - - /** CreateTagRequest tag */ - tag?: (google.devtools.artifactregistry.v1.ITag|null); - } - - /** Represents a CreateTagRequest. */ - class CreateTagRequest implements ICreateTagRequest { - - /** - * Constructs a new CreateTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.ICreateTagRequest); - - /** CreateTagRequest parent. */ - public parent: string; - - /** CreateTagRequest tagId. */ - public tagId: string; - - /** CreateTagRequest tag. */ - public tag?: (google.devtools.artifactregistry.v1.ITag|null); - - /** - * Creates a new CreateTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTagRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.ICreateTagRequest): google.devtools.artifactregistry.v1.CreateTagRequest; - - /** - * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateTagRequest.verify|verify} messages. - * @param message CreateTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateTagRequest.verify|verify} messages. - * @param message CreateTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.CreateTagRequest; - - /** - * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.CreateTagRequest; - - /** - * Verifies a CreateTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CreateTagRequest; - - /** - * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. - * @param message CreateTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.CreateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateTagRequest. */ - interface IUpdateTagRequest { - - /** UpdateTagRequest tag */ - tag?: (google.devtools.artifactregistry.v1.ITag|null); - - /** UpdateTagRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateTagRequest. */ - class UpdateTagRequest implements IUpdateTagRequest { - - /** - * Constructs a new UpdateTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IUpdateTagRequest); - - /** UpdateTagRequest tag. */ - public tag?: (google.devtools.artifactregistry.v1.ITag|null); - - /** UpdateTagRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTagRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IUpdateTagRequest): google.devtools.artifactregistry.v1.UpdateTagRequest; - - /** - * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateTagRequest.verify|verify} messages. - * @param message UpdateTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateTagRequest.verify|verify} messages. - * @param message UpdateTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdateTagRequest; - - /** - * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdateTagRequest; - - /** - * Verifies an UpdateTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateTagRequest; - - /** - * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. - * @param message UpdateTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.UpdateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteTagRequest. */ - interface IDeleteTagRequest { - - /** DeleteTagRequest name */ - name?: (string|null); - } - - /** Represents a DeleteTagRequest. */ - class DeleteTagRequest implements IDeleteTagRequest { - - /** - * Constructs a new DeleteTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IDeleteTagRequest); - - /** DeleteTagRequest name. */ - public name: string; - - /** - * Creates a new DeleteTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTagRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IDeleteTagRequest): google.devtools.artifactregistry.v1.DeleteTagRequest; - - /** - * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteTagRequest.verify|verify} messages. - * @param message DeleteTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteTagRequest.verify|verify} messages. - * @param message DeleteTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DeleteTagRequest; - - /** - * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DeleteTagRequest; - - /** - * Verifies a DeleteTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteTagRequest; - - /** - * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. - * @param message DeleteTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.DeleteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GenericArtifact. */ - interface IGenericArtifact { - - /** GenericArtifact name */ - name?: (string|null); - - /** GenericArtifact version */ - version?: (string|null); - - /** GenericArtifact createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** GenericArtifact updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a GenericArtifact. */ - class GenericArtifact implements IGenericArtifact { - - /** - * Constructs a new GenericArtifact. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGenericArtifact); - - /** GenericArtifact name. */ - public name: string; - - /** GenericArtifact version. */ - public version: string; - - /** GenericArtifact createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** GenericArtifact updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new GenericArtifact instance using the specified properties. - * @param [properties] Properties to set - * @returns GenericArtifact instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGenericArtifact): google.devtools.artifactregistry.v1.GenericArtifact; - - /** - * Encodes the specified GenericArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.GenericArtifact.verify|verify} messages. - * @param message GenericArtifact message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGenericArtifact, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenericArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GenericArtifact.verify|verify} messages. - * @param message GenericArtifact message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGenericArtifact, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenericArtifact message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenericArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GenericArtifact; - - /** - * Decodes a GenericArtifact message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenericArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GenericArtifact; - - /** - * Verifies a GenericArtifact 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 GenericArtifact message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenericArtifact - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GenericArtifact; - - /** - * Creates a plain object from a GenericArtifact message. Also converts values to other types if specified. - * @param message GenericArtifact - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GenericArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenericArtifact to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GenericArtifact - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoModule. */ - interface IGoModule { - - /** GoModule name */ - name?: (string|null); - - /** GoModule version */ - version?: (string|null); - - /** GoModule createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** GoModule updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a GoModule. */ - class GoModule implements IGoModule { - - /** - * Constructs a new GoModule. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGoModule); - - /** GoModule name. */ - public name: string; - - /** GoModule version. */ - public version: string; - - /** GoModule createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** GoModule updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new GoModule instance using the specified properties. - * @param [properties] Properties to set - * @returns GoModule instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGoModule): google.devtools.artifactregistry.v1.GoModule; - - /** - * Encodes the specified GoModule message. Does not implicitly {@link google.devtools.artifactregistry.v1.GoModule.verify|verify} messages. - * @param message GoModule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGoModule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoModule message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GoModule.verify|verify} messages. - * @param message GoModule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGoModule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoModule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GoModule; - - /** - * Decodes a GoModule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GoModule; - - /** - * Verifies a GoModule 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 GoModule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoModule - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GoModule; - - /** - * Creates a plain object from a GoModule message. Also converts values to other types if specified. - * @param message GoModule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GoModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoModule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoModule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a KfpArtifact. */ - interface IKfpArtifact { - - /** KfpArtifact name */ - name?: (string|null); - - /** KfpArtifact version */ - version?: (string|null); - } - - /** Represents a KfpArtifact. */ - class KfpArtifact implements IKfpArtifact { - - /** - * Constructs a new KfpArtifact. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IKfpArtifact); - - /** KfpArtifact name. */ - public name: string; - - /** KfpArtifact version. */ - public version: string; - - /** - * Creates a new KfpArtifact instance using the specified properties. - * @param [properties] Properties to set - * @returns KfpArtifact instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IKfpArtifact): google.devtools.artifactregistry.v1.KfpArtifact; - - /** - * Encodes the specified KfpArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.KfpArtifact.verify|verify} messages. - * @param message KfpArtifact message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IKfpArtifact, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KfpArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.KfpArtifact.verify|verify} messages. - * @param message KfpArtifact message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IKfpArtifact, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KfpArtifact message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KfpArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.KfpArtifact; - - /** - * Decodes a KfpArtifact message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KfpArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.KfpArtifact; - - /** - * Verifies a KfpArtifact 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 KfpArtifact message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KfpArtifact - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.KfpArtifact; - - /** - * Creates a plain object from a KfpArtifact message. Also converts values to other types if specified. - * @param message KfpArtifact - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.KfpArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KfpArtifact to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for KfpArtifact - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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); - - /** Package annotations */ - annotations?: ({ [k: string]: string }|null); - } - - /** Represents a Package. */ - class Package implements IPackage { - - /** - * Constructs a new Package. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IPackage); - - /** Package name. */ - public name: string; - - /** Package displayName. */ - public displayName: string; - - /** Package createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Package updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Package annotations. */ - public annotations: { [k: string]: string }; - - /** - * Creates a new Package instance using the specified properties. - * @param [properties] Properties to set - * @returns Package instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IPackage): google.devtools.artifactregistry.v1.Package; - - /** - * Encodes the specified Package message. Does not implicitly {@link google.devtools.artifactregistry.v1.Package.verify|verify} messages. - * @param message Package message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Package message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Package.verify|verify} messages. - * @param message Package message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Package message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Package - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Package; - - /** - * Decodes a Package message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Package - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Package; - - /** - * Verifies a Package message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Package message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Package - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Package; - - /** - * Creates a plain object from a Package message. Also converts values to other types if specified. - * @param message Package - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.Package, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Package to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Package - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPackagesRequest. */ - interface IListPackagesRequest { - - /** ListPackagesRequest parent */ - parent?: (string|null); - - /** ListPackagesRequest pageSize */ - pageSize?: (number|null); - - /** ListPackagesRequest pageToken */ - pageToken?: (string|null); - - /** ListPackagesRequest filter */ - filter?: (string|null); - - /** ListPackagesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListPackagesRequest. */ - class ListPackagesRequest implements IListPackagesRequest { - - /** - * Constructs a new ListPackagesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListPackagesRequest); - - /** ListPackagesRequest parent. */ - public parent: string; - - /** ListPackagesRequest pageSize. */ - public pageSize: number; - - /** ListPackagesRequest pageToken. */ - public pageToken: string; - - /** ListPackagesRequest filter. */ - public filter: string; - - /** ListPackagesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListPackagesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPackagesRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListPackagesRequest): google.devtools.artifactregistry.v1.ListPackagesRequest; - - /** - * Encodes the specified ListPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesRequest.verify|verify} messages. - * @param message ListPackagesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesRequest.verify|verify} messages. - * @param message ListPackagesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPackagesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListPackagesRequest; - - /** - * Decodes a ListPackagesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListPackagesRequest; - - /** - * Verifies a ListPackagesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPackagesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPackagesRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListPackagesRequest; - - /** - * Creates a plain object from a ListPackagesRequest message. Also converts values to other types if specified. - * @param message ListPackagesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPackagesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPackagesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPackagesResponse. */ - interface IListPackagesResponse { - - /** ListPackagesResponse packages */ - packages?: (google.devtools.artifactregistry.v1.IPackage[]|null); - - /** ListPackagesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListPackagesResponse. */ - class ListPackagesResponse implements IListPackagesResponse { - - /** - * Constructs a new ListPackagesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListPackagesResponse); - - /** ListPackagesResponse packages. */ - public packages: google.devtools.artifactregistry.v1.IPackage[]; - - /** ListPackagesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListPackagesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPackagesResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListPackagesResponse): google.devtools.artifactregistry.v1.ListPackagesResponse; - - /** - * Encodes the specified ListPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesResponse.verify|verify} messages. - * @param message ListPackagesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesResponse.verify|verify} messages. - * @param message ListPackagesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPackagesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListPackagesResponse; - - /** - * Decodes a ListPackagesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListPackagesResponse; - - /** - * Verifies a ListPackagesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPackagesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPackagesResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListPackagesResponse; - - /** - * Creates a plain object from a ListPackagesResponse message. Also converts values to other types if specified. - * @param message ListPackagesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPackagesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPackagesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPackageRequest. */ - interface IGetPackageRequest { - - /** GetPackageRequest name */ - name?: (string|null); - } - - /** Represents a GetPackageRequest. */ - class GetPackageRequest implements IGetPackageRequest { - - /** - * Constructs a new GetPackageRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGetPackageRequest); - - /** GetPackageRequest name. */ - public name: string; - - /** - * Creates a new GetPackageRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPackageRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGetPackageRequest): google.devtools.artifactregistry.v1.GetPackageRequest; - - /** - * Encodes the specified GetPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPackageRequest.verify|verify} messages. - * @param message GetPackageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGetPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPackageRequest.verify|verify} messages. - * @param message GetPackageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPackageRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetPackageRequest; - - /** - * Decodes a GetPackageRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetPackageRequest; - - /** - * Verifies a GetPackageRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPackageRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPackageRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetPackageRequest; - - /** - * Creates a plain object from a GetPackageRequest message. Also converts values to other types if specified. - * @param message GetPackageRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GetPackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPackageRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPackageRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeletePackageRequest. */ - interface IDeletePackageRequest { - - /** DeletePackageRequest name */ - name?: (string|null); - } - - /** Represents a DeletePackageRequest. */ - class DeletePackageRequest implements IDeletePackageRequest { - - /** - * Constructs a new DeletePackageRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IDeletePackageRequest); - - /** DeletePackageRequest name. */ - public name: string; - - /** - * Creates a new DeletePackageRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeletePackageRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IDeletePackageRequest): google.devtools.artifactregistry.v1.DeletePackageRequest; - - /** - * Encodes the specified DeletePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeletePackageRequest.verify|verify} messages. - * @param message DeletePackageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IDeletePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeletePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeletePackageRequest.verify|verify} messages. - * @param message DeletePackageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeletePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeletePackageRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeletePackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DeletePackageRequest; - - /** - * Decodes a DeletePackageRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeletePackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DeletePackageRequest; - - /** - * Verifies a DeletePackageRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeletePackageRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeletePackageRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeletePackageRequest; - - /** - * Creates a plain object from a DeletePackageRequest message. Also converts values to other types if specified. - * @param message DeletePackageRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.DeletePackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeletePackageRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeletePackageRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdatePackageRequest. */ - interface IUpdatePackageRequest { - - /** UpdatePackageRequest package */ - "package"?: (google.devtools.artifactregistry.v1.IPackage|null); - - /** UpdatePackageRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdatePackageRequest. */ - class UpdatePackageRequest implements IUpdatePackageRequest { - - /** - * Constructs a new UpdatePackageRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IUpdatePackageRequest); - - /** UpdatePackageRequest package. */ - public package?: (google.devtools.artifactregistry.v1.IPackage|null); - - /** UpdatePackageRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdatePackageRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdatePackageRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IUpdatePackageRequest): google.devtools.artifactregistry.v1.UpdatePackageRequest; - - /** - * Encodes the specified UpdatePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdatePackageRequest.verify|verify} messages. - * @param message UpdatePackageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IUpdatePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdatePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdatePackageRequest.verify|verify} messages. - * @param message UpdatePackageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdatePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdatePackageRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdatePackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdatePackageRequest; - - /** - * Decodes an UpdatePackageRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdatePackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdatePackageRequest; - - /** - * Verifies an UpdatePackageRequest 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 UpdatePackageRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdatePackageRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdatePackageRequest; - - /** - * Creates a plain object from an UpdatePackageRequest message. Also converts values to other types if specified. - * @param message UpdatePackageRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.UpdatePackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdatePackageRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdatePackageRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpstreamPolicy. */ - interface IUpstreamPolicy { - - /** UpstreamPolicy id */ - id?: (string|null); - - /** UpstreamPolicy repository */ - repository?: (string|null); - - /** UpstreamPolicy priority */ - priority?: (number|null); - } - - /** Represents an UpstreamPolicy. */ - class UpstreamPolicy implements IUpstreamPolicy { - - /** - * Constructs a new UpstreamPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IUpstreamPolicy); - - /** UpstreamPolicy id. */ - public id: string; - - /** UpstreamPolicy repository. */ - public repository: string; - - /** UpstreamPolicy priority. */ - public priority: number; - - /** - * Creates a new UpstreamPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns UpstreamPolicy instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IUpstreamPolicy): google.devtools.artifactregistry.v1.UpstreamPolicy; - - /** - * Encodes the specified UpstreamPolicy message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpstreamPolicy.verify|verify} messages. - * @param message UpstreamPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IUpstreamPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpstreamPolicy message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpstreamPolicy.verify|verify} messages. - * @param message UpstreamPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpstreamPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpstreamPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpstreamPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpstreamPolicy; - - /** - * Decodes an UpstreamPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpstreamPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpstreamPolicy; - - /** - * Verifies an UpstreamPolicy 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 UpstreamPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpstreamPolicy - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpstreamPolicy; - - /** - * Creates a plain object from an UpstreamPolicy message. Also converts values to other types if specified. - * @param message UpstreamPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.UpstreamPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpstreamPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpstreamPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CleanupPolicyCondition. */ - interface ICleanupPolicyCondition { - - /** CleanupPolicyCondition tagState */ - tagState?: (google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState|keyof typeof google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState|null); - - /** CleanupPolicyCondition tagPrefixes */ - tagPrefixes?: (string[]|null); - - /** CleanupPolicyCondition versionNamePrefixes */ - versionNamePrefixes?: (string[]|null); - - /** CleanupPolicyCondition packageNamePrefixes */ - packageNamePrefixes?: (string[]|null); - - /** CleanupPolicyCondition olderThan */ - olderThan?: (google.protobuf.IDuration|null); - - /** CleanupPolicyCondition newerThan */ - newerThan?: (google.protobuf.IDuration|null); - } - - /** Represents a CleanupPolicyCondition. */ - class CleanupPolicyCondition implements ICleanupPolicyCondition { - - /** - * Constructs a new CleanupPolicyCondition. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.ICleanupPolicyCondition); - - /** CleanupPolicyCondition tagState. */ - public tagState?: (google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState|keyof typeof google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState|null); - - /** CleanupPolicyCondition tagPrefixes. */ - public tagPrefixes: string[]; - - /** CleanupPolicyCondition versionNamePrefixes. */ - public versionNamePrefixes: string[]; - - /** CleanupPolicyCondition packageNamePrefixes. */ - public packageNamePrefixes: string[]; - - /** CleanupPolicyCondition olderThan. */ - public olderThan?: (google.protobuf.IDuration|null); - - /** CleanupPolicyCondition newerThan. */ - public newerThan?: (google.protobuf.IDuration|null); - - /** - * Creates a new CleanupPolicyCondition instance using the specified properties. - * @param [properties] Properties to set - * @returns CleanupPolicyCondition instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.ICleanupPolicyCondition): google.devtools.artifactregistry.v1.CleanupPolicyCondition; - - /** - * Encodes the specified CleanupPolicyCondition message. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyCondition.verify|verify} messages. - * @param message CleanupPolicyCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.ICleanupPolicyCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CleanupPolicyCondition message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyCondition.verify|verify} messages. - * @param message CleanupPolicyCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICleanupPolicyCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CleanupPolicyCondition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CleanupPolicyCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.CleanupPolicyCondition; - - /** - * Decodes a CleanupPolicyCondition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CleanupPolicyCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.CleanupPolicyCondition; - - /** - * Verifies a CleanupPolicyCondition 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 CleanupPolicyCondition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CleanupPolicyCondition - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CleanupPolicyCondition; - - /** - * Creates a plain object from a CleanupPolicyCondition message. Also converts values to other types if specified. - * @param message CleanupPolicyCondition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.CleanupPolicyCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CleanupPolicyCondition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CleanupPolicyCondition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CleanupPolicyCondition { - - /** TagState enum. */ - enum TagState { - TAG_STATE_UNSPECIFIED = 0, - TAGGED = 1, - UNTAGGED = 2, - ANY = 3 - } - } - - /** Properties of a CleanupPolicyMostRecentVersions. */ - interface ICleanupPolicyMostRecentVersions { - - /** CleanupPolicyMostRecentVersions packageNamePrefixes */ - packageNamePrefixes?: (string[]|null); - - /** CleanupPolicyMostRecentVersions keepCount */ - keepCount?: (number|null); - } - - /** Represents a CleanupPolicyMostRecentVersions. */ - class CleanupPolicyMostRecentVersions implements ICleanupPolicyMostRecentVersions { - - /** - * Constructs a new CleanupPolicyMostRecentVersions. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions); - - /** CleanupPolicyMostRecentVersions packageNamePrefixes. */ - public packageNamePrefixes: string[]; - - /** CleanupPolicyMostRecentVersions keepCount. */ - public keepCount?: (number|null); - - /** - * Creates a new CleanupPolicyMostRecentVersions instance using the specified properties. - * @param [properties] Properties to set - * @returns CleanupPolicyMostRecentVersions instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions): google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions; - - /** - * Encodes the specified CleanupPolicyMostRecentVersions message. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.verify|verify} messages. - * @param message CleanupPolicyMostRecentVersions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CleanupPolicyMostRecentVersions message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.verify|verify} messages. - * @param message CleanupPolicyMostRecentVersions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CleanupPolicyMostRecentVersions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CleanupPolicyMostRecentVersions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions; - - /** - * Decodes a CleanupPolicyMostRecentVersions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CleanupPolicyMostRecentVersions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions; - - /** - * Verifies a CleanupPolicyMostRecentVersions 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 CleanupPolicyMostRecentVersions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CleanupPolicyMostRecentVersions - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions; - - /** - * Creates a plain object from a CleanupPolicyMostRecentVersions message. Also converts values to other types if specified. - * @param message CleanupPolicyMostRecentVersions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CleanupPolicyMostRecentVersions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CleanupPolicyMostRecentVersions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CleanupPolicy. */ - interface ICleanupPolicy { - - /** CleanupPolicy condition */ - condition?: (google.devtools.artifactregistry.v1.ICleanupPolicyCondition|null); - - /** CleanupPolicy mostRecentVersions */ - mostRecentVersions?: (google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions|null); - - /** CleanupPolicy id */ - id?: (string|null); - - /** CleanupPolicy action */ - action?: (google.devtools.artifactregistry.v1.CleanupPolicy.Action|keyof typeof google.devtools.artifactregistry.v1.CleanupPolicy.Action|null); - } - - /** Represents a CleanupPolicy. */ - class CleanupPolicy implements ICleanupPolicy { - - /** - * Constructs a new CleanupPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.ICleanupPolicy); - - /** CleanupPolicy condition. */ - public condition?: (google.devtools.artifactregistry.v1.ICleanupPolicyCondition|null); - - /** CleanupPolicy mostRecentVersions. */ - public mostRecentVersions?: (google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions|null); - - /** CleanupPolicy id. */ - public id: string; - - /** CleanupPolicy action. */ - public action: (google.devtools.artifactregistry.v1.CleanupPolicy.Action|keyof typeof google.devtools.artifactregistry.v1.CleanupPolicy.Action); - - /** CleanupPolicy conditionType. */ - public conditionType?: ("condition"|"mostRecentVersions"); - - /** - * Creates a new CleanupPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns CleanupPolicy instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.ICleanupPolicy): google.devtools.artifactregistry.v1.CleanupPolicy; - - /** - * Encodes the specified CleanupPolicy message. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicy.verify|verify} messages. - * @param message CleanupPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.ICleanupPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CleanupPolicy message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicy.verify|verify} messages. - * @param message CleanupPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICleanupPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CleanupPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CleanupPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.CleanupPolicy; - - /** - * Decodes a CleanupPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CleanupPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.CleanupPolicy; - - /** - * Verifies a CleanupPolicy 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 CleanupPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CleanupPolicy - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CleanupPolicy; - - /** - * Creates a plain object from a CleanupPolicy message. Also converts values to other types if specified. - * @param message CleanupPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.CleanupPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CleanupPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CleanupPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CleanupPolicy { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - DELETE = 1, - KEEP = 2 - } - } - - /** Properties of a VirtualRepositoryConfig. */ - interface IVirtualRepositoryConfig { - - /** VirtualRepositoryConfig upstreamPolicies */ - upstreamPolicies?: (google.devtools.artifactregistry.v1.IUpstreamPolicy[]|null); - } - - /** Represents a VirtualRepositoryConfig. */ - class VirtualRepositoryConfig implements IVirtualRepositoryConfig { - - /** - * Constructs a new VirtualRepositoryConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IVirtualRepositoryConfig); - - /** VirtualRepositoryConfig upstreamPolicies. */ - public upstreamPolicies: google.devtools.artifactregistry.v1.IUpstreamPolicy[]; - - /** - * Creates a new VirtualRepositoryConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns VirtualRepositoryConfig instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IVirtualRepositoryConfig): google.devtools.artifactregistry.v1.VirtualRepositoryConfig; - - /** - * Encodes the specified VirtualRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.VirtualRepositoryConfig.verify|verify} messages. - * @param message VirtualRepositoryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IVirtualRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VirtualRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.VirtualRepositoryConfig.verify|verify} messages. - * @param message VirtualRepositoryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IVirtualRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VirtualRepositoryConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VirtualRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.VirtualRepositoryConfig; - - /** - * Decodes a VirtualRepositoryConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VirtualRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.VirtualRepositoryConfig; - - /** - * Verifies a VirtualRepositoryConfig 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 VirtualRepositoryConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VirtualRepositoryConfig - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.VirtualRepositoryConfig; - - /** - * Creates a plain object from a VirtualRepositoryConfig message. Also converts values to other types if specified. - * @param message VirtualRepositoryConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.VirtualRepositoryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VirtualRepositoryConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VirtualRepositoryConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemoteRepositoryConfig. */ - interface IRemoteRepositoryConfig { - - /** RemoteRepositoryConfig dockerRepository */ - dockerRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository|null); - - /** RemoteRepositoryConfig mavenRepository */ - mavenRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository|null); - - /** RemoteRepositoryConfig npmRepository */ - npmRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository|null); - - /** RemoteRepositoryConfig pythonRepository */ - pythonRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository|null); - - /** RemoteRepositoryConfig aptRepository */ - aptRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository|null); - - /** RemoteRepositoryConfig yumRepository */ - yumRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository|null); - - /** RemoteRepositoryConfig commonRepository */ - commonRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository|null); - - /** RemoteRepositoryConfig description */ - description?: (string|null); - - /** RemoteRepositoryConfig upstreamCredentials */ - upstreamCredentials?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials|null); - - /** RemoteRepositoryConfig disableUpstreamValidation */ - disableUpstreamValidation?: (boolean|null); - } - - /** Represents a RemoteRepositoryConfig. */ - class RemoteRepositoryConfig implements IRemoteRepositoryConfig { - - /** - * Constructs a new RemoteRepositoryConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IRemoteRepositoryConfig); - - /** RemoteRepositoryConfig dockerRepository. */ - public dockerRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository|null); - - /** RemoteRepositoryConfig mavenRepository. */ - public mavenRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository|null); - - /** RemoteRepositoryConfig npmRepository. */ - public npmRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository|null); - - /** RemoteRepositoryConfig pythonRepository. */ - public pythonRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository|null); - - /** RemoteRepositoryConfig aptRepository. */ - public aptRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository|null); - - /** RemoteRepositoryConfig yumRepository. */ - public yumRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository|null); - - /** RemoteRepositoryConfig commonRepository. */ - public commonRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository|null); - - /** RemoteRepositoryConfig description. */ - public description: string; - - /** RemoteRepositoryConfig upstreamCredentials. */ - public upstreamCredentials?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials|null); - - /** RemoteRepositoryConfig disableUpstreamValidation. */ - public disableUpstreamValidation: boolean; - - /** RemoteRepositoryConfig remoteSource. */ - public remoteSource?: ("dockerRepository"|"mavenRepository"|"npmRepository"|"pythonRepository"|"aptRepository"|"yumRepository"|"commonRepository"); - - /** - * Creates a new RemoteRepositoryConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoteRepositoryConfig instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IRemoteRepositoryConfig): google.devtools.artifactregistry.v1.RemoteRepositoryConfig; - - /** - * Encodes the specified RemoteRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.verify|verify} messages. - * @param message RemoteRepositoryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IRemoteRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoteRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.verify|verify} messages. - * @param message RemoteRepositoryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IRemoteRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoteRepositoryConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoteRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig; - - /** - * Decodes a RemoteRepositoryConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoteRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig; - - /** - * Verifies a RemoteRepositoryConfig 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 RemoteRepositoryConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoteRepositoryConfig - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig; - - /** - * Creates a plain object from a RemoteRepositoryConfig message. Also converts values to other types if specified. - * @param message RemoteRepositoryConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoteRepositoryConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemoteRepositoryConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace RemoteRepositoryConfig { - - /** Properties of an UpstreamCredentials. */ - interface IUpstreamCredentials { - - /** UpstreamCredentials usernamePasswordCredentials */ - usernamePasswordCredentials?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials|null); - } - - /** Represents an UpstreamCredentials. */ - class UpstreamCredentials implements IUpstreamCredentials { - - /** - * Constructs a new UpstreamCredentials. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials); - - /** UpstreamCredentials usernamePasswordCredentials. */ - public usernamePasswordCredentials?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials|null); - - /** UpstreamCredentials credentials. */ - public credentials?: "usernamePasswordCredentials"; - - /** - * Creates a new UpstreamCredentials instance using the specified properties. - * @param [properties] Properties to set - * @returns UpstreamCredentials instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials; - - /** - * Encodes the specified UpstreamCredentials message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.verify|verify} messages. - * @param message UpstreamCredentials message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpstreamCredentials message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.verify|verify} messages. - * @param message UpstreamCredentials message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpstreamCredentials message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpstreamCredentials - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials; - - /** - * Decodes an UpstreamCredentials message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpstreamCredentials - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials; - - /** - * Verifies an UpstreamCredentials 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 UpstreamCredentials message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpstreamCredentials - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials; - - /** - * Creates a plain object from an UpstreamCredentials message. Also converts values to other types if specified. - * @param message UpstreamCredentials - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpstreamCredentials to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpstreamCredentials - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UpstreamCredentials { - - /** Properties of a UsernamePasswordCredentials. */ - interface IUsernamePasswordCredentials { - - /** UsernamePasswordCredentials username */ - username?: (string|null); - - /** UsernamePasswordCredentials passwordSecretVersion */ - passwordSecretVersion?: (string|null); - } - - /** Represents a UsernamePasswordCredentials. */ - class UsernamePasswordCredentials implements IUsernamePasswordCredentials { - - /** - * Constructs a new UsernamePasswordCredentials. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials); - - /** UsernamePasswordCredentials username. */ - public username: string; - - /** UsernamePasswordCredentials passwordSecretVersion. */ - public passwordSecretVersion: string; - - /** - * Creates a new UsernamePasswordCredentials instance using the specified properties. - * @param [properties] Properties to set - * @returns UsernamePasswordCredentials instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials; - - /** - * Encodes the specified UsernamePasswordCredentials message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.verify|verify} messages. - * @param message UsernamePasswordCredentials message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UsernamePasswordCredentials message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.verify|verify} messages. - * @param message UsernamePasswordCredentials message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UsernamePasswordCredentials message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UsernamePasswordCredentials - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials; - - /** - * Decodes a UsernamePasswordCredentials message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UsernamePasswordCredentials - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials; - - /** - * Verifies a UsernamePasswordCredentials 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 UsernamePasswordCredentials message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UsernamePasswordCredentials - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials; - - /** - * Creates a plain object from a UsernamePasswordCredentials message. Also converts values to other types if specified. - * @param message UsernamePasswordCredentials - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UsernamePasswordCredentials to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UsernamePasswordCredentials - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a DockerRepository. */ - interface IDockerRepository { - - /** DockerRepository publicRepository */ - publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository|null); - - /** DockerRepository customRepository */ - customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository|null); - } - - /** Represents a DockerRepository. */ - class DockerRepository implements IDockerRepository { - - /** - * Constructs a new DockerRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository); - - /** DockerRepository publicRepository. */ - public publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository|null); - - /** DockerRepository customRepository. */ - public customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository|null); - - /** DockerRepository upstream. */ - public upstream?: ("publicRepository"|"customRepository"); - - /** - * Creates a new DockerRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns DockerRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository; - - /** - * Encodes the specified DockerRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.verify|verify} messages. - * @param message DockerRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DockerRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.verify|verify} messages. - * @param message DockerRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DockerRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DockerRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository; - - /** - * Decodes a DockerRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DockerRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository; - - /** - * Verifies a DockerRepository 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 DockerRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DockerRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository; - - /** - * Creates a plain object from a DockerRepository message. Also converts values to other types if specified. - * @param message DockerRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DockerRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DockerRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DockerRepository { - - /** Properties of a CustomRepository. */ - interface ICustomRepository { - - /** CustomRepository uri */ - uri?: (string|null); - } - - /** Represents a CustomRepository. */ - class CustomRepository implements ICustomRepository { - - /** - * Constructs a new CustomRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository); - - /** CustomRepository uri. */ - public uri: string; - - /** - * Creates a new CustomRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository; - - /** - * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.verify|verify} messages. - * @param message CustomRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.verify|verify} messages. - * @param message CustomRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository; - - /** - * Decodes a CustomRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository; - - /** - * Verifies a CustomRepository 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 CustomRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository; - - /** - * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. - * @param message CustomRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** PublicRepository enum. */ - enum PublicRepository { - PUBLIC_REPOSITORY_UNSPECIFIED = 0, - DOCKER_HUB = 1 - } - } - - /** Properties of a MavenRepository. */ - interface IMavenRepository { - - /** MavenRepository publicRepository */ - publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository|null); - - /** MavenRepository customRepository */ - customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository|null); - } - - /** Represents a MavenRepository. */ - class MavenRepository implements IMavenRepository { - - /** - * Constructs a new MavenRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository); - - /** MavenRepository publicRepository. */ - public publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository|null); - - /** MavenRepository customRepository. */ - public customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository|null); - - /** MavenRepository upstream. */ - public upstream?: ("publicRepository"|"customRepository"); - - /** - * Creates a new MavenRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns MavenRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository; - - /** - * Encodes the specified MavenRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.verify|verify} messages. - * @param message MavenRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MavenRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.verify|verify} messages. - * @param message MavenRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MavenRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MavenRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository; - - /** - * Decodes a MavenRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MavenRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository; - - /** - * Verifies a MavenRepository 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 MavenRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MavenRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository; - - /** - * Creates a plain object from a MavenRepository message. Also converts values to other types if specified. - * @param message MavenRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MavenRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MavenRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MavenRepository { - - /** Properties of a CustomRepository. */ - interface ICustomRepository { - - /** CustomRepository uri */ - uri?: (string|null); - } - - /** Represents a CustomRepository. */ - class CustomRepository implements ICustomRepository { - - /** - * Constructs a new CustomRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository); - - /** CustomRepository uri. */ - public uri: string; - - /** - * Creates a new CustomRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository; - - /** - * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.verify|verify} messages. - * @param message CustomRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.verify|verify} messages. - * @param message CustomRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository; - - /** - * Decodes a CustomRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository; - - /** - * Verifies a CustomRepository 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 CustomRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository; - - /** - * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. - * @param message CustomRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** PublicRepository enum. */ - enum PublicRepository { - PUBLIC_REPOSITORY_UNSPECIFIED = 0, - MAVEN_CENTRAL = 1 - } - } - - /** Properties of a NpmRepository. */ - interface INpmRepository { - - /** NpmRepository publicRepository */ - publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository|null); - - /** NpmRepository customRepository */ - customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository|null); - } - - /** Represents a NpmRepository. */ - class NpmRepository implements INpmRepository { - - /** - * Constructs a new NpmRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository); - - /** NpmRepository publicRepository. */ - public publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository|null); - - /** NpmRepository customRepository. */ - public customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository|null); - - /** NpmRepository upstream. */ - public upstream?: ("publicRepository"|"customRepository"); - - /** - * Creates a new NpmRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns NpmRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository; - - /** - * Encodes the specified NpmRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.verify|verify} messages. - * @param message NpmRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NpmRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.verify|verify} messages. - * @param message NpmRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NpmRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NpmRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository; - - /** - * Decodes a NpmRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NpmRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository; - - /** - * Verifies a NpmRepository 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 NpmRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NpmRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository; - - /** - * Creates a plain object from a NpmRepository message. Also converts values to other types if specified. - * @param message NpmRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NpmRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NpmRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NpmRepository { - - /** Properties of a CustomRepository. */ - interface ICustomRepository { - - /** CustomRepository uri */ - uri?: (string|null); - } - - /** Represents a CustomRepository. */ - class CustomRepository implements ICustomRepository { - - /** - * Constructs a new CustomRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository); - - /** CustomRepository uri. */ - public uri: string; - - /** - * Creates a new CustomRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository; - - /** - * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.verify|verify} messages. - * @param message CustomRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.verify|verify} messages. - * @param message CustomRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository; - - /** - * Decodes a CustomRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository; - - /** - * Verifies a CustomRepository 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 CustomRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository; - - /** - * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. - * @param message CustomRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** PublicRepository enum. */ - enum PublicRepository { - PUBLIC_REPOSITORY_UNSPECIFIED = 0, - NPMJS = 1 - } - } - - /** Properties of a PythonRepository. */ - interface IPythonRepository { - - /** PythonRepository publicRepository */ - publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository|null); - - /** PythonRepository customRepository */ - customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository|null); - } - - /** Represents a PythonRepository. */ - class PythonRepository implements IPythonRepository { - - /** - * Constructs a new PythonRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository); - - /** PythonRepository publicRepository. */ - public publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository|null); - - /** PythonRepository customRepository. */ - public customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository|null); - - /** PythonRepository upstream. */ - public upstream?: ("publicRepository"|"customRepository"); - - /** - * Creates a new PythonRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository; - - /** - * Encodes the specified PythonRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.verify|verify} messages. - * @param message PythonRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.verify|verify} messages. - * @param message PythonRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository; - - /** - * Decodes a PythonRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository; - - /** - * Verifies a PythonRepository 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 PythonRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository; - - /** - * Creates a plain object from a PythonRepository message. Also converts values to other types if specified. - * @param message PythonRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PythonRepository { - - /** Properties of a CustomRepository. */ - interface ICustomRepository { - - /** CustomRepository uri */ - uri?: (string|null); - } - - /** Represents a CustomRepository. */ - class CustomRepository implements ICustomRepository { - - /** - * Constructs a new CustomRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository); - - /** CustomRepository uri. */ - public uri: string; - - /** - * Creates a new CustomRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository; - - /** - * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.verify|verify} messages. - * @param message CustomRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.verify|verify} messages. - * @param message CustomRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository; - - /** - * Decodes a CustomRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository; - - /** - * Verifies a CustomRepository 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 CustomRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository; - - /** - * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. - * @param message CustomRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** PublicRepository enum. */ - enum PublicRepository { - PUBLIC_REPOSITORY_UNSPECIFIED = 0, - PYPI = 1 - } - } - - /** Properties of an AptRepository. */ - interface IAptRepository { - - /** AptRepository publicRepository */ - publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository|null); - - /** AptRepository customRepository */ - customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository|null); - } - - /** Represents an AptRepository. */ - class AptRepository implements IAptRepository { - - /** - * Constructs a new AptRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository); - - /** AptRepository publicRepository. */ - public publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository|null); - - /** AptRepository customRepository. */ - public customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository|null); - - /** AptRepository upstream. */ - public upstream?: ("publicRepository"|"customRepository"); - - /** - * Creates a new AptRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns AptRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository; - - /** - * Encodes the specified AptRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.verify|verify} messages. - * @param message AptRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AptRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.verify|verify} messages. - * @param message AptRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AptRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AptRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository; - - /** - * Decodes an AptRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AptRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository; - - /** - * Verifies an AptRepository 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 AptRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AptRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository; - - /** - * Creates a plain object from an AptRepository message. Also converts values to other types if specified. - * @param message AptRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AptRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AptRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AptRepository { - - /** Properties of a PublicRepository. */ - interface IPublicRepository { - - /** PublicRepository repositoryBase */ - repositoryBase?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase|null); - - /** PublicRepository repositoryPath */ - repositoryPath?: (string|null); - } - - /** Represents a PublicRepository. */ - class PublicRepository implements IPublicRepository { - - /** - * Constructs a new PublicRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository); - - /** PublicRepository repositoryBase. */ - public repositoryBase: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase); - - /** PublicRepository repositoryPath. */ - public repositoryPath: string; - - /** - * Creates a new PublicRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns PublicRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository; - - /** - * Encodes the specified PublicRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.verify|verify} messages. - * @param message PublicRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PublicRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.verify|verify} messages. - * @param message PublicRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PublicRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PublicRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository; - - /** - * Decodes a PublicRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PublicRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository; - - /** - * Verifies a PublicRepository 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 PublicRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PublicRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository; - - /** - * Creates a plain object from a PublicRepository message. Also converts values to other types if specified. - * @param message PublicRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PublicRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PublicRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PublicRepository { - - /** RepositoryBase enum. */ - enum RepositoryBase { - REPOSITORY_BASE_UNSPECIFIED = 0, - DEBIAN = 1, - UBUNTU = 2, - DEBIAN_SNAPSHOT = 3 - } - } - - /** Properties of a CustomRepository. */ - interface ICustomRepository { - - /** CustomRepository uri */ - uri?: (string|null); - } - - /** Represents a CustomRepository. */ - class CustomRepository implements ICustomRepository { - - /** - * Constructs a new CustomRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository); - - /** CustomRepository uri. */ - public uri: string; - - /** - * Creates a new CustomRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository; - - /** - * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.verify|verify} messages. - * @param message CustomRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.verify|verify} messages. - * @param message CustomRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository; - - /** - * Decodes a CustomRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository; - - /** - * Verifies a CustomRepository 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 CustomRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository; - - /** - * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. - * @param message CustomRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a YumRepository. */ - interface IYumRepository { - - /** YumRepository publicRepository */ - publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository|null); - - /** YumRepository customRepository */ - customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository|null); - } - - /** Represents a YumRepository. */ - class YumRepository implements IYumRepository { - - /** - * Constructs a new YumRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository); - - /** YumRepository publicRepository. */ - public publicRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository|null); - - /** YumRepository customRepository. */ - public customRepository?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository|null); - - /** YumRepository upstream. */ - public upstream?: ("publicRepository"|"customRepository"); - - /** - * Creates a new YumRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns YumRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository; - - /** - * Encodes the specified YumRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.verify|verify} messages. - * @param message YumRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified YumRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.verify|verify} messages. - * @param message YumRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a YumRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns YumRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository; - - /** - * Decodes a YumRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns YumRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository; - - /** - * Verifies a YumRepository 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 YumRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns YumRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository; - - /** - * Creates a plain object from a YumRepository message. Also converts values to other types if specified. - * @param message YumRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this YumRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for YumRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace YumRepository { - - /** Properties of a PublicRepository. */ - interface IPublicRepository { - - /** PublicRepository repositoryBase */ - repositoryBase?: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase|null); - - /** PublicRepository repositoryPath */ - repositoryPath?: (string|null); - } - - /** Represents a PublicRepository. */ - class PublicRepository implements IPublicRepository { - - /** - * Constructs a new PublicRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository); - - /** PublicRepository repositoryBase. */ - public repositoryBase: (google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase|keyof typeof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase); - - /** PublicRepository repositoryPath. */ - public repositoryPath: string; - - /** - * Creates a new PublicRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns PublicRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository; - - /** - * Encodes the specified PublicRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.verify|verify} messages. - * @param message PublicRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PublicRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.verify|verify} messages. - * @param message PublicRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PublicRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PublicRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository; - - /** - * Decodes a PublicRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PublicRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository; - - /** - * Verifies a PublicRepository 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 PublicRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PublicRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository; - - /** - * Creates a plain object from a PublicRepository message. Also converts values to other types if specified. - * @param message PublicRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PublicRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PublicRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PublicRepository { - - /** RepositoryBase enum. */ - enum RepositoryBase { - REPOSITORY_BASE_UNSPECIFIED = 0, - CENTOS = 1, - CENTOS_DEBUG = 2, - CENTOS_VAULT = 3, - CENTOS_STREAM = 4, - ROCKY = 5, - EPEL = 6 - } - } - - /** Properties of a CustomRepository. */ - interface ICustomRepository { - - /** CustomRepository uri */ - uri?: (string|null); - } - - /** Represents a CustomRepository. */ - class CustomRepository implements ICustomRepository { - - /** - * Constructs a new CustomRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository); - - /** CustomRepository uri. */ - public uri: string; - - /** - * Creates a new CustomRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository; - - /** - * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.verify|verify} messages. - * @param message CustomRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.verify|verify} messages. - * @param message CustomRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository; - - /** - * Decodes a CustomRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository; - - /** - * Verifies a CustomRepository 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 CustomRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository; - - /** - * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. - * @param message CustomRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CommonRemoteRepository. */ - interface ICommonRemoteRepository { - - /** CommonRemoteRepository uri */ - uri?: (string|null); - } - - /** Represents a CommonRemoteRepository. */ - class CommonRemoteRepository implements ICommonRemoteRepository { - - /** - * Constructs a new CommonRemoteRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository); - - /** CommonRemoteRepository uri. */ - public uri: string; - - /** - * Creates a new CommonRemoteRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonRemoteRepository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository; - - /** - * Encodes the specified CommonRemoteRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.verify|verify} messages. - * @param message CommonRemoteRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonRemoteRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.verify|verify} messages. - * @param message CommonRemoteRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonRemoteRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonRemoteRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository; - - /** - * Decodes a CommonRemoteRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonRemoteRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository; - - /** - * Verifies a CommonRemoteRepository 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 CommonRemoteRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonRemoteRepository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository; - - /** - * Creates a plain object from a CommonRemoteRepository message. Also converts values to other types if specified. - * @param message CommonRemoteRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonRemoteRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonRemoteRepository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a Repository. */ - interface IRepository { - - /** Repository mavenConfig */ - mavenConfig?: (google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig|null); - - /** Repository dockerConfig */ - dockerConfig?: (google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig|null); - - /** Repository virtualRepositoryConfig */ - virtualRepositoryConfig?: (google.devtools.artifactregistry.v1.IVirtualRepositoryConfig|null); - - /** Repository remoteRepositoryConfig */ - remoteRepositoryConfig?: (google.devtools.artifactregistry.v1.IRemoteRepositoryConfig|null); - - /** Repository name */ - name?: (string|null); - - /** Repository format */ - format?: (google.devtools.artifactregistry.v1.Repository.Format|keyof typeof google.devtools.artifactregistry.v1.Repository.Format|null); - - /** Repository description */ - description?: (string|null); - - /** Repository labels */ - labels?: ({ [k: string]: string }|null); - - /** Repository createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Repository updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Repository kmsKeyName */ - kmsKeyName?: (string|null); - - /** Repository mode */ - mode?: (google.devtools.artifactregistry.v1.Repository.Mode|keyof typeof google.devtools.artifactregistry.v1.Repository.Mode|null); - - /** Repository cleanupPolicies */ - cleanupPolicies?: ({ [k: string]: google.devtools.artifactregistry.v1.ICleanupPolicy }|null); - - /** Repository sizeBytes */ - sizeBytes?: (number|Long|string|null); - - /** Repository satisfiesPzs */ - satisfiesPzs?: (boolean|null); - - /** Repository cleanupPolicyDryRun */ - cleanupPolicyDryRun?: (boolean|null); - - /** Repository vulnerabilityScanningConfig */ - vulnerabilityScanningConfig?: (google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig|null); - - /** Repository disallowUnspecifiedMode */ - disallowUnspecifiedMode?: (boolean|null); - - /** Repository satisfiesPzi */ - satisfiesPzi?: (boolean|null); - - /** Repository registryUri */ - registryUri?: (string|null); - } - - /** Represents a Repository. */ - class Repository implements IRepository { - - /** - * Constructs a new Repository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IRepository); - - /** Repository mavenConfig. */ - public mavenConfig?: (google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig|null); - - /** Repository dockerConfig. */ - public dockerConfig?: (google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig|null); - - /** Repository virtualRepositoryConfig. */ - public virtualRepositoryConfig?: (google.devtools.artifactregistry.v1.IVirtualRepositoryConfig|null); - - /** Repository remoteRepositoryConfig. */ - public remoteRepositoryConfig?: (google.devtools.artifactregistry.v1.IRemoteRepositoryConfig|null); - - /** Repository name. */ - public name: string; - - /** Repository format. */ - public format: (google.devtools.artifactregistry.v1.Repository.Format|keyof typeof google.devtools.artifactregistry.v1.Repository.Format); - - /** Repository description. */ - public description: string; - - /** Repository labels. */ - public labels: { [k: string]: string }; - - /** Repository createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Repository updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Repository kmsKeyName. */ - public kmsKeyName: string; - - /** Repository mode. */ - public mode: (google.devtools.artifactregistry.v1.Repository.Mode|keyof typeof google.devtools.artifactregistry.v1.Repository.Mode); - - /** Repository cleanupPolicies. */ - public cleanupPolicies: { [k: string]: google.devtools.artifactregistry.v1.ICleanupPolicy }; - - /** Repository sizeBytes. */ - public sizeBytes: (number|Long|string); - - /** Repository satisfiesPzs. */ - public satisfiesPzs: boolean; - - /** Repository cleanupPolicyDryRun. */ - public cleanupPolicyDryRun: boolean; - - /** Repository vulnerabilityScanningConfig. */ - public vulnerabilityScanningConfig?: (google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig|null); - - /** Repository disallowUnspecifiedMode. */ - public disallowUnspecifiedMode: boolean; - - /** Repository satisfiesPzi. */ - public satisfiesPzi: boolean; - - /** Repository registryUri. */ - public registryUri: string; - - /** Repository formatConfig. */ - public formatConfig?: ("mavenConfig"|"dockerConfig"); - - /** Repository modeConfig. */ - public modeConfig?: ("virtualRepositoryConfig"|"remoteRepositoryConfig"); - - /** - * Creates a new Repository instance using the specified properties. - * @param [properties] Properties to set - * @returns Repository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IRepository): google.devtools.artifactregistry.v1.Repository; - - /** - * Encodes the specified Repository message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. - * @param message Repository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. - * @param message Repository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Repository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Repository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Repository; - - /** - * Decodes a Repository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Repository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Repository; - - /** - * Verifies a Repository message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Repository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Repository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Repository; - - /** - * Creates a plain object from a Repository message. Also converts values to other types if specified. - * @param message Repository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.Repository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Repository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Repository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Repository { - - /** Properties of a MavenRepositoryConfig. */ - interface IMavenRepositoryConfig { - - /** MavenRepositoryConfig allowSnapshotOverwrites */ - allowSnapshotOverwrites?: (boolean|null); - - /** MavenRepositoryConfig versionPolicy */ - versionPolicy?: (google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy|keyof typeof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy|null); - } - - /** Represents a MavenRepositoryConfig. */ - class MavenRepositoryConfig implements IMavenRepositoryConfig { - - /** - * Constructs a new MavenRepositoryConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig); - - /** MavenRepositoryConfig allowSnapshotOverwrites. */ - public allowSnapshotOverwrites: boolean; - - /** MavenRepositoryConfig versionPolicy. */ - public versionPolicy: (google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy|keyof typeof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy); - - /** - * Creates a new MavenRepositoryConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MavenRepositoryConfig instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig): google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig; - - /** - * Encodes the specified MavenRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify|verify} messages. - * @param message MavenRepositoryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MavenRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify|verify} messages. - * @param message MavenRepositoryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MavenRepositoryConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MavenRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig; - - /** - * Decodes a MavenRepositoryConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MavenRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig; - - /** - * Verifies a MavenRepositoryConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MavenRepositoryConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MavenRepositoryConfig - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig; - - /** - * Creates a plain object from a MavenRepositoryConfig message. Also converts values to other types if specified. - * @param message MavenRepositoryConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MavenRepositoryConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MavenRepositoryConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MavenRepositoryConfig { - - /** VersionPolicy enum. */ - enum VersionPolicy { - VERSION_POLICY_UNSPECIFIED = 0, - RELEASE = 1, - SNAPSHOT = 2 - } - } - - /** Properties of a DockerRepositoryConfig. */ - interface IDockerRepositoryConfig { - - /** DockerRepositoryConfig immutableTags */ - immutableTags?: (boolean|null); - } - - /** Represents a DockerRepositoryConfig. */ - class DockerRepositoryConfig implements IDockerRepositoryConfig { - - /** - * Constructs a new DockerRepositoryConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig); - - /** DockerRepositoryConfig immutableTags. */ - public immutableTags: boolean; - - /** - * Creates a new DockerRepositoryConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DockerRepositoryConfig instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig): google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig; - - /** - * Encodes the specified DockerRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.verify|verify} messages. - * @param message DockerRepositoryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DockerRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.verify|verify} messages. - * @param message DockerRepositoryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DockerRepositoryConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DockerRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig; - - /** - * Decodes a DockerRepositoryConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DockerRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig; - - /** - * Verifies a DockerRepositoryConfig 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 DockerRepositoryConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DockerRepositoryConfig - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig; - - /** - * Creates a plain object from a DockerRepositoryConfig message. Also converts values to other types if specified. - * @param message DockerRepositoryConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DockerRepositoryConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DockerRepositoryConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VulnerabilityScanningConfig. */ - interface IVulnerabilityScanningConfig { - - /** VulnerabilityScanningConfig enablementConfig */ - enablementConfig?: (google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig|keyof typeof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig|null); - - /** VulnerabilityScanningConfig lastEnableTime */ - lastEnableTime?: (google.protobuf.ITimestamp|null); - - /** VulnerabilityScanningConfig enablementState */ - enablementState?: (google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState|keyof typeof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState|null); - - /** VulnerabilityScanningConfig enablementStateReason */ - enablementStateReason?: (string|null); - } - - /** Represents a VulnerabilityScanningConfig. */ - class VulnerabilityScanningConfig implements IVulnerabilityScanningConfig { - - /** - * Constructs a new VulnerabilityScanningConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig); - - /** VulnerabilityScanningConfig enablementConfig. */ - public enablementConfig: (google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig|keyof typeof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig); - - /** VulnerabilityScanningConfig lastEnableTime. */ - public lastEnableTime?: (google.protobuf.ITimestamp|null); - - /** VulnerabilityScanningConfig enablementState. */ - public enablementState: (google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState|keyof typeof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState); - - /** VulnerabilityScanningConfig enablementStateReason. */ - public enablementStateReason: string; - - /** - * Creates a new VulnerabilityScanningConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns VulnerabilityScanningConfig instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig): google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig; - - /** - * Encodes the specified VulnerabilityScanningConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.verify|verify} messages. - * @param message VulnerabilityScanningConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VulnerabilityScanningConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.verify|verify} messages. - * @param message VulnerabilityScanningConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VulnerabilityScanningConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VulnerabilityScanningConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig; - - /** - * Decodes a VulnerabilityScanningConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VulnerabilityScanningConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig; - - /** - * Verifies a VulnerabilityScanningConfig 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 VulnerabilityScanningConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VulnerabilityScanningConfig - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig; - - /** - * Creates a plain object from a VulnerabilityScanningConfig message. Also converts values to other types if specified. - * @param message VulnerabilityScanningConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VulnerabilityScanningConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VulnerabilityScanningConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace VulnerabilityScanningConfig { - - /** EnablementConfig enum. */ - enum EnablementConfig { - ENABLEMENT_CONFIG_UNSPECIFIED = 0, - INHERITED = 1, - DISABLED = 2 - } - - /** EnablementState enum. */ - enum EnablementState { - ENABLEMENT_STATE_UNSPECIFIED = 0, - SCANNING_UNSUPPORTED = 1, - SCANNING_DISABLED = 2, - SCANNING_ACTIVE = 3 - } - } - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - DOCKER = 1, - MAVEN = 2, - NPM = 3, - APT = 5, - YUM = 6, - PYTHON = 8, - KFP = 9, - GO = 10, - GENERIC = 11, - RUBY = 12 - } - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - STANDARD_REPOSITORY = 1, - VIRTUAL_REPOSITORY = 2, - REMOTE_REPOSITORY = 3 - } - } - - /** Properties of a ListRepositoriesRequest. */ - interface IListRepositoriesRequest { - - /** ListRepositoriesRequest parent */ - parent?: (string|null); - - /** ListRepositoriesRequest pageSize */ - pageSize?: (number|null); - - /** ListRepositoriesRequest pageToken */ - pageToken?: (string|null); - - /** ListRepositoriesRequest filter */ - filter?: (string|null); - - /** ListRepositoriesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListRepositoriesRequest. */ - class ListRepositoriesRequest implements IListRepositoriesRequest { - - /** - * Constructs a new ListRepositoriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListRepositoriesRequest); - - /** ListRepositoriesRequest parent. */ - public parent: string; - - /** ListRepositoriesRequest pageSize. */ - public pageSize: number; - - /** ListRepositoriesRequest pageToken. */ - public pageToken: string; - - /** ListRepositoriesRequest filter. */ - public filter: string; - - /** ListRepositoriesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListRepositoriesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListRepositoriesRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListRepositoriesRequest): google.devtools.artifactregistry.v1.ListRepositoriesRequest; - - /** - * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. - * @param message ListRepositoriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. - * @param message ListRepositoriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListRepositoriesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListRepositoriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListRepositoriesRequest; - - /** - * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListRepositoriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListRepositoriesRequest; - - /** - * Verifies a ListRepositoriesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListRepositoriesRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListRepositoriesRequest; - - /** - * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. - * @param message ListRepositoriesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListRepositoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListRepositoriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListRepositoriesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListRepositoriesResponse. */ - interface IListRepositoriesResponse { - - /** ListRepositoriesResponse repositories */ - repositories?: (google.devtools.artifactregistry.v1.IRepository[]|null); - - /** ListRepositoriesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListRepositoriesResponse. */ - class ListRepositoriesResponse implements IListRepositoriesResponse { - - /** - * Constructs a new ListRepositoriesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListRepositoriesResponse); - - /** ListRepositoriesResponse repositories. */ - public repositories: google.devtools.artifactregistry.v1.IRepository[]; - - /** ListRepositoriesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListRepositoriesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListRepositoriesResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListRepositoriesResponse): google.devtools.artifactregistry.v1.ListRepositoriesResponse; - - /** - * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. - * @param message ListRepositoriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. - * @param message ListRepositoriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListRepositoriesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListRepositoriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListRepositoriesResponse; - - /** - * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListRepositoriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListRepositoriesResponse; - - /** - * Verifies a ListRepositoriesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListRepositoriesResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListRepositoriesResponse; - - /** - * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. - * @param message ListRepositoriesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListRepositoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListRepositoriesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListRepositoriesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetRepositoryRequest. */ - interface IGetRepositoryRequest { - - /** GetRepositoryRequest name */ - name?: (string|null); - } - - /** Represents a GetRepositoryRequest. */ - class GetRepositoryRequest implements IGetRepositoryRequest { - - /** - * Constructs a new GetRepositoryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGetRepositoryRequest); - - /** GetRepositoryRequest name. */ - public name: string; - - /** - * Creates a new GetRepositoryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetRepositoryRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGetRepositoryRequest): google.devtools.artifactregistry.v1.GetRepositoryRequest; - - /** - * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. - * @param message GetRepositoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. - * @param message GetRepositoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetRepositoryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetRepositoryRequest; - - /** - * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetRepositoryRequest; - - /** - * Verifies a GetRepositoryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetRepositoryRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetRepositoryRequest; - - /** - * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. - * @param message GetRepositoryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GetRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetRepositoryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetRepositoryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateRepositoryRequest. */ - interface ICreateRepositoryRequest { - - /** CreateRepositoryRequest parent */ - parent?: (string|null); - - /** CreateRepositoryRequest repositoryId */ - repositoryId?: (string|null); - - /** CreateRepositoryRequest repository */ - repository?: (google.devtools.artifactregistry.v1.IRepository|null); - } - - /** Represents a CreateRepositoryRequest. */ - class CreateRepositoryRequest implements ICreateRepositoryRequest { - - /** - * Constructs a new CreateRepositoryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.ICreateRepositoryRequest); - - /** CreateRepositoryRequest parent. */ - public parent: string; - - /** CreateRepositoryRequest repositoryId. */ - public repositoryId: string; - - /** CreateRepositoryRequest repository. */ - public repository?: (google.devtools.artifactregistry.v1.IRepository|null); - - /** - * Creates a new CreateRepositoryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateRepositoryRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.ICreateRepositoryRequest): google.devtools.artifactregistry.v1.CreateRepositoryRequest; - - /** - * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRepositoryRequest.verify|verify} messages. - * @param message CreateRepositoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRepositoryRequest.verify|verify} messages. - * @param message CreateRepositoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateRepositoryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.CreateRepositoryRequest; - - /** - * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.CreateRepositoryRequest; - - /** - * Verifies a CreateRepositoryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateRepositoryRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CreateRepositoryRequest; - - /** - * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. - * @param message CreateRepositoryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.CreateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateRepositoryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateRepositoryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateRepositoryRequest. */ - interface IUpdateRepositoryRequest { - - /** UpdateRepositoryRequest repository */ - repository?: (google.devtools.artifactregistry.v1.IRepository|null); - - /** UpdateRepositoryRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateRepositoryRequest. */ - class UpdateRepositoryRequest implements IUpdateRepositoryRequest { - - /** - * Constructs a new UpdateRepositoryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest); - - /** UpdateRepositoryRequest repository. */ - public repository?: (google.devtools.artifactregistry.v1.IRepository|null); - - /** UpdateRepositoryRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateRepositoryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateRepositoryRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest): google.devtools.artifactregistry.v1.UpdateRepositoryRequest; - - /** - * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRepositoryRequest.verify|verify} messages. - * @param message UpdateRepositoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRepositoryRequest.verify|verify} messages. - * @param message UpdateRepositoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdateRepositoryRequest; - - /** - * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdateRepositoryRequest; - - /** - * Verifies an UpdateRepositoryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateRepositoryRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateRepositoryRequest; - - /** - * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. - * @param message UpdateRepositoryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.UpdateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateRepositoryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateRepositoryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteRepositoryRequest. */ - interface IDeleteRepositoryRequest { - - /** DeleteRepositoryRequest name */ - name?: (string|null); - } - - /** Represents a DeleteRepositoryRequest. */ - class DeleteRepositoryRequest implements IDeleteRepositoryRequest { - - /** - * Constructs a new DeleteRepositoryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest); - - /** DeleteRepositoryRequest name. */ - public name: string; - - /** - * Creates a new DeleteRepositoryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteRepositoryRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest): google.devtools.artifactregistry.v1.DeleteRepositoryRequest; - - /** - * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRepositoryRequest.verify|verify} messages. - * @param message DeleteRepositoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRepositoryRequest.verify|verify} messages. - * @param message DeleteRepositoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DeleteRepositoryRequest; - - /** - * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DeleteRepositoryRequest; - - /** - * Verifies a DeleteRepositoryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteRepositoryRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteRepositoryRequest; - - /** - * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. - * @param message DeleteRepositoryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.DeleteRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteRepositoryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteRepositoryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Rule. */ - interface IRule { - - /** Rule name */ - name?: (string|null); - - /** Rule action */ - action?: (google.devtools.artifactregistry.v1.Rule.Action|keyof typeof google.devtools.artifactregistry.v1.Rule.Action|null); - - /** Rule operation */ - operation?: (google.devtools.artifactregistry.v1.Rule.Operation|keyof typeof google.devtools.artifactregistry.v1.Rule.Operation|null); - - /** Rule condition */ - condition?: (google.type.IExpr|null); - - /** Rule packageId */ - packageId?: (string|null); - } - - /** Represents a Rule. */ - class Rule implements IRule { - - /** - * Constructs a new Rule. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IRule); - - /** Rule name. */ - public name: string; - - /** Rule action. */ - public action: (google.devtools.artifactregistry.v1.Rule.Action|keyof typeof google.devtools.artifactregistry.v1.Rule.Action); - - /** Rule operation. */ - public operation: (google.devtools.artifactregistry.v1.Rule.Operation|keyof typeof google.devtools.artifactregistry.v1.Rule.Operation); - - /** Rule condition. */ - public condition?: (google.type.IExpr|null); - - /** Rule packageId. */ - public packageId: string; - - /** - * Creates a new Rule instance using the specified properties. - * @param [properties] Properties to set - * @returns Rule instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IRule): google.devtools.artifactregistry.v1.Rule; - - /** - * Encodes the specified Rule message. Does not implicitly {@link google.devtools.artifactregistry.v1.Rule.verify|verify} messages. - * @param message Rule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Rule message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Rule.verify|verify} messages. - * @param message Rule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Rule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.Rule; - - /** - * Decodes a Rule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.Rule; - - /** - * Verifies a Rule 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 Rule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Rule - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Rule; - - /** - * Creates a plain object from a Rule message. Also converts values to other types if specified. - * @param message Rule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.Rule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Rule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Rule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Rule { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ALLOW = 1, - DENY = 2 - } - - /** Operation enum. */ - enum Operation { - OPERATION_UNSPECIFIED = 0, - DOWNLOAD = 1 - } - } - - /** Properties of a ListRulesRequest. */ - interface IListRulesRequest { - - /** ListRulesRequest parent */ - parent?: (string|null); - - /** ListRulesRequest pageSize */ - pageSize?: (number|null); - - /** ListRulesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListRulesRequest. */ - class ListRulesRequest implements IListRulesRequest { - - /** - * Constructs a new ListRulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListRulesRequest); - - /** ListRulesRequest parent. */ - public parent: string; - - /** ListRulesRequest pageSize. */ - public pageSize: number; - - /** ListRulesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListRulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListRulesRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListRulesRequest): google.devtools.artifactregistry.v1.ListRulesRequest; - - /** - * Encodes the specified ListRulesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesRequest.verify|verify} messages. - * @param message ListRulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListRulesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesRequest.verify|verify} messages. - * @param message ListRulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListRulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListRulesRequest; - - /** - * Decodes a ListRulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListRulesRequest; - - /** - * Verifies a ListRulesRequest 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 ListRulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListRulesRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListRulesRequest; - - /** - * Creates a plain object from a ListRulesRequest message. Also converts values to other types if specified. - * @param message ListRulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListRulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListRulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListRulesResponse. */ - interface IListRulesResponse { - - /** ListRulesResponse rules */ - rules?: (google.devtools.artifactregistry.v1.IRule[]|null); - - /** ListRulesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListRulesResponse. */ - class ListRulesResponse implements IListRulesResponse { - - /** - * Constructs a new ListRulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IListRulesResponse); - - /** ListRulesResponse rules. */ - public rules: google.devtools.artifactregistry.v1.IRule[]; - - /** ListRulesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListRulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListRulesResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IListRulesResponse): google.devtools.artifactregistry.v1.ListRulesResponse; - - /** - * Encodes the specified ListRulesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesResponse.verify|verify} messages. - * @param message ListRulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IListRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListRulesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesResponse.verify|verify} messages. - * @param message ListRulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListRulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ListRulesResponse; - - /** - * Decodes a ListRulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ListRulesResponse; - - /** - * Verifies a ListRulesResponse 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 ListRulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListRulesResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListRulesResponse; - - /** - * Creates a plain object from a ListRulesResponse message. Also converts values to other types if specified. - * @param message ListRulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ListRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListRulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListRulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetRuleRequest. */ - interface IGetRuleRequest { - - /** GetRuleRequest name */ - name?: (string|null); - } - - /** Represents a GetRuleRequest. */ - class GetRuleRequest implements IGetRuleRequest { - - /** - * Constructs a new GetRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGetRuleRequest); - - /** GetRuleRequest name. */ - public name: string; - - /** - * Creates a new GetRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetRuleRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGetRuleRequest): google.devtools.artifactregistry.v1.GetRuleRequest; - - /** - * Encodes the specified GetRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRuleRequest.verify|verify} messages. - * @param message GetRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGetRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRuleRequest.verify|verify} messages. - * @param message GetRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetRuleRequest; - - /** - * Decodes a GetRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetRuleRequest; - - /** - * Verifies a GetRuleRequest 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 GetRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetRuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetRuleRequest; - - /** - * Creates a plain object from a GetRuleRequest message. Also converts values to other types if specified. - * @param message GetRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GetRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateRuleRequest. */ - interface ICreateRuleRequest { - - /** CreateRuleRequest parent */ - parent?: (string|null); - - /** CreateRuleRequest ruleId */ - ruleId?: (string|null); - - /** CreateRuleRequest rule */ - rule?: (google.devtools.artifactregistry.v1.IRule|null); - } - - /** Represents a CreateRuleRequest. */ - class CreateRuleRequest implements ICreateRuleRequest { - - /** - * Constructs a new CreateRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.ICreateRuleRequest); - - /** CreateRuleRequest parent. */ - public parent: string; - - /** CreateRuleRequest ruleId. */ - public ruleId: string; - - /** CreateRuleRequest rule. */ - public rule?: (google.devtools.artifactregistry.v1.IRule|null); - - /** - * Creates a new CreateRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateRuleRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.ICreateRuleRequest): google.devtools.artifactregistry.v1.CreateRuleRequest; - - /** - * Encodes the specified CreateRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRuleRequest.verify|verify} messages. - * @param message CreateRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.ICreateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRuleRequest.verify|verify} messages. - * @param message CreateRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICreateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.CreateRuleRequest; - - /** - * Decodes a CreateRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.CreateRuleRequest; - - /** - * Verifies a CreateRuleRequest 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 CreateRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateRuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CreateRuleRequest; - - /** - * Creates a plain object from a CreateRuleRequest message. Also converts values to other types if specified. - * @param message CreateRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.CreateRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateRuleRequest. */ - interface IUpdateRuleRequest { - - /** UpdateRuleRequest rule */ - rule?: (google.devtools.artifactregistry.v1.IRule|null); - - /** UpdateRuleRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateRuleRequest. */ - class UpdateRuleRequest implements IUpdateRuleRequest { - - /** - * Constructs a new UpdateRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IUpdateRuleRequest); - - /** UpdateRuleRequest rule. */ - public rule?: (google.devtools.artifactregistry.v1.IRule|null); - - /** UpdateRuleRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateRuleRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IUpdateRuleRequest): google.devtools.artifactregistry.v1.UpdateRuleRequest; - - /** - * Encodes the specified UpdateRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRuleRequest.verify|verify} messages. - * @param message UpdateRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IUpdateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRuleRequest.verify|verify} messages. - * @param message UpdateRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdateRuleRequest; - - /** - * Decodes an UpdateRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdateRuleRequest; - - /** - * Verifies an UpdateRuleRequest 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 UpdateRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateRuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateRuleRequest; - - /** - * Creates a plain object from an UpdateRuleRequest message. Also converts values to other types if specified. - * @param message UpdateRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.UpdateRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteRuleRequest. */ - interface IDeleteRuleRequest { - - /** DeleteRuleRequest name */ - name?: (string|null); - } - - /** Represents a DeleteRuleRequest. */ - class DeleteRuleRequest implements IDeleteRuleRequest { - - /** - * Constructs a new DeleteRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IDeleteRuleRequest); - - /** DeleteRuleRequest name. */ - public name: string; - - /** - * Creates a new DeleteRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteRuleRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IDeleteRuleRequest): google.devtools.artifactregistry.v1.DeleteRuleRequest; - - /** - * Encodes the specified DeleteRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRuleRequest.verify|verify} messages. - * @param message DeleteRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IDeleteRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRuleRequest.verify|verify} messages. - * @param message DeleteRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.DeleteRuleRequest; - - /** - * Decodes a DeleteRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.DeleteRuleRequest; - - /** - * Verifies a DeleteRuleRequest 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 DeleteRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteRuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteRuleRequest; - - /** - * Creates a plain object from a DeleteRuleRequest message. Also converts values to other types if specified. - * @param message DeleteRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.DeleteRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents an ArtifactRegistry */ - class ArtifactRegistry extends $protobuf.rpc.Service { - - /** - * Constructs a new ArtifactRegistry service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new ArtifactRegistry service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ArtifactRegistry; - - /** - * Calls ListDockerImages. - * @param request ListDockerImagesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDockerImagesResponse - */ - public listDockerImages(request: google.devtools.artifactregistry.v1.IListDockerImagesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImagesCallback): void; - - /** - * Calls ListDockerImages. - * @param request ListDockerImagesRequest message or plain object - * @returns Promise - */ - public listDockerImages(request: google.devtools.artifactregistry.v1.IListDockerImagesRequest): Promise; - - /** - * Calls GetDockerImage. - * @param request GetDockerImageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DockerImage - */ - public getDockerImage(request: google.devtools.artifactregistry.v1.IGetDockerImageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImageCallback): void; - - /** - * Calls GetDockerImage. - * @param request GetDockerImageRequest message or plain object - * @returns Promise - */ - public getDockerImage(request: google.devtools.artifactregistry.v1.IGetDockerImageRequest): Promise; - - /** - * Calls ListMavenArtifacts. - * @param request ListMavenArtifactsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMavenArtifactsResponse - */ - public listMavenArtifacts(request: google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListMavenArtifactsCallback): void; - - /** - * Calls ListMavenArtifacts. - * @param request ListMavenArtifactsRequest message or plain object - * @returns Promise - */ - public listMavenArtifacts(request: google.devtools.artifactregistry.v1.IListMavenArtifactsRequest): Promise; - - /** - * Calls GetMavenArtifact. - * @param request GetMavenArtifactRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MavenArtifact - */ - public getMavenArtifact(request: google.devtools.artifactregistry.v1.IGetMavenArtifactRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetMavenArtifactCallback): void; - - /** - * Calls GetMavenArtifact. - * @param request GetMavenArtifactRequest message or plain object - * @returns Promise - */ - public getMavenArtifact(request: google.devtools.artifactregistry.v1.IGetMavenArtifactRequest): Promise; - - /** - * Calls ListNpmPackages. - * @param request ListNpmPackagesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListNpmPackagesResponse - */ - public listNpmPackages(request: google.devtools.artifactregistry.v1.IListNpmPackagesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListNpmPackagesCallback): void; - - /** - * Calls ListNpmPackages. - * @param request ListNpmPackagesRequest message or plain object - * @returns Promise - */ - public listNpmPackages(request: google.devtools.artifactregistry.v1.IListNpmPackagesRequest): Promise; - - /** - * Calls GetNpmPackage. - * @param request GetNpmPackageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and NpmPackage - */ - public getNpmPackage(request: google.devtools.artifactregistry.v1.IGetNpmPackageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetNpmPackageCallback): void; - - /** - * Calls GetNpmPackage. - * @param request GetNpmPackageRequest message or plain object - * @returns Promise - */ - public getNpmPackage(request: google.devtools.artifactregistry.v1.IGetNpmPackageRequest): Promise; - - /** - * Calls ListPythonPackages. - * @param request ListPythonPackagesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPythonPackagesResponse - */ - public listPythonPackages(request: google.devtools.artifactregistry.v1.IListPythonPackagesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListPythonPackagesCallback): void; - - /** - * Calls ListPythonPackages. - * @param request ListPythonPackagesRequest message or plain object - * @returns Promise - */ - public listPythonPackages(request: google.devtools.artifactregistry.v1.IListPythonPackagesRequest): Promise; - - /** - * Calls GetPythonPackage. - * @param request GetPythonPackageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PythonPackage - */ - public getPythonPackage(request: google.devtools.artifactregistry.v1.IGetPythonPackageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetPythonPackageCallback): void; - - /** - * Calls GetPythonPackage. - * @param request GetPythonPackageRequest message or plain object - * @returns Promise - */ - public getPythonPackage(request: google.devtools.artifactregistry.v1.IGetPythonPackageRequest): Promise; - - /** - * Calls ImportAptArtifacts. - * @param request ImportAptArtifactsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public importAptArtifacts(request: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifactsCallback): void; - - /** - * Calls ImportAptArtifacts. - * @param request ImportAptArtifactsRequest message or plain object - * @returns Promise - */ - public importAptArtifacts(request: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest): Promise; - - /** - * Calls ImportYumArtifacts. - * @param request ImportYumArtifactsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public importYumArtifacts(request: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifactsCallback): void; - - /** - * Calls ImportYumArtifacts. - * @param request ImportYumArtifactsRequest message or plain object - * @returns Promise - */ - public importYumArtifacts(request: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest): Promise; - - /** - * Calls ListRepositories. - * @param request ListRepositoriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListRepositoriesResponse - */ - public listRepositories(request: google.devtools.artifactregistry.v1.IListRepositoriesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositoriesCallback): void; - - /** - * Calls ListRepositories. - * @param request ListRepositoriesRequest message or plain object - * @returns Promise - */ - public listRepositories(request: google.devtools.artifactregistry.v1.IListRepositoriesRequest): Promise; - - /** - * Calls GetRepository. - * @param request GetRepositoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Repository - */ - public getRepository(request: google.devtools.artifactregistry.v1.IGetRepositoryRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepositoryCallback): void; - - /** - * Calls GetRepository. - * @param request GetRepositoryRequest message or plain object - * @returns Promise - */ - public getRepository(request: google.devtools.artifactregistry.v1.IGetRepositoryRequest): Promise; - - /** - * Calls CreateRepository. - * @param request CreateRepositoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createRepository(request: google.devtools.artifactregistry.v1.ICreateRepositoryRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepositoryCallback): void; - - /** - * Calls CreateRepository. - * @param request CreateRepositoryRequest message or plain object - * @returns Promise - */ - public createRepository(request: google.devtools.artifactregistry.v1.ICreateRepositoryRequest): Promise; - - /** - * Calls UpdateRepository. - * @param request UpdateRepositoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Repository - */ - public updateRepository(request: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepositoryCallback): void; - - /** - * Calls UpdateRepository. - * @param request UpdateRepositoryRequest message or plain object - * @returns Promise - */ - public updateRepository(request: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest): Promise; - - /** - * Calls DeleteRepository. - * @param request DeleteRepositoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteRepository(request: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepositoryCallback): void; - - /** - * Calls DeleteRepository. - * @param request DeleteRepositoryRequest message or plain object - * @returns Promise - */ - public deleteRepository(request: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest): Promise; - - /** - * Calls ListPackages. - * @param request ListPackagesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPackagesResponse - */ - public listPackages(request: google.devtools.artifactregistry.v1.IListPackagesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackagesCallback): void; - - /** - * Calls ListPackages. - * @param request ListPackagesRequest message or plain object - * @returns Promise - */ - public listPackages(request: google.devtools.artifactregistry.v1.IListPackagesRequest): Promise; - - /** - * Calls GetPackage. - * @param request GetPackageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Package - */ - public getPackage(request: google.devtools.artifactregistry.v1.IGetPackageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackageCallback): void; - - /** - * Calls GetPackage. - * @param request GetPackageRequest message or plain object - * @returns Promise - */ - public getPackage(request: google.devtools.artifactregistry.v1.IGetPackageRequest): Promise; - - /** - * Calls DeletePackage. - * @param request DeletePackageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deletePackage(request: google.devtools.artifactregistry.v1.IDeletePackageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackageCallback): void; - - /** - * Calls DeletePackage. - * @param request DeletePackageRequest message or plain object - * @returns Promise - */ - public deletePackage(request: google.devtools.artifactregistry.v1.IDeletePackageRequest): Promise; - - /** - * Calls ListVersions. - * @param request ListVersionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListVersionsResponse - */ - public listVersions(request: google.devtools.artifactregistry.v1.IListVersionsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersionsCallback): void; - - /** - * Calls ListVersions. - * @param request ListVersionsRequest message or plain object - * @returns Promise - */ - public listVersions(request: google.devtools.artifactregistry.v1.IListVersionsRequest): Promise; - - /** - * Calls GetVersion. - * @param request GetVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Version - */ - public getVersion(request: google.devtools.artifactregistry.v1.IGetVersionRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersionCallback): void; - - /** - * Calls GetVersion. - * @param request GetVersionRequest message or plain object - * @returns Promise - */ - public getVersion(request: google.devtools.artifactregistry.v1.IGetVersionRequest): Promise; - - /** - * Calls DeleteVersion. - * @param request DeleteVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteVersion(request: google.devtools.artifactregistry.v1.IDeleteVersionRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersionCallback): void; - - /** - * Calls DeleteVersion. - * @param request DeleteVersionRequest message or plain object - * @returns Promise - */ - public deleteVersion(request: google.devtools.artifactregistry.v1.IDeleteVersionRequest): Promise; - - /** - * Calls BatchDeleteVersions. - * @param request BatchDeleteVersionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public batchDeleteVersions(request: google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.BatchDeleteVersionsCallback): void; - - /** - * Calls BatchDeleteVersions. - * @param request BatchDeleteVersionsRequest message or plain object - * @returns Promise - */ - public batchDeleteVersions(request: google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest): Promise; - - /** - * Calls UpdateVersion. - * @param request UpdateVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Version - */ - public updateVersion(request: google.devtools.artifactregistry.v1.IUpdateVersionRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVersionCallback): void; - - /** - * Calls UpdateVersion. - * @param request UpdateVersionRequest message or plain object - * @returns Promise - */ - public updateVersion(request: google.devtools.artifactregistry.v1.IUpdateVersionRequest): Promise; - - /** - * Calls ListFiles. - * @param request ListFilesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFilesResponse - */ - public listFiles(request: google.devtools.artifactregistry.v1.IListFilesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListFilesCallback): void; - - /** - * Calls ListFiles. - * @param request ListFilesRequest message or plain object - * @returns Promise - */ - public listFiles(request: google.devtools.artifactregistry.v1.IListFilesRequest): Promise; - - /** - * Calls GetFile. - * @param request GetFileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and File - */ - public getFile(request: google.devtools.artifactregistry.v1.IGetFileRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetFileCallback): void; - - /** - * Calls GetFile. - * @param request GetFileRequest message or plain object - * @returns Promise - */ - public getFile(request: google.devtools.artifactregistry.v1.IGetFileRequest): Promise; - - /** - * Calls DeleteFile. - * @param request DeleteFileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteFile(request: google.devtools.artifactregistry.v1.IDeleteFileRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteFileCallback): void; - - /** - * Calls DeleteFile. - * @param request DeleteFileRequest message or plain object - * @returns Promise - */ - public deleteFile(request: google.devtools.artifactregistry.v1.IDeleteFileRequest): Promise; - - /** - * Calls UpdateFile. - * @param request UpdateFileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and File - */ - public updateFile(request: google.devtools.artifactregistry.v1.IUpdateFileRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateFileCallback): void; - - /** - * Calls UpdateFile. - * @param request UpdateFileRequest message or plain object - * @returns Promise - */ - public updateFile(request: google.devtools.artifactregistry.v1.IUpdateFileRequest): Promise; - - /** - * Calls ListTags. - * @param request ListTagsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTagsResponse - */ - public listTags(request: google.devtools.artifactregistry.v1.IListTagsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListTagsCallback): void; - - /** - * Calls ListTags. - * @param request ListTagsRequest message or plain object - * @returns Promise - */ - public listTags(request: google.devtools.artifactregistry.v1.IListTagsRequest): Promise; - - /** - * Calls GetTag. - * @param request GetTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Tag - */ - public getTag(request: google.devtools.artifactregistry.v1.IGetTagRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetTagCallback): void; - - /** - * Calls GetTag. - * @param request GetTagRequest message or plain object - * @returns Promise - */ - public getTag(request: google.devtools.artifactregistry.v1.IGetTagRequest): Promise; - - /** - * Calls CreateTag. - * @param request CreateTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Tag - */ - public createTag(request: google.devtools.artifactregistry.v1.ICreateTagRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTagCallback): void; - - /** - * Calls CreateTag. - * @param request CreateTagRequest message or plain object - * @returns Promise - */ - public createTag(request: google.devtools.artifactregistry.v1.ICreateTagRequest): Promise; - - /** - * Calls UpdateTag. - * @param request UpdateTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Tag - */ - public updateTag(request: google.devtools.artifactregistry.v1.IUpdateTagRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTagCallback): void; - - /** - * Calls UpdateTag. - * @param request UpdateTagRequest message or plain object - * @returns Promise - */ - public updateTag(request: google.devtools.artifactregistry.v1.IUpdateTagRequest): Promise; - - /** - * Calls DeleteTag. - * @param request DeleteTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteTag(request: google.devtools.artifactregistry.v1.IDeleteTagRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTagCallback): void; - - /** - * Calls DeleteTag. - * @param request DeleteTagRequest message or plain object - * @returns Promise - */ - public deleteTag(request: google.devtools.artifactregistry.v1.IDeleteTagRequest): Promise; - - /** - * Calls CreateRule. - * @param request CreateRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Rule - */ - public createRule(request: google.devtools.artifactregistry.v1.ICreateRuleRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRuleCallback): void; - - /** - * Calls CreateRule. - * @param request CreateRuleRequest message or plain object - * @returns Promise - */ - public createRule(request: google.devtools.artifactregistry.v1.ICreateRuleRequest): Promise; - - /** - * Calls ListRules. - * @param request ListRulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListRulesResponse - */ - public listRules(request: google.devtools.artifactregistry.v1.IListRulesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListRulesCallback): void; - - /** - * Calls ListRules. - * @param request ListRulesRequest message or plain object - * @returns Promise - */ - public listRules(request: google.devtools.artifactregistry.v1.IListRulesRequest): Promise; - - /** - * Calls GetRule. - * @param request GetRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Rule - */ - public getRule(request: google.devtools.artifactregistry.v1.IGetRuleRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetRuleCallback): void; - - /** - * Calls GetRule. - * @param request GetRuleRequest message or plain object - * @returns Promise - */ - public getRule(request: google.devtools.artifactregistry.v1.IGetRuleRequest): Promise; - - /** - * Calls UpdateRule. - * @param request UpdateRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Rule - */ - public updateRule(request: google.devtools.artifactregistry.v1.IUpdateRuleRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRuleCallback): void; - - /** - * Calls UpdateRule. - * @param request UpdateRuleRequest message or plain object - * @returns Promise - */ - public updateRule(request: google.devtools.artifactregistry.v1.IUpdateRuleRequest): Promise; - - /** - * Calls DeleteRule. - * @param request DeleteRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteRule(request: google.devtools.artifactregistry.v1.IDeleteRuleRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRuleCallback): void; - - /** - * Calls DeleteRule. - * @param request DeleteRuleRequest message or plain object - * @returns Promise - */ - public deleteRule(request: google.devtools.artifactregistry.v1.IDeleteRuleRequest): Promise; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicyCallback): void; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicyCallback): void; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissionsCallback): void; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - - /** - * Calls GetProjectSettings. - * @param request GetProjectSettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ProjectSettings - */ - public getProjectSettings(request: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettingsCallback): void; - - /** - * Calls GetProjectSettings. - * @param request GetProjectSettingsRequest message or plain object - * @returns Promise - */ - public getProjectSettings(request: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest): Promise; - - /** - * Calls UpdateProjectSettings. - * @param request UpdateProjectSettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ProjectSettings - */ - public updateProjectSettings(request: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettingsCallback): void; - - /** - * Calls UpdateProjectSettings. - * @param request UpdateProjectSettingsRequest message or plain object - * @returns Promise - */ - public updateProjectSettings(request: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest): Promise; - - /** - * Calls GetVPCSCConfig. - * @param request GetVPCSCConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and VPCSCConfig - */ - public getVPCSCConfig(request: google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetVPCSCConfigCallback): void; - - /** - * Calls GetVPCSCConfig. - * @param request GetVPCSCConfigRequest message or plain object - * @returns Promise - */ - public getVPCSCConfig(request: google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest): Promise; - - /** - * Calls UpdateVPCSCConfig. - * @param request UpdateVPCSCConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and VPCSCConfig - */ - public updateVPCSCConfig(request: google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVPCSCConfigCallback): void; - - /** - * Calls UpdateVPCSCConfig. - * @param request UpdateVPCSCConfigRequest message or plain object - * @returns Promise - */ - public updateVPCSCConfig(request: google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest): Promise; - - /** - * Calls UpdatePackage. - * @param request UpdatePackageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Package - */ - public updatePackage(request: google.devtools.artifactregistry.v1.IUpdatePackageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdatePackageCallback): void; - - /** - * Calls UpdatePackage. - * @param request UpdatePackageRequest message or plain object - * @returns Promise - */ - public updatePackage(request: google.devtools.artifactregistry.v1.IUpdatePackageRequest): Promise; - - /** - * Calls ListAttachments. - * @param request ListAttachmentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAttachmentsResponse - */ - public listAttachments(request: google.devtools.artifactregistry.v1.IListAttachmentsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListAttachmentsCallback): void; - - /** - * Calls ListAttachments. - * @param request ListAttachmentsRequest message or plain object - * @returns Promise - */ - public listAttachments(request: google.devtools.artifactregistry.v1.IListAttachmentsRequest): Promise; - - /** - * Calls GetAttachment. - * @param request GetAttachmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Attachment - */ - public getAttachment(request: google.devtools.artifactregistry.v1.IGetAttachmentRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetAttachmentCallback): void; - - /** - * Calls GetAttachment. - * @param request GetAttachmentRequest message or plain object - * @returns Promise - */ - public getAttachment(request: google.devtools.artifactregistry.v1.IGetAttachmentRequest): Promise; - - /** - * Calls CreateAttachment. - * @param request CreateAttachmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createAttachment(request: google.devtools.artifactregistry.v1.ICreateAttachmentRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.CreateAttachmentCallback): void; - - /** - * Calls CreateAttachment. - * @param request CreateAttachmentRequest message or plain object - * @returns Promise - */ - public createAttachment(request: google.devtools.artifactregistry.v1.ICreateAttachmentRequest): Promise; - - /** - * Calls DeleteAttachment. - * @param request DeleteAttachmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteAttachment(request: google.devtools.artifactregistry.v1.IDeleteAttachmentRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteAttachmentCallback): void; - - /** - * Calls DeleteAttachment. - * @param request DeleteAttachmentRequest message or plain object - * @returns Promise - */ - public deleteAttachment(request: google.devtools.artifactregistry.v1.IDeleteAttachmentRequest): Promise; - - /** - * Calls ExportArtifact. - * @param request ExportArtifactRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public exportArtifact(request: google.devtools.artifactregistry.v1.IExportArtifactRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ExportArtifactCallback): void; - - /** - * Calls ExportArtifact. - * @param request ExportArtifactRequest message or plain object - * @returns Promise - */ - public exportArtifact(request: google.devtools.artifactregistry.v1.IExportArtifactRequest): Promise; - } - - namespace ArtifactRegistry { - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listDockerImages}. - * @param error Error, if any - * @param [response] ListDockerImagesResponse - */ - type ListDockerImagesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListDockerImagesResponse) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getDockerImage}. - * @param error Error, if any - * @param [response] DockerImage - */ - type GetDockerImageCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.DockerImage) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listMavenArtifacts}. - * @param error Error, if any - * @param [response] ListMavenArtifactsResponse - */ - type ListMavenArtifactsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListMavenArtifactsResponse) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getMavenArtifact}. - * @param error Error, if any - * @param [response] MavenArtifact - */ - type GetMavenArtifactCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.MavenArtifact) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listNpmPackages}. - * @param error Error, if any - * @param [response] ListNpmPackagesResponse - */ - type ListNpmPackagesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListNpmPackagesResponse) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getNpmPackage}. - * @param error Error, if any - * @param [response] NpmPackage - */ - type GetNpmPackageCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.NpmPackage) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listPythonPackages}. - * @param error Error, if any - * @param [response] ListPythonPackagesResponse - */ - type ListPythonPackagesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListPythonPackagesResponse) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getPythonPackage}. - * @param error Error, if any - * @param [response] PythonPackage - */ - type GetPythonPackageCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.PythonPackage) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|importAptArtifacts}. - * @param error Error, if any - * @param [response] Operation - */ - type ImportAptArtifactsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|importYumArtifacts}. - * @param error Error, if any - * @param [response] Operation - */ - type ImportYumArtifactsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listRepositories}. - * @param error Error, if any - * @param [response] ListRepositoriesResponse - */ - type ListRepositoriesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListRepositoriesResponse) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getRepository}. - * @param error Error, if any - * @param [response] Repository - */ - type GetRepositoryCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Repository) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createRepository}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateRepositoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateRepository}. - * @param error Error, if any - * @param [response] Repository - */ - type UpdateRepositoryCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Repository) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteRepository}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteRepositoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listPackages}. - * @param error Error, if any - * @param [response] ListPackagesResponse - */ - type ListPackagesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListPackagesResponse) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getPackage}. - * @param error Error, if any - * @param [response] Package - */ - type GetPackageCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Package) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deletePackage}. - * @param error Error, if any - * @param [response] Operation - */ - type DeletePackageCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listVersions}. - * @param error Error, if any - * @param [response] ListVersionsResponse - */ - type ListVersionsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListVersionsResponse) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getVersion}. - * @param error Error, if any - * @param [response] Version - */ - type GetVersionCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Version) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteVersion}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteVersionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|batchDeleteVersions}. - * @param error Error, if any - * @param [response] Operation - */ - type BatchDeleteVersionsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateVersion}. - * @param error Error, if any - * @param [response] Version - */ - type UpdateVersionCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Version) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listFiles}. - * @param error Error, if any - * @param [response] ListFilesResponse - */ - type ListFilesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListFilesResponse) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getFile}. - * @param error Error, if any - * @param [response] File - */ - type GetFileCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.File) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteFile}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteFileCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateFile}. - * @param error Error, if any - * @param [response] File - */ - type UpdateFileCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.File) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listTags}. - * @param error Error, if any - * @param [response] ListTagsResponse - */ - type ListTagsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListTagsResponse) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getTag}. - * @param error Error, if any - * @param [response] Tag - */ - type GetTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Tag) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createTag}. - * @param error Error, if any - * @param [response] Tag - */ - type CreateTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Tag) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateTag}. - * @param error Error, if any - * @param [response] Tag - */ - type UpdateTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Tag) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteTag}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteTagCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createRule}. - * @param error Error, if any - * @param [response] Rule - */ - type CreateRuleCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Rule) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listRules}. - * @param error Error, if any - * @param [response] ListRulesResponse - */ - type ListRulesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListRulesResponse) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getRule}. - * @param error Error, if any - * @param [response] Rule - */ - type GetRuleCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Rule) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateRule}. - * @param error Error, if any - * @param [response] Rule - */ - type UpdateRuleCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Rule) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteRule}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteRuleCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|setIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getProjectSettings}. - * @param error Error, if any - * @param [response] ProjectSettings - */ - type GetProjectSettingsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ProjectSettings) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateProjectSettings}. - * @param error Error, if any - * @param [response] ProjectSettings - */ - type UpdateProjectSettingsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ProjectSettings) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getVPCSCConfig}. - * @param error Error, if any - * @param [response] VPCSCConfig - */ - type GetVPCSCConfigCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.VPCSCConfig) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateVPCSCConfig}. - * @param error Error, if any - * @param [response] VPCSCConfig - */ - type UpdateVPCSCConfigCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.VPCSCConfig) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updatePackage}. - * @param error Error, if any - * @param [response] Package - */ - type UpdatePackageCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Package) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listAttachments}. - * @param error Error, if any - * @param [response] ListAttachmentsResponse - */ - type ListAttachmentsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListAttachmentsResponse) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getAttachment}. - * @param error Error, if any - * @param [response] Attachment - */ - type GetAttachmentCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Attachment) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createAttachment}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateAttachmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteAttachment}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteAttachmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|exportArtifact}. - * @param error Error, if any - * @param [response] Operation - */ - type ExportArtifactCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IOperationMetadata); - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IOperationMetadata): google.devtools.artifactregistry.v1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.OperationMetadata; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.OperationMetadata; - - /** - * Verifies an OperationMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.OperationMetadata; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ProjectSettings. */ - interface IProjectSettings { - - /** ProjectSettings name */ - name?: (string|null); - - /** ProjectSettings legacyRedirectionState */ - legacyRedirectionState?: (google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState|keyof typeof google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState|null); - - /** ProjectSettings pullPercent */ - pullPercent?: (number|null); - } - - /** Represents a ProjectSettings. */ - class ProjectSettings implements IProjectSettings { - - /** - * Constructs a new ProjectSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IProjectSettings); - - /** ProjectSettings name. */ - public name: string; - - /** ProjectSettings legacyRedirectionState. */ - public legacyRedirectionState: (google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState|keyof typeof google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState); - - /** ProjectSettings pullPercent. */ - public pullPercent: number; - - /** - * Creates a new ProjectSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ProjectSettings instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IProjectSettings): google.devtools.artifactregistry.v1.ProjectSettings; - - /** - * Encodes the specified ProjectSettings message. Does not implicitly {@link google.devtools.artifactregistry.v1.ProjectSettings.verify|verify} messages. - * @param message ProjectSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IProjectSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProjectSettings message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ProjectSettings.verify|verify} messages. - * @param message ProjectSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IProjectSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProjectSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProjectSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ProjectSettings; - - /** - * Decodes a ProjectSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProjectSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ProjectSettings; - - /** - * Verifies a ProjectSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProjectSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProjectSettings - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ProjectSettings; - - /** - * Creates a plain object from a ProjectSettings message. Also converts values to other types if specified. - * @param message ProjectSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ProjectSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProjectSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProjectSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - 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, - REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING = 5, - REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING = 6 - } - } - - /** Properties of a GetProjectSettingsRequest. */ - interface IGetProjectSettingsRequest { - - /** GetProjectSettingsRequest name */ - name?: (string|null); - } - - /** Represents a GetProjectSettingsRequest. */ - class GetProjectSettingsRequest implements IGetProjectSettingsRequest { - - /** - * Constructs a new GetProjectSettingsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest); - - /** GetProjectSettingsRequest name. */ - public name: string; - - /** - * Creates a new GetProjectSettingsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetProjectSettingsRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest): google.devtools.artifactregistry.v1.GetProjectSettingsRequest; - - /** - * Encodes the specified GetProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetProjectSettingsRequest.verify|verify} messages. - * @param message GetProjectSettingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetProjectSettingsRequest.verify|verify} messages. - * @param message GetProjectSettingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetProjectSettingsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetProjectSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetProjectSettingsRequest; - - /** - * Decodes a GetProjectSettingsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetProjectSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetProjectSettingsRequest; - - /** - * Verifies a GetProjectSettingsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetProjectSettingsRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetProjectSettingsRequest; - - /** - * Creates a plain object from a GetProjectSettingsRequest message. Also converts values to other types if specified. - * @param message GetProjectSettingsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GetProjectSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetProjectSettingsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetProjectSettingsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateProjectSettingsRequest. */ - interface IUpdateProjectSettingsRequest { - - /** UpdateProjectSettingsRequest projectSettings */ - projectSettings?: (google.devtools.artifactregistry.v1.IProjectSettings|null); - - /** UpdateProjectSettingsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateProjectSettingsRequest. */ - class UpdateProjectSettingsRequest implements IUpdateProjectSettingsRequest { - - /** - * Constructs a new UpdateProjectSettingsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest); - - /** UpdateProjectSettingsRequest projectSettings. */ - public projectSettings?: (google.devtools.artifactregistry.v1.IProjectSettings|null); - - /** UpdateProjectSettingsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateProjectSettingsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateProjectSettingsRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest): google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; - - /** - * Encodes the specified UpdateProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.verify|verify} messages. - * @param message UpdateProjectSettingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.verify|verify} messages. - * @param message UpdateProjectSettingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateProjectSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; - - /** - * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateProjectSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; - - /** - * Verifies an UpdateProjectSettingsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateProjectSettingsRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; - - /** - * Creates a plain object from an UpdateProjectSettingsRequest message. Also converts values to other types if specified. - * @param message UpdateProjectSettingsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateProjectSettingsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateProjectSettingsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VPCSCConfig. */ - interface IVPCSCConfig { - - /** VPCSCConfig name */ - name?: (string|null); - - /** VPCSCConfig vpcscPolicy */ - vpcscPolicy?: (google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy|keyof typeof google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy|null); - } - - /** Represents a VPCSCConfig. */ - class VPCSCConfig implements IVPCSCConfig { - - /** - * Constructs a new VPCSCConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IVPCSCConfig); - - /** VPCSCConfig name. */ - public name: string; - - /** VPCSCConfig vpcscPolicy. */ - public vpcscPolicy: (google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy|keyof typeof google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy); - - /** - * Creates a new VPCSCConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns VPCSCConfig instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IVPCSCConfig): google.devtools.artifactregistry.v1.VPCSCConfig; - - /** - * Encodes the specified VPCSCConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.VPCSCConfig.verify|verify} messages. - * @param message VPCSCConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IVPCSCConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VPCSCConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.VPCSCConfig.verify|verify} messages. - * @param message VPCSCConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IVPCSCConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VPCSCConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VPCSCConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.VPCSCConfig; - - /** - * Decodes a VPCSCConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VPCSCConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.VPCSCConfig; - - /** - * Verifies a VPCSCConfig 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 VPCSCConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VPCSCConfig - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.VPCSCConfig; - - /** - * Creates a plain object from a VPCSCConfig message. Also converts values to other types if specified. - * @param message VPCSCConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.VPCSCConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VPCSCConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VPCSCConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace VPCSCConfig { - - /** VPCSCPolicy enum. */ - enum VPCSCPolicy { - VPCSC_POLICY_UNSPECIFIED = 0, - DENY = 1, - ALLOW = 2 - } - } - - /** Properties of a GetVPCSCConfigRequest. */ - interface IGetVPCSCConfigRequest { - - /** GetVPCSCConfigRequest name */ - name?: (string|null); - } - - /** Represents a GetVPCSCConfigRequest. */ - class GetVPCSCConfigRequest implements IGetVPCSCConfigRequest { - - /** - * Constructs a new GetVPCSCConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest); - - /** GetVPCSCConfigRequest name. */ - public name: string; - - /** - * Creates a new GetVPCSCConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetVPCSCConfigRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest): google.devtools.artifactregistry.v1.GetVPCSCConfigRequest; - - /** - * Encodes the specified GetVPCSCConfigRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.verify|verify} messages. - * @param message GetVPCSCConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetVPCSCConfigRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.verify|verify} messages. - * @param message GetVPCSCConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetVPCSCConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetVPCSCConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.GetVPCSCConfigRequest; - - /** - * Decodes a GetVPCSCConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetVPCSCConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.GetVPCSCConfigRequest; - - /** - * Verifies a GetVPCSCConfigRequest 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 GetVPCSCConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetVPCSCConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetVPCSCConfigRequest; - - /** - * Creates a plain object from a GetVPCSCConfigRequest message. Also converts values to other types if specified. - * @param message GetVPCSCConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.GetVPCSCConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetVPCSCConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetVPCSCConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateVPCSCConfigRequest. */ - interface IUpdateVPCSCConfigRequest { - - /** UpdateVPCSCConfigRequest vpcscConfig */ - vpcscConfig?: (google.devtools.artifactregistry.v1.IVPCSCConfig|null); - - /** UpdateVPCSCConfigRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateVPCSCConfigRequest. */ - class UpdateVPCSCConfigRequest implements IUpdateVPCSCConfigRequest { - - /** - * Constructs a new UpdateVPCSCConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest); - - /** UpdateVPCSCConfigRequest vpcscConfig. */ - public vpcscConfig?: (google.devtools.artifactregistry.v1.IVPCSCConfig|null); - - /** UpdateVPCSCConfigRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateVPCSCConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateVPCSCConfigRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest): google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest; - - /** - * Encodes the specified UpdateVPCSCConfigRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.verify|verify} messages. - * @param message UpdateVPCSCConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateVPCSCConfigRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.verify|verify} messages. - * @param message UpdateVPCSCConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateVPCSCConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateVPCSCConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest; - - /** - * Decodes an UpdateVPCSCConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateVPCSCConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest; - - /** - * Verifies an UpdateVPCSCConfigRequest 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 UpdateVPCSCConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateVPCSCConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest; - - /** - * Creates a plain object from an UpdateVPCSCConfigRequest message. Also converts values to other types if specified. - * @param message UpdateVPCSCConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateVPCSCConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateVPCSCConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a YumArtifact. */ - interface IYumArtifact { - - /** YumArtifact name */ - name?: (string|null); - - /** YumArtifact packageName */ - packageName?: (string|null); - - /** YumArtifact packageType */ - packageType?: (google.devtools.artifactregistry.v1.YumArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1.YumArtifact.PackageType|null); - - /** YumArtifact architecture */ - architecture?: (string|null); - } - - /** Represents a YumArtifact. */ - class YumArtifact implements IYumArtifact { - - /** - * Constructs a new YumArtifact. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IYumArtifact); - - /** YumArtifact name. */ - public name: string; - - /** YumArtifact packageName. */ - public packageName: string; - - /** YumArtifact packageType. */ - public packageType: (google.devtools.artifactregistry.v1.YumArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1.YumArtifact.PackageType); - - /** YumArtifact architecture. */ - public architecture: string; - - /** - * Creates a new YumArtifact instance using the specified properties. - * @param [properties] Properties to set - * @returns YumArtifact instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IYumArtifact): google.devtools.artifactregistry.v1.YumArtifact; - - /** - * Encodes the specified YumArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.YumArtifact.verify|verify} messages. - * @param message YumArtifact message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IYumArtifact, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified YumArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.YumArtifact.verify|verify} messages. - * @param message YumArtifact message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IYumArtifact, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a YumArtifact message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns YumArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.YumArtifact; - - /** - * Decodes a YumArtifact message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns YumArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.YumArtifact; - - /** - * Verifies a YumArtifact message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a YumArtifact message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns YumArtifact - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.YumArtifact; - - /** - * Creates a plain object from a YumArtifact message. Also converts values to other types if specified. - * @param message YumArtifact - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.YumArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this YumArtifact to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for YumArtifact - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace YumArtifact { - - /** PackageType enum. */ - enum PackageType { - PACKAGE_TYPE_UNSPECIFIED = 0, - BINARY = 1, - SOURCE = 2 - } - } - - /** Properties of an ImportYumArtifactsGcsSource. */ - interface IImportYumArtifactsGcsSource { - - /** ImportYumArtifactsGcsSource uris */ - uris?: (string[]|null); - - /** ImportYumArtifactsGcsSource useWildcards */ - useWildcards?: (boolean|null); - } - - /** Represents an ImportYumArtifactsGcsSource. */ - class ImportYumArtifactsGcsSource implements IImportYumArtifactsGcsSource { - - /** - * Constructs a new ImportYumArtifactsGcsSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource); - - /** ImportYumArtifactsGcsSource uris. */ - public uris: string[]; - - /** ImportYumArtifactsGcsSource useWildcards. */ - public useWildcards: boolean; - - /** - * Creates a new ImportYumArtifactsGcsSource instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportYumArtifactsGcsSource instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource): google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource; - - /** - * Encodes the specified ImportYumArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify|verify} messages. - * @param message ImportYumArtifactsGcsSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportYumArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify|verify} messages. - * @param message ImportYumArtifactsGcsSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportYumArtifactsGcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource; - - /** - * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportYumArtifactsGcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource; - - /** - * Verifies an ImportYumArtifactsGcsSource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ImportYumArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportYumArtifactsGcsSource - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource; - - /** - * Creates a plain object from an ImportYumArtifactsGcsSource message. Also converts values to other types if specified. - * @param message ImportYumArtifactsGcsSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportYumArtifactsGcsSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportYumArtifactsGcsSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportYumArtifactsRequest. */ - interface IImportYumArtifactsRequest { - - /** ImportYumArtifactsRequest gcsSource */ - gcsSource?: (google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null); - - /** ImportYumArtifactsRequest parent */ - parent?: (string|null); - } - - /** Represents an ImportYumArtifactsRequest. */ - class ImportYumArtifactsRequest implements IImportYumArtifactsRequest { - - /** - * Constructs a new ImportYumArtifactsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest); - - /** ImportYumArtifactsRequest gcsSource. */ - public gcsSource?: (google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null); - - /** ImportYumArtifactsRequest parent. */ - public parent: string; - - /** ImportYumArtifactsRequest source. */ - public source?: "gcsSource"; - - /** - * Creates a new ImportYumArtifactsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportYumArtifactsRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest): google.devtools.artifactregistry.v1.ImportYumArtifactsRequest; - - /** - * Encodes the specified ImportYumArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.verify|verify} messages. - * @param message ImportYumArtifactsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportYumArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.verify|verify} messages. - * @param message ImportYumArtifactsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportYumArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportYumArtifactsRequest; - - /** - * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportYumArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportYumArtifactsRequest; - - /** - * Verifies an ImportYumArtifactsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ImportYumArtifactsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportYumArtifactsRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsRequest; - - /** - * Creates a plain object from an ImportYumArtifactsRequest message. Also converts values to other types if specified. - * @param message ImportYumArtifactsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ImportYumArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportYumArtifactsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportYumArtifactsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportYumArtifactsErrorInfo. */ - interface IImportYumArtifactsErrorInfo { - - /** ImportYumArtifactsErrorInfo gcsSource */ - gcsSource?: (google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null); - - /** ImportYumArtifactsErrorInfo error */ - error?: (google.rpc.IStatus|null); - } - - /** Represents an ImportYumArtifactsErrorInfo. */ - class ImportYumArtifactsErrorInfo implements IImportYumArtifactsErrorInfo { - - /** - * Constructs a new ImportYumArtifactsErrorInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo); - - /** ImportYumArtifactsErrorInfo gcsSource. */ - public gcsSource?: (google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null); - - /** ImportYumArtifactsErrorInfo error. */ - public error?: (google.rpc.IStatus|null); - - /** ImportYumArtifactsErrorInfo source. */ - public source?: "gcsSource"; - - /** - * Creates a new ImportYumArtifactsErrorInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportYumArtifactsErrorInfo instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo): google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo; - - /** - * Encodes the specified ImportYumArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify|verify} messages. - * @param message ImportYumArtifactsErrorInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportYumArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify|verify} messages. - * @param message ImportYumArtifactsErrorInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportYumArtifactsErrorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo; - - /** - * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportYumArtifactsErrorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo; - - /** - * Verifies an ImportYumArtifactsErrorInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ImportYumArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportYumArtifactsErrorInfo - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo; - - /** - * Creates a plain object from an ImportYumArtifactsErrorInfo message. Also converts values to other types if specified. - * @param message ImportYumArtifactsErrorInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportYumArtifactsErrorInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportYumArtifactsErrorInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportYumArtifactsResponse. */ - interface IImportYumArtifactsResponse { - - /** ImportYumArtifactsResponse yumArtifacts */ - yumArtifacts?: (google.devtools.artifactregistry.v1.IYumArtifact[]|null); - - /** ImportYumArtifactsResponse errors */ - errors?: (google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo[]|null); - } - - /** Represents an ImportYumArtifactsResponse. */ - class ImportYumArtifactsResponse implements IImportYumArtifactsResponse { - - /** - * Constructs a new ImportYumArtifactsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsResponse); - - /** ImportYumArtifactsResponse yumArtifacts. */ - public yumArtifacts: google.devtools.artifactregistry.v1.IYumArtifact[]; - - /** ImportYumArtifactsResponse errors. */ - public errors: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo[]; - - /** - * Creates a new ImportYumArtifactsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportYumArtifactsResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsResponse): google.devtools.artifactregistry.v1.ImportYumArtifactsResponse; - - /** - * Encodes the specified ImportYumArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.verify|verify} messages. - * @param message ImportYumArtifactsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportYumArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.verify|verify} messages. - * @param message ImportYumArtifactsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 ImportYumArtifactsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportYumArtifactsResponse; - - /** - * Decodes an ImportYumArtifactsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportYumArtifactsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportYumArtifactsResponse; - - /** - * 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 an ImportYumArtifactsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportYumArtifactsResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsResponse; - - /** - * Creates a plain object from an ImportYumArtifactsResponse message. Also converts values to other types if specified. - * @param message ImportYumArtifactsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1.ImportYumArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportYumArtifactsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportYumArtifactsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportYumArtifactsMetadata. */ - interface IImportYumArtifactsMetadata { - } - - /** Represents an ImportYumArtifactsMetadata. */ - class ImportYumArtifactsMetadata implements IImportYumArtifactsMetadata { - - /** - * Constructs a new ImportYumArtifactsMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata); - - /** - * Creates a new ImportYumArtifactsMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportYumArtifactsMetadata instance - */ - public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata): google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata; - - /** - * Encodes the specified ImportYumArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata.verify|verify} messages. - * @param message ImportYumArtifactsMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportYumArtifactsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata.verify|verify} messages. - * @param message ImportYumArtifactsMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportYumArtifactsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata; - - /** - * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportYumArtifactsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata; - - /** - * 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 an ImportYumArtifactsMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportYumArtifactsMetadata - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata; - - /** - * 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.v1.ImportYumArtifactsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportYumArtifactsMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportYumArtifactsMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace v1beta2. */ - namespace v1beta2 { - - /** Properties of an AptArtifact. */ - interface IAptArtifact { - - /** AptArtifact name */ - name?: (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|Buffer|string|null); - } - - /** Represents an AptArtifact. */ - class AptArtifact implements IAptArtifact { - - /** - * Constructs a new AptArtifact. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IAptArtifact); - - /** AptArtifact name. */ - public name: 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|Buffer|string); - - /** - * Creates a new AptArtifact instance using the specified properties. - * @param [properties] Properties to set - * @returns AptArtifact instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IAptArtifact): google.devtools.artifactregistry.v1beta2.AptArtifact; - - /** - * 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.IAptArtifact, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IAptArtifact, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.AptArtifact; - - /** - * Decodes an AptArtifact message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.AptArtifact; - - /** - * 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 an AptArtifact message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AptArtifact - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.AptArtifact; - - /** - * 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.AptArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AptArtifact to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AptArtifact - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AptArtifact { - - /** PackageType enum. */ - enum PackageType { - PACKAGE_TYPE_UNSPECIFIED = 0, - BINARY = 1, - SOURCE = 2 - } - } - - /** Properties of an ImportAptArtifactsGcsSource. */ - interface IImportAptArtifactsGcsSource { - - /** ImportAptArtifactsGcsSource uris */ - uris?: (string[]|null); - - /** ImportAptArtifactsGcsSource useWildcards */ - useWildcards?: (boolean|null); - } - - /** Represents an ImportAptArtifactsGcsSource. */ - class ImportAptArtifactsGcsSource implements IImportAptArtifactsGcsSource { - - /** - * Constructs a new ImportAptArtifactsGcsSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource); - - /** ImportAptArtifactsGcsSource uris. */ - public uris: string[]; - - /** ImportAptArtifactsGcsSource useWildcards. */ - public useWildcards: boolean; - - /** - * Creates a new ImportAptArtifactsGcsSource instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportAptArtifactsGcsSource instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource; - - /** - * 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.IImportAptArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IImportAptArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.ImportAptArtifactsGcsSource; - - /** - * Decodes an ImportAptArtifactsGcsSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.ImportAptArtifactsGcsSource; - - /** - * 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 an ImportAptArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportAptArtifactsGcsSource - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource; - - /** - * 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.ImportAptArtifactsGcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportAptArtifactsGcsSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportAptArtifactsGcsSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportAptArtifactsRequest. */ - interface IImportAptArtifactsRequest { - - /** ImportAptArtifactsRequest gcsSource */ - gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null); - - /** ImportAptArtifactsRequest parent */ - parent?: (string|null); - } - - /** Represents an ImportAptArtifactsRequest. */ - class ImportAptArtifactsRequest implements IImportAptArtifactsRequest { - - /** - * Constructs a new ImportAptArtifactsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest); - - /** ImportAptArtifactsRequest gcsSource. */ - public gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null); - - /** ImportAptArtifactsRequest parent. */ - public parent: string; - - /** ImportAptArtifactsRequest source. */ - public source?: "gcsSource"; - - /** - * Creates a new ImportAptArtifactsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportAptArtifactsRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest; - - /** - * 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.IImportAptArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IImportAptArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.ImportAptArtifactsRequest; - - /** - * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.ImportAptArtifactsRequest; - - /** - * 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 an ImportAptArtifactsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportAptArtifactsRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest; - - /** - * 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.ImportAptArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportAptArtifactsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportAptArtifactsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportAptArtifactsErrorInfo. */ - interface IImportAptArtifactsErrorInfo { - - /** ImportAptArtifactsErrorInfo gcsSource */ - gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null); - - /** ImportAptArtifactsErrorInfo error */ - error?: (google.rpc.IStatus|null); - } - - /** Represents an ImportAptArtifactsErrorInfo. */ - class ImportAptArtifactsErrorInfo implements IImportAptArtifactsErrorInfo { - - /** - * Constructs a new ImportAptArtifactsErrorInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo); - - /** ImportAptArtifactsErrorInfo gcsSource. */ - public gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null); - - /** ImportAptArtifactsErrorInfo error. */ - public error?: (google.rpc.IStatus|null); - - /** ImportAptArtifactsErrorInfo source. */ - public source?: "gcsSource"; - - /** - * Creates a new ImportAptArtifactsErrorInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportAptArtifactsErrorInfo instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo; - - /** - * 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.IImportAptArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IImportAptArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.ImportAptArtifactsErrorInfo; - - /** - * Decodes an ImportAptArtifactsErrorInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.ImportAptArtifactsErrorInfo; - - /** - * 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 an ImportAptArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportAptArtifactsErrorInfo - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo; - - /** - * 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.ImportAptArtifactsErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportAptArtifactsErrorInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportAptArtifactsErrorInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportAptArtifactsResponse. */ - interface IImportAptArtifactsResponse { - - /** ImportAptArtifactsResponse aptArtifacts */ - aptArtifacts?: (google.devtools.artifactregistry.v1beta2.IAptArtifact[]|null); - - /** ImportAptArtifactsResponse errors */ - errors?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo[]|null); - } - - /** Represents an ImportAptArtifactsResponse. */ - class ImportAptArtifactsResponse implements IImportAptArtifactsResponse { - - /** - * Constructs a new ImportAptArtifactsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse); - - /** ImportAptArtifactsResponse aptArtifacts. */ - public aptArtifacts: google.devtools.artifactregistry.v1beta2.IAptArtifact[]; - - /** ImportAptArtifactsResponse errors. */ - public errors: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo[]; - - /** - * Creates a new ImportAptArtifactsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportAptArtifactsResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse; - - /** - * 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.IImportAptArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IImportAptArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.ImportAptArtifactsResponse; - - /** - * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.ImportAptArtifactsResponse; - - /** - * 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 an ImportAptArtifactsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportAptArtifactsResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse; - - /** - * 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.ImportAptArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportAptArtifactsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportAptArtifactsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportAptArtifactsMetadata. */ - interface IImportAptArtifactsMetadata { - } - - /** Represents an ImportAptArtifactsMetadata. */ - class ImportAptArtifactsMetadata implements IImportAptArtifactsMetadata { - - /** - * Constructs a new ImportAptArtifactsMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata); - - /** - * Creates a new ImportAptArtifactsMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportAptArtifactsMetadata instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata; - - /** - * 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.IImportAptArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IImportAptArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.ImportAptArtifactsMetadata; - - /** - * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.ImportAptArtifactsMetadata; - - /** - * 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 an ImportAptArtifactsMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportAptArtifactsMetadata - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata; - - /** - * 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.ImportAptArtifactsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportAptArtifactsMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportAptArtifactsMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Hash. */ - interface IHash { - - /** Hash type */ - type?: (google.devtools.artifactregistry.v1beta2.Hash.HashType|keyof typeof google.devtools.artifactregistry.v1beta2.Hash.HashType|null); - - /** Hash value */ - value?: (Uint8Array|Buffer|string|null); - } - - /** Represents a Hash. */ - class Hash implements IHash { - - /** - * Constructs a new Hash. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IHash); - - /** Hash type. */ - public type: (google.devtools.artifactregistry.v1beta2.Hash.HashType|keyof typeof google.devtools.artifactregistry.v1beta2.Hash.HashType); - - /** Hash value. */ - public value: (Uint8Array|Buffer|string); - - /** - * Creates a new Hash instance using the specified properties. - * @param [properties] Properties to set - * @returns Hash instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IHash): google.devtools.artifactregistry.v1beta2.Hash; - - /** - * 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.IHash, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IHash, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Hash message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Hash - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Hash; - - /** - * Decodes a Hash message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Hash - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Hash; - - /** - * Verifies a Hash message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Hash message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Hash - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Hash; - - /** - * Creates a plain object from a Hash message. Also converts values to other types if specified. - * @param message Hash - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.Hash, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Hash to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Hash - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Hash { - - /** HashType enum. */ - enum HashType { - HASH_TYPE_UNSPECIFIED = 0, - SHA256 = 1, - MD5 = 2 - } - } - - /** Properties of a File. */ - interface IFile { - - /** File name */ - name?: (string|null); - - /** File sizeBytes */ - sizeBytes?: (number|Long|string|null); - - /** File hashes */ - hashes?: (google.devtools.artifactregistry.v1beta2.IHash[]|null); - - /** File createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** File updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** File owner */ - owner?: (string|null); - } - - /** Represents a File. */ - class File implements IFile { - - /** - * Constructs a new File. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.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); - - /** File updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** File owner. */ - public owner: string; - - /** - * Creates a new File instance using the specified properties. - * @param [properties] Properties to set - * @returns File instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IFile): google.devtools.artifactregistry.v1beta2.File; - - /** - * 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.IFile, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IFile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a File message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns File - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.File; - - /** - * Decodes a File message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns File - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.File; - - /** - * Verifies a File message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a File message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns File - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.File; - - /** - * Creates a plain object from a File message. Also converts values to other types if specified. - * @param message File - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this File to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for File - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListFilesRequest. */ - interface IListFilesRequest { - - /** ListFilesRequest parent */ - parent?: (string|null); - - /** ListFilesRequest filter */ - filter?: (string|null); - - /** ListFilesRequest pageSize */ - pageSize?: (number|null); - - /** ListFilesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListFilesRequest. */ - class ListFilesRequest implements IListFilesRequest { - - /** - * Constructs a new ListFilesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListFilesRequest); - - /** ListFilesRequest parent. */ - public parent: string; - - /** ListFilesRequest filter. */ - public filter: string; - - /** 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.IListFilesRequest, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFilesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFilesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListFilesRequest; - - /** - * Decodes a ListFilesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFilesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListFilesRequest; - - /** - * Verifies a ListFilesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFilesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFilesRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListFilesRequest; - - /** - * Creates a plain object from a ListFilesRequest message. Also converts values to other types if specified. - * @param message ListFilesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.ListFilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFilesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListFilesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListFilesResponse. */ - interface IListFilesResponse { - - /** ListFilesResponse files */ - files?: (google.devtools.artifactregistry.v1beta2.IFile[]|null); - - /** ListFilesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListFilesResponse. */ - class ListFilesResponse implements IListFilesResponse { - - /** - * Constructs a new ListFilesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListFilesResponse); - - /** ListFilesResponse files. */ - public files: google.devtools.artifactregistry.v1beta2.IFile[]; - - /** ListFilesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListFilesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFilesResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListFilesResponse): google.devtools.artifactregistry.v1beta2.ListFilesResponse; - - /** - * 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.IListFilesResponse, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFilesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListFilesResponse; - - /** - * Decodes a ListFilesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListFilesResponse; - - /** - * Verifies a ListFilesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFilesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFilesResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListFilesResponse; - - /** - * Creates a plain object from a ListFilesResponse message. Also converts values to other types if specified. - * @param message ListFilesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.ListFilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFilesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListFilesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetFileRequest. */ - interface IGetFileRequest { - - /** GetFileRequest name */ - name?: (string|null); - } - - /** Represents a GetFileRequest. */ - class GetFileRequest implements IGetFileRequest { - - /** - * Constructs a new GetFileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetFileRequest); - - /** GetFileRequest name. */ - public name: string; - - /** - * Creates a new GetFileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetFileRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetFileRequest): google.devtools.artifactregistry.v1beta2.GetFileRequest; - - /** - * 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.IGetFileRequest, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IGetFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetFileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.GetFileRequest; - - /** - * Decodes a GetFileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.GetFileRequest; - - /** - * Verifies a GetFileRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetFileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetFileRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetFileRequest; - - /** - * Creates a plain object from a GetFileRequest message. Also converts values to other types if specified. - * @param message GetFileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.GetFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetFileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetFileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Package. */ - interface IPackage { - - /** Package name */ - name?: (string|null); - - /** Package displayName */ - displayName?: (string|null); - - /** Package createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Package updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a Package. */ - class Package implements IPackage { - - /** - * Constructs a new Package. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.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); - - /** - * Creates a new Package instance using the specified properties. - * @param [properties] Properties to set - * @returns Package instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IPackage): google.devtools.artifactregistry.v1beta2.Package; - - /** - * 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.IPackage, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Package message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Package - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Package; - - /** - * Decodes a Package message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Package - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Package; - - /** - * Verifies a Package message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Package message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Package - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Package; - - /** - * Creates a plain object from a Package message. Also converts values to other types if specified. - * @param message Package - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.Package, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Package to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Package - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPackagesRequest. */ - interface IListPackagesRequest { - - /** ListPackagesRequest parent */ - parent?: (string|null); - - /** ListPackagesRequest pageSize */ - pageSize?: (number|null); - - /** ListPackagesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListPackagesRequest. */ - class ListPackagesRequest implements IListPackagesRequest { - - /** - * Constructs a new ListPackagesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesRequest); - - /** ListPackagesRequest parent. */ - public parent: string; - - /** ListPackagesRequest pageSize. */ - public pageSize: number; - - /** ListPackagesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListPackagesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPackagesRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesRequest): google.devtools.artifactregistry.v1beta2.ListPackagesRequest; - - /** - * 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.IListPackagesRequest, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPackagesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListPackagesRequest; - - /** - * Decodes a ListPackagesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListPackagesRequest; - - /** - * Verifies a ListPackagesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPackagesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPackagesRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListPackagesRequest; - - /** - * Creates a plain object from a ListPackagesRequest message. Also converts values to other types if specified. - * @param message ListPackagesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.ListPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPackagesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPackagesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPackagesResponse. */ - interface IListPackagesResponse { - - /** ListPackagesResponse packages */ - packages?: (google.devtools.artifactregistry.v1beta2.IPackage[]|null); - - /** ListPackagesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListPackagesResponse. */ - class ListPackagesResponse implements IListPackagesResponse { - - /** - * Constructs a new ListPackagesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesResponse); - - /** ListPackagesResponse packages. */ - public packages: google.devtools.artifactregistry.v1beta2.IPackage[]; - - /** ListPackagesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListPackagesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPackagesResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesResponse): google.devtools.artifactregistry.v1beta2.ListPackagesResponse; - - /** - * 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.IListPackagesResponse, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPackagesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListPackagesResponse; - - /** - * Decodes a ListPackagesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListPackagesResponse; - - /** - * Verifies a ListPackagesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPackagesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPackagesResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListPackagesResponse; - - /** - * Creates a plain object from a ListPackagesResponse message. Also converts values to other types if specified. - * @param message ListPackagesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.ListPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPackagesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPackagesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPackageRequest. */ - interface IGetPackageRequest { - - /** GetPackageRequest name */ - name?: (string|null); - } - - /** Represents a GetPackageRequest. */ - class GetPackageRequest implements IGetPackageRequest { - - /** - * Constructs a new GetPackageRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetPackageRequest); - - /** GetPackageRequest name. */ - public name: string; - - /** - * Creates a new GetPackageRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPackageRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetPackageRequest): google.devtools.artifactregistry.v1beta2.GetPackageRequest; - - /** - * 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.IGetPackageRequest, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IGetPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPackageRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.GetPackageRequest; - - /** - * Decodes a GetPackageRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.GetPackageRequest; - - /** - * Verifies a GetPackageRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPackageRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPackageRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetPackageRequest; - - /** - * Creates a plain object from a GetPackageRequest message. Also converts values to other types if specified. - * @param message GetPackageRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.GetPackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPackageRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPackageRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeletePackageRequest. */ - interface IDeletePackageRequest { - - /** DeletePackageRequest name */ - name?: (string|null); - } - - /** Represents a DeletePackageRequest. */ - class DeletePackageRequest implements IDeletePackageRequest { - - /** - * Constructs a new DeletePackageRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IDeletePackageRequest); - - /** DeletePackageRequest name. */ - public name: string; - - /** - * Creates a new DeletePackageRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeletePackageRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IDeletePackageRequest): google.devtools.artifactregistry.v1beta2.DeletePackageRequest; - - /** - * 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.IDeletePackageRequest, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeletePackageRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeletePackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.DeletePackageRequest; - - /** - * Decodes a DeletePackageRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeletePackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.DeletePackageRequest; - - /** - * Verifies a DeletePackageRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeletePackageRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeletePackageRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.DeletePackageRequest; - - /** - * Creates a plain object from a DeletePackageRequest message. Also converts values to other types if specified. - * @param message DeletePackageRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.DeletePackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeletePackageRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeletePackageRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Repository. */ - interface IRepository { - - /** 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 Repository. */ - class Repository implements IRepository { - - /** - * Constructs a new Repository. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IRepository); - - /** 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 Repository instance using the specified properties. - * @param [properties] Properties to set - * @returns Repository instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IRepository): google.devtools.artifactregistry.v1beta2.Repository; - - /** - * 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.IRepository, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Repository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Repository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Repository; - - /** - * Decodes a Repository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Repository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Repository; - - /** - * Verifies a Repository message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Repository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Repository - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Repository; - - /** - * Creates a plain object from a Repository message. Also converts values to other types if specified. - * @param message Repository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.Repository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Repository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Repository - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Repository { - - /** Properties of a MavenRepositoryConfig. */ - interface IMavenRepositoryConfig { - - /** MavenRepositoryConfig allowSnapshotOverwrites */ - allowSnapshotOverwrites?: (boolean|null); - - /** MavenRepositoryConfig versionPolicy */ - versionPolicy?: (google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy|keyof typeof google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy|null); - } - - /** Represents a MavenRepositoryConfig. */ - class MavenRepositoryConfig implements IMavenRepositoryConfig { - - /** - * Constructs a new MavenRepositoryConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.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 }; - - /** - * Gets the default type url for MavenRepositoryConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MavenRepositoryConfig { - - /** VersionPolicy enum. */ - enum VersionPolicy { - VERSION_POLICY_UNSPECIFIED = 0, - RELEASE = 1, - SNAPSHOT = 2 - } - } - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - DOCKER = 1, - MAVEN = 2, - NPM = 3, - APT = 5, - YUM = 6, - PYTHON = 8 - } - } - - /** Properties of a ListRepositoriesRequest. */ - interface IListRepositoriesRequest { - - /** ListRepositoriesRequest parent */ - parent?: (string|null); - - /** ListRepositoriesRequest pageSize */ - pageSize?: (number|null); - - /** ListRepositoriesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListRepositoriesRequest. */ - class ListRepositoriesRequest implements IListRepositoriesRequest { - - /** - * Constructs a new ListRepositoriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.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 }; - - /** - * Gets the default type url for ListRepositoriesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 }; - - /** - * Gets the default type url for ListRepositoriesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 }; - - /** - * Gets the default type url for GetRepositoryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 }; - - /** - * Gets the default type url for CreateRepositoryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 }; - - /** - * Gets the default type url for UpdateRepositoryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 }; - - /** - * Gets the default type url for DeleteRepositoryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 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; - - /** - * Verifies an OperationMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.OperationMetadata; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 { - - /** - * Constructs a new ProjectSettings. - * @param [properties] Properties to set - */ - 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); - - /** - * Creates a new ProjectSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ProjectSettings instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IProjectSettings): google.devtools.artifactregistry.v1beta2.ProjectSettings; - - /** - * 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 static encode(message: google.devtools.artifactregistry.v1beta2.IProjectSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IProjectSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProjectSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProjectSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.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 }; - - /** - * Gets the default type url for ProjectSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - 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 }; - - /** - * Gets the default type url for GetProjectSettingsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 }; - - /** - * Gets the default type url for UpdateProjectSettingsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 static create(properties?: google.devtools.artifactregistry.v1beta2.ITag): google.devtools.artifactregistry.v1beta2.Tag; - - /** - * 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 static encode(message: google.devtools.artifactregistry.v1beta2.ITag, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.ITag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Tag message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Tag; - - /** - * Decodes a Tag message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Tag; - - /** - * Verifies a Tag message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Tag message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Tag - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Tag; - - /** - * Creates a plain object from a Tag message. Also converts values to other types if specified. - * @param message Tag - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.Tag, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Tag to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Tag - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTagsRequest. */ - interface IListTagsRequest { - - /** ListTagsRequest parent */ - parent?: (string|null); - - /** ListTagsRequest filter */ - filter?: (string|null); - - /** ListTagsRequest pageSize */ - pageSize?: (number|null); - - /** ListTagsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListTagsRequest. */ - class ListTagsRequest implements IListTagsRequest { - - /** - * Constructs a new ListTagsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListTagsRequest); - - /** ListTagsRequest parent. */ - public parent: string; - - /** ListTagsRequest filter. */ - public filter: string; - - /** ListTagsRequest pageSize. */ - public pageSize: number; - - /** ListTagsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListTagsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTagsRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListTagsRequest): google.devtools.artifactregistry.v1beta2.ListTagsRequest; - - /** - * 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 static encode(message: google.devtools.artifactregistry.v1beta2.IListTagsRequest, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTagsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListTagsRequest; - - /** - * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListTagsRequest; - - /** - * Verifies a ListTagsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTagsRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListTagsRequest; - - /** - * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. - * @param message ListTagsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.ListTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTagsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTagsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 { - - /** - * Constructs a new ListTagsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListTagsResponse); - - /** ListTagsResponse tags. */ - public tags: google.devtools.artifactregistry.v1beta2.ITag[]; - - /** ListTagsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListTagsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTagsResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListTagsResponse): google.devtools.artifactregistry.v1beta2.ListTagsResponse; - - /** - * 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 static encode(message: google.devtools.artifactregistry.v1beta2.IListTagsResponse, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTagsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListTagsResponse; - - /** - * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListTagsResponse; - - /** - * Verifies a ListTagsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTagsResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListTagsResponse; - - /** - * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. - * @param message ListTagsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.ListTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTagsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTagsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetTagRequest. */ - interface IGetTagRequest { - - /** GetTagRequest name */ - name?: (string|null); - } - - /** Represents a GetTagRequest. */ - class GetTagRequest implements IGetTagRequest { - - /** - * Constructs a new GetTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetTagRequest); - - /** GetTagRequest name. */ - public name: string; - - /** - * Creates a new GetTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTagRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetTagRequest): google.devtools.artifactregistry.v1beta2.GetTagRequest; - - /** - * 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 - */ - public static encode(message: google.devtools.artifactregistry.v1beta2.IGetTagRequest, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IGetTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.GetTagRequest; - - /** - * Decodes a GetTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.GetTagRequest; - - /** - * Verifies a GetTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetTagRequest; - - /** - * Creates a plain object from a GetTagRequest message. Also converts values to other types if specified. - * @param message GetTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.GetTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 { - - /** - * Constructs a new CreateTagRequest. - * @param [properties] Properties to set - */ - 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); - - /** - * Creates a new CreateTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTagRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.ICreateTagRequest): google.devtools.artifactregistry.v1beta2.CreateTagRequest; - - /** - * 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 - */ - public static encode(message: google.devtools.artifactregistry.v1beta2.ICreateTagRequest, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.CreateTagRequest; - - /** - * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.CreateTagRequest; - - /** - * Verifies a CreateTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.CreateTagRequest; - - /** - * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. - * @param message CreateTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.CreateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateTagRequest. */ - interface IUpdateTagRequest { - - /** UpdateTagRequest tag */ - tag?: (google.devtools.artifactregistry.v1beta2.ITag|null); - - /** UpdateTagRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateTagRequest. */ - class UpdateTagRequest implements IUpdateTagRequest { - - /** - * Constructs a new UpdateTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IUpdateTagRequest); - - /** UpdateTagRequest tag. */ - public tag?: (google.devtools.artifactregistry.v1beta2.ITag|null); - - /** UpdateTagRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTagRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IUpdateTagRequest): google.devtools.artifactregistry.v1beta2.UpdateTagRequest; - - /** - * 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.IUpdateTagRequest, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.UpdateTagRequest; - - /** - * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.UpdateTagRequest; - - /** - * Verifies an UpdateTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.UpdateTagRequest; - - /** - * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. - * @param message UpdateTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.UpdateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteTagRequest. */ - interface IDeleteTagRequest { - - /** DeleteTagRequest name */ - name?: (string|null); - } - - /** Represents a DeleteTagRequest. */ - class DeleteTagRequest implements IDeleteTagRequest { - - /** - * Constructs a new DeleteTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IDeleteTagRequest); - - /** DeleteTagRequest name. */ - public name: string; - - /** - * Creates a new DeleteTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTagRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IDeleteTagRequest): google.devtools.artifactregistry.v1beta2.DeleteTagRequest; - - /** - * 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.IDeleteTagRequest, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.DeleteTagRequest; - - /** - * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.DeleteTagRequest; - - /** - * Verifies a DeleteTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.DeleteTagRequest; - - /** - * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. - * @param message DeleteTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.DeleteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VersionView enum. */ - enum VersionView { - VERSION_VIEW_UNSPECIFIED = 0, - BASIC = 1, - FULL = 2 - } - - /** Properties of a Version. */ - interface IVersion { - - /** Version name */ - name?: (string|null); - - /** Version description */ - description?: (string|null); - - /** Version createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Version updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Version relatedTags */ - relatedTags?: (google.devtools.artifactregistry.v1beta2.ITag[]|null); - - /** Version metadata */ - metadata?: (google.protobuf.IStruct|null); - } - - /** Represents a Version. */ - class Version implements IVersion { - - /** - * Constructs a new Version. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IVersion); - - /** Version name. */ - public name: string; - - /** Version description. */ - public description: string; - - /** Version createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Version updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Version relatedTags. */ - public relatedTags: google.devtools.artifactregistry.v1beta2.ITag[]; - - /** Version metadata. */ - public metadata?: (google.protobuf.IStruct|null); - - /** - * Creates a new Version instance using the specified properties. - * @param [properties] Properties to set - * @returns Version instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IVersion): google.devtools.artifactregistry.v1beta2.Version; - - /** - * 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.IVersion, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Version message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Version - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Version; - - /** - * Decodes a Version message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Version - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Version; - - /** - * Verifies a Version message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Version - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Version; - - /** - * Creates a plain object from a Version message. Also converts values to other types if specified. - * @param message Version - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Version to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Version - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListVersionsRequest. */ - interface IListVersionsRequest { - - /** ListVersionsRequest parent */ - parent?: (string|null); - - /** ListVersionsRequest pageSize */ - pageSize?: (number|null); - - /** ListVersionsRequest pageToken */ - pageToken?: (string|null); - - /** ListVersionsRequest view */ - view?: (google.devtools.artifactregistry.v1beta2.VersionView|keyof typeof google.devtools.artifactregistry.v1beta2.VersionView|null); - - /** ListVersionsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListVersionsRequest. */ - class ListVersionsRequest implements IListVersionsRequest { - - /** - * Constructs a new ListVersionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsRequest); - - /** ListVersionsRequest parent. */ - public parent: 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 ListVersionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListVersionsRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsRequest): google.devtools.artifactregistry.v1beta2.ListVersionsRequest; - - /** - * 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.IListVersionsRequest, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListVersionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListVersionsRequest; - - /** - * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListVersionsRequest; - - /** - * Verifies a ListVersionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListVersionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListVersionsRequest; - - /** - * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. - * @param message ListVersionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.ListVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListVersionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListVersionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListVersionsResponse. */ - interface IListVersionsResponse { - - /** ListVersionsResponse versions */ - versions?: (google.devtools.artifactregistry.v1beta2.IVersion[]|null); - - /** ListVersionsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListVersionsResponse. */ - class ListVersionsResponse implements IListVersionsResponse { - - /** - * Constructs a new ListVersionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsResponse); - - /** ListVersionsResponse versions. */ - public versions: google.devtools.artifactregistry.v1beta2.IVersion[]; - - /** ListVersionsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListVersionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListVersionsResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsResponse): google.devtools.artifactregistry.v1beta2.ListVersionsResponse; - - /** - * 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.IListVersionsResponse, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListVersionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListVersionsResponse; - - /** - * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListVersionsResponse; - - /** - * Verifies a ListVersionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListVersionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListVersionsResponse; - - /** - * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. - * @param message ListVersionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.ListVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListVersionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListVersionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetVersionRequest. */ - interface IGetVersionRequest { - - /** GetVersionRequest name */ - name?: (string|null); - - /** GetVersionRequest view */ - view?: (google.devtools.artifactregistry.v1beta2.VersionView|keyof typeof google.devtools.artifactregistry.v1beta2.VersionView|null); - } - - /** Represents a GetVersionRequest. */ - class GetVersionRequest implements IGetVersionRequest { - - /** - * Constructs a new GetVersionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetVersionRequest); - - /** GetVersionRequest name. */ - public name: string; - - /** GetVersionRequest view. */ - public view: (google.devtools.artifactregistry.v1beta2.VersionView|keyof typeof google.devtools.artifactregistry.v1beta2.VersionView); - - /** - * Creates a new GetVersionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetVersionRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetVersionRequest): google.devtools.artifactregistry.v1beta2.GetVersionRequest; - - /** - * 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.IGetVersionRequest, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetVersionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.GetVersionRequest; - - /** - * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.GetVersionRequest; - - /** - * Verifies a GetVersionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetVersionRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetVersionRequest; - - /** - * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. - * @param message GetVersionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.GetVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetVersionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetVersionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteVersionRequest. */ - interface IDeleteVersionRequest { - - /** DeleteVersionRequest name */ - name?: (string|null); - - /** DeleteVersionRequest force */ - force?: (boolean|null); - } - - /** Represents a DeleteVersionRequest. */ - class DeleteVersionRequest implements IDeleteVersionRequest { - - /** - * Constructs a new DeleteVersionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest); - - /** DeleteVersionRequest name. */ - public name: string; - - /** DeleteVersionRequest force. */ - public force: boolean; - - /** - * Creates a new DeleteVersionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteVersionRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest): google.devtools.artifactregistry.v1beta2.DeleteVersionRequest; - - /** - * 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.IDeleteVersionRequest, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.DeleteVersionRequest; - - /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.DeleteVersionRequest; - - /** - * Verifies a DeleteVersionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteVersionRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.DeleteVersionRequest; - - /** - * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. - * @param message DeleteVersionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.DeleteVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteVersionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteVersionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a YumArtifact. */ - interface IYumArtifact { - - /** 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 YumArtifact. */ - class YumArtifact implements IYumArtifact { - - /** - * Constructs a new YumArtifact. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IYumArtifact); - - /** 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 YumArtifact instance using the specified properties. - * @param [properties] Properties to set - * @returns YumArtifact instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IYumArtifact): google.devtools.artifactregistry.v1beta2.YumArtifact; - - /** - * 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.IYumArtifact, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IYumArtifact, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a YumArtifact message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns YumArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.YumArtifact; - - /** - * Decodes a YumArtifact message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns YumArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.YumArtifact; - - /** - * Verifies a YumArtifact message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a YumArtifact message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns YumArtifact - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.YumArtifact; - - /** - * Creates a plain object from a YumArtifact message. Also converts values to other types if specified. - * @param message YumArtifact - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.YumArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this YumArtifact to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for YumArtifact - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace YumArtifact { - - /** PackageType enum. */ - enum PackageType { - PACKAGE_TYPE_UNSPECIFIED = 0, - BINARY = 1, - SOURCE = 2 - } - } - - /** Properties of an ImportYumArtifactsGcsSource. */ - interface IImportYumArtifactsGcsSource { - - /** ImportYumArtifactsGcsSource uris */ - uris?: (string[]|null); - - /** ImportYumArtifactsGcsSource useWildcards */ - useWildcards?: (boolean|null); - } - - /** Represents an ImportYumArtifactsGcsSource. */ - class ImportYumArtifactsGcsSource implements IImportYumArtifactsGcsSource { - - /** - * Constructs a new ImportYumArtifactsGcsSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource); - - /** ImportYumArtifactsGcsSource uris. */ - public uris: string[]; - - /** ImportYumArtifactsGcsSource useWildcards. */ - public useWildcards: boolean; - - /** - * Creates a new ImportYumArtifactsGcsSource instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportYumArtifactsGcsSource instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource; - - /** - * 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.IImportYumArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IImportYumArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportYumArtifactsGcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource; - - /** - * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportYumArtifactsGcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource; - - /** - * Verifies an ImportYumArtifactsGcsSource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ImportYumArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportYumArtifactsGcsSource - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource; - - /** - * Creates a plain object from an ImportYumArtifactsGcsSource message. Also converts values to other types if specified. - * @param message ImportYumArtifactsGcsSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportYumArtifactsGcsSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportYumArtifactsGcsSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportYumArtifactsRequest. */ - interface IImportYumArtifactsRequest { - - /** ImportYumArtifactsRequest gcsSource */ - gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource|null); - - /** ImportYumArtifactsRequest parent */ - parent?: (string|null); - } - - /** Represents an ImportYumArtifactsRequest. */ - class ImportYumArtifactsRequest implements IImportYumArtifactsRequest { - - /** - * Constructs a new ImportYumArtifactsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest); - - /** ImportYumArtifactsRequest gcsSource. */ - public gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource|null); - - /** ImportYumArtifactsRequest parent. */ - public parent: string; - - /** ImportYumArtifactsRequest source. */ - public source?: "gcsSource"; - - /** - * Creates a new ImportYumArtifactsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportYumArtifactsRequest instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest; - - /** - * 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.IImportYumArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IImportYumArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportYumArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest; - - /** - * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportYumArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest; - - /** - * Verifies an ImportYumArtifactsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ImportYumArtifactsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportYumArtifactsRequest - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest; - - /** - * Creates a plain object from an ImportYumArtifactsRequest message. Also converts values to other types if specified. - * @param message ImportYumArtifactsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportYumArtifactsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportYumArtifactsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportYumArtifactsErrorInfo. */ - interface IImportYumArtifactsErrorInfo { - - /** ImportYumArtifactsErrorInfo gcsSource */ - gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource|null); - - /** ImportYumArtifactsErrorInfo error */ - error?: (google.rpc.IStatus|null); - } - - /** Represents an ImportYumArtifactsErrorInfo. */ - class ImportYumArtifactsErrorInfo implements IImportYumArtifactsErrorInfo { - - /** - * Constructs a new ImportYumArtifactsErrorInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo); - - /** ImportYumArtifactsErrorInfo gcsSource. */ - public gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource|null); - - /** ImportYumArtifactsErrorInfo error. */ - public error?: (google.rpc.IStatus|null); - - /** ImportYumArtifactsErrorInfo source. */ - public source?: "gcsSource"; - - /** - * Creates a new ImportYumArtifactsErrorInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportYumArtifactsErrorInfo instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo; - - /** - * 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.IImportYumArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IImportYumArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportYumArtifactsErrorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo; - - /** - * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportYumArtifactsErrorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo; - - /** - * Verifies an ImportYumArtifactsErrorInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ImportYumArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportYumArtifactsErrorInfo - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo; - - /** - * 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.ImportYumArtifactsErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportYumArtifactsErrorInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportYumArtifactsErrorInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportYumArtifactsResponse. */ - interface IImportYumArtifactsResponse { - - /** ImportYumArtifactsResponse yumArtifacts */ - yumArtifacts?: (google.devtools.artifactregistry.v1beta2.IYumArtifact[]|null); - - /** ImportYumArtifactsResponse errors */ - errors?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo[]|null); - } - - /** Represents an ImportYumArtifactsResponse. */ - class ImportYumArtifactsResponse implements IImportYumArtifactsResponse { - - /** - * Constructs a new ImportYumArtifactsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse); - - /** ImportYumArtifactsResponse yumArtifacts. */ - public yumArtifacts: google.devtools.artifactregistry.v1beta2.IYumArtifact[]; - - /** ImportYumArtifactsResponse errors. */ - public errors: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo[]; - - /** - * Creates a new ImportYumArtifactsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportYumArtifactsResponse instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse; - - /** - * 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.IImportYumArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IImportYumArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.ImportYumArtifactsResponse; - - /** - * Decodes an ImportYumArtifactsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.ImportYumArtifactsResponse; - - /** - * 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 an ImportYumArtifactsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportYumArtifactsResponse - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse; - - /** - * 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.ImportYumArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportYumArtifactsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportYumArtifactsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportYumArtifactsMetadata. */ - interface IImportYumArtifactsMetadata { - } - - /** Represents an ImportYumArtifactsMetadata. */ - class ImportYumArtifactsMetadata implements IImportYumArtifactsMetadata { - - /** - * Constructs a new ImportYumArtifactsMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata); - - /** - * Creates a new ImportYumArtifactsMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportYumArtifactsMetadata instance - */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata; - - /** - * 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.IImportYumArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IImportYumArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportYumArtifactsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata; - - /** - * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportYumArtifactsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata; - - /** - * 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 an ImportYumArtifactsMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportYumArtifactsMetadata - */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata; - - /** - * 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.ImportYumArtifactsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportYumArtifactsMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportYumArtifactsMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @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.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @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.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @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.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @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.api.ResourceReference; - - /** - * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @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.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @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.api.Http; - - /** - * Verifies a Http 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 Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Http - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @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.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @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.api.HttpRule; - - /** - * Verifies a HttpRule 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 HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @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.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @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.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { - - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); - - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); - } - - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { - - /** - * Constructs a new CommonLanguageSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; - - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonLanguageSettings instance - */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings - * @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.api.CommonLanguageSettings; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings - * @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.api.CommonLanguageSettings; - - /** - * Verifies a CommonLanguageSettings 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 CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonLanguageSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonLanguageSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); - } - - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { - - /** - * Constructs a new ClientLibrarySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientLibrarySettings instance - */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings - * @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.api.ClientLibrarySettings; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings - * @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.api.ClientLibrarySettings; - - /** - * Verifies a ClientLibrarySettings 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientLibrarySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { - - /** - * Constructs a new Publishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; - - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; - - /** - * Creates a new Publishing instance using the specified properties. - * @param [properties] Properties to set - * @returns Publishing instance - */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publishing - * @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.api.Publishing; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publishing - * @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.api.Publishing; - - /** - * Verifies a Publishing 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 Publishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publishing - */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); - - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { - - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; - - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new JavaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaSettings instance - */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaSettings - * @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.api.JavaSettings; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaSettings - * @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.api.JavaSettings; - - /** - * Verifies a JavaSettings 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 JavaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CppSettings. */ - interface ICppSettings { - - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { - - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); - - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new CppSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CppSettings instance - */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CppSettings - * @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.api.CppSettings; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CppSettings - * @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.api.CppSettings; - - /** - * Verifies a CppSettings 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 CppSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CppSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CppSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhpSettings. */ - interface IPhpSettings { - - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { - - /** - * Constructs a new PhpSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPhpSettings); - - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PhpSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PhpSettings instance - */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhpSettings - * @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.api.PhpSettings; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhpSettings - * @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.api.PhpSettings; - - /** - * Verifies a PhpSettings 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 PhpSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhpSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhpSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhpSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonSettings. */ - interface IPythonSettings { - - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @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.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @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.api.PythonSettings; - - /** - * Verifies a PythonSettings 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 PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @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.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @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.api.NodeSettings; - - /** - * Verifies a NodeSettings 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 NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); - - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); - - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); - - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } - - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { - - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; - - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; - - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; - - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @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.api.DotnetSettings; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @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.api.DotnetSettings; - - /** - * Verifies a DotnetSettings 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 DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RubySettings. */ - interface IRubySettings { - - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); - - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @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.api.RubySettings; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @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.api.RubySettings; - - /** - * Verifies a RubySettings 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 RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoSettings. */ - interface IGoSettings { - - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @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.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @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.api.GoSettings; - - /** - * Verifies a GoSettings 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 GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); - } - - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { - - /** - * Constructs a new MethodSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; - - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodSettings instance - */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodSettings - * @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.api.MethodSettings; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodSettings - * @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.api.MethodSettings; - - /** - * Verifies a MethodSettings 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 MethodSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @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.api.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @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.api.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning 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 LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @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.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @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.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @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.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @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.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @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.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @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.DescriptorProto; - - /** - * Verifies a DescriptorProto 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @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.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @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.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange 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 ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @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.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @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.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange 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 ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @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.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @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.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @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.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @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.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration 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 Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @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.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @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.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @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.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @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.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto 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 OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @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.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @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.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @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.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @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.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange 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 EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @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.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @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.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto 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 EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @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.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @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.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @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.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @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.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @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.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @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.FileOptions; - - /** - * Verifies a FileOptions 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 FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @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.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @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.MessageOptions; - - /** - * Verifies a MessageOptions 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 MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions debugRedact. */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @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.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @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.FieldOptions; - - /** - * Verifies a FieldOptions 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 FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** EditionDefault value */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** EditionDefault value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @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.FieldOptions.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @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.FieldOptions.EditionDefault; - - /** - * Verifies an EditionDefault 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 EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @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.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @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.OneofOptions; - - /** - * Verifies an OneofOptions 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 OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @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.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @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.EnumOptions; - - /** - * Verifies an EnumOptions 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 EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @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.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @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.EnumValueOptions; - - /** - * Verifies an EnumValueOptions 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); - - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - - /** ServiceOptions .google.api.apiVersion */ - ".google.api.apiVersion"?: (string|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @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.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @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.ServiceOptions; - - /** - * Verifies a ServiceOptions 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @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.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @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.MethodOptions; - - /** - * Verifies a MethodOptions 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 MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|Buffer|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|Buffer|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @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.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @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.UninterpretedOption; - - /** - * Verifies an UninterpretedOption 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 UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @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.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @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.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart 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 NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } - - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @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.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @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.FeatureSet; - - /** - * Verifies a FeatureSet 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 FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @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.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @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.FeatureSetDefaults; - - /** - * Verifies a FeatureSetDefaults 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 FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } - - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @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.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @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.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Verifies a FeatureSetEditionDefault 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 FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @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.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @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.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @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.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @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.SourceCodeInfo.Location; - - /** - * Verifies a Location 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 Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** 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 }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - 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); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|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; - - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - - /** - * 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 }; - - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Annotation { - - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|Buffer|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|Buffer|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an 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; - - /** - * 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; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates 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; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Any - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); - } - - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { - - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; - - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; - - /** - * Verifies a FieldMask message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldMask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Struct. */ - interface IStruct { - - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); - } - - /** Represents a Struct. */ - class Struct implements IStruct { - - /** - * Constructs a new Struct. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStruct); - - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; - - /** - * Creates a new Struct instance using the specified properties. - * @param [properties] Properties to set - * @returns Struct instance - */ - public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; - - /** - * 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.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.Struct; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.Struct; - - /** - * Verifies a Struct message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Struct - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Struct to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Struct - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Value. */ - interface IValue { - - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue */ - numberValue?: (number|null); - - /** Value stringValue */ - stringValue?: (string|null); - - /** Value boolValue */ - boolValue?: (boolean|null); - - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); - - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); - } - - /** Represents a Value. */ - class Value implements IValue { - - /** - * Constructs a new Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IValue); - - /** Value nullValue. */ - public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue. */ - public numberValue?: (number|null); - - /** Value stringValue. */ - public stringValue?: (string|null); - - /** Value boolValue. */ - public boolValue?: (boolean|null); - - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); - - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); - - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); - - /** - * Creates a new Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Value instance - */ - public static create(properties?: google.protobuf.IValue): google.protobuf.Value; - - /** - * 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.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.Value; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.Value; - - /** - * 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 Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; - - /** - * 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.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** NullValue enum. */ - enum NullValue { - NULL_VALUE = 0 - } - - /** Properties of a ListValue. */ - interface IListValue { - - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); - } - - /** Represents a ListValue. */ - class ListValue implements IListValue { - - /** - * Constructs a new ListValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IListValue); - - /** ListValue values. */ - public values: google.protobuf.IValue[]; - - /** - * Creates a new ListValue instance using the specified properties. - * @param [properties] Properties to set - * @returns ListValue instance - */ - public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; - - /** - * 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.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.ListValue; - - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.ListValue; - - /** - * Verifies a ListValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; - - /** - * 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.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * 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.IEmpty, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.Empty; - - /** - * 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 an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * 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.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace type. */ - namespace type { - - /** Properties of an Expr. */ - interface IExpr { - - /** Expr expression */ - expression?: (string|null); - - /** Expr title */ - title?: (string|null); - - /** Expr description */ - description?: (string|null); - - /** Expr location */ - location?: (string|null); - } - - /** Represents an Expr. */ - class Expr implements IExpr { - - /** - * Constructs a new Expr. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IExpr); - - /** Expr expression. */ - public expression: string; - - /** Expr title. */ - public title: string; - - /** Expr description. */ - public description: string; - - /** Expr location. */ - public location: string; - - /** - * Creates a new Expr instance using the specified properties. - * @param [properties] Properties to set - * @returns Expr instance - */ - public static create(properties?: google.type.IExpr): google.type.Expr; - - /** - * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @param message Expr message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @param message Expr message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Expr message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Expr - * @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.type.Expr; - - /** - * Decodes an Expr message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Expr - * @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.type.Expr; - - /** - * Verifies an Expr 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 Expr message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Expr - */ - public static fromObject(object: { [k: string]: any }): google.type.Expr; - - /** - * Creates a plain object from an Expr message. Also converts values to other types if specified. - * @param message Expr - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Expr to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Expr - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace iam. */ - namespace iam { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a IAMPolicy */ - class IAMPolicy extends $protobuf.rpc.Service { - - /** - * Constructs a new IAMPolicy service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new IAMPolicy service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): IAMPolicy; - - /** - * 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.iam.v1.IAMPolicy.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.iam.v1.IAMPolicy.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.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - } - - namespace IAMPolicy { - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|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.iam.v1.IAMPolicy|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.iam.v1.IAMPolicy|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - } - - /** Properties of a SetIamPolicyRequest. */ - interface ISetIamPolicyRequest { - - /** SetIamPolicyRequest resource */ - resource?: (string|null); - - /** SetIamPolicyRequest policy */ - policy?: (google.iam.v1.IPolicy|null); - - /** SetIamPolicyRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a SetIamPolicyRequest. */ - class SetIamPolicyRequest implements ISetIamPolicyRequest { - - /** - * Constructs a new SetIamPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ISetIamPolicyRequest); - - /** SetIamPolicyRequest resource. */ - public resource: string; - - /** SetIamPolicyRequest policy. */ - public policy?: (google.iam.v1.IPolicy|null); - - /** SetIamPolicyRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new SetIamPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetIamPolicyRequest instance - */ - public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; - - /** - * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @param message SetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @param message SetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest; - - /** - * Verifies a SetIamPolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetIamPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; - - /** - * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. - * @param message SetIamPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetIamPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetIamPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetIamPolicyRequest. */ - interface IGetIamPolicyRequest { - - /** GetIamPolicyRequest resource */ - resource?: (string|null); - - /** GetIamPolicyRequest options */ - options?: (google.iam.v1.IGetPolicyOptions|null); - } - - /** Represents a GetIamPolicyRequest. */ - class GetIamPolicyRequest implements IGetIamPolicyRequest { - - /** - * Constructs a new GetIamPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IGetIamPolicyRequest); - - /** GetIamPolicyRequest resource. */ - public resource: string; - - /** GetIamPolicyRequest options. */ - public options?: (google.iam.v1.IGetPolicyOptions|null); - - /** - * Creates a new GetIamPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetIamPolicyRequest instance - */ - public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; - - /** - * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @param message GetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @param message GetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest; - - /** - * Verifies a GetIamPolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetIamPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; - - /** - * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. - * @param message GetIamPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetIamPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetIamPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TestIamPermissionsRequest. */ - interface ITestIamPermissionsRequest { - - /** TestIamPermissionsRequest resource */ - resource?: (string|null); - - /** TestIamPermissionsRequest permissions */ - permissions?: (string[]|null); - } - - /** Represents a TestIamPermissionsRequest. */ - class TestIamPermissionsRequest implements ITestIamPermissionsRequest { - - /** - * Constructs a new TestIamPermissionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); - - /** TestIamPermissionsRequest resource. */ - public resource: string; - - /** TestIamPermissionsRequest permissions. */ - public permissions: string[]; - - /** - * Creates a new TestIamPermissionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TestIamPermissionsRequest instance - */ - public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; - - /** - * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @param message TestIamPermissionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @param message TestIamPermissionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest; - - /** - * Verifies a TestIamPermissionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TestIamPermissionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; - - /** - * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. - * @param message TestIamPermissionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TestIamPermissionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TestIamPermissionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TestIamPermissionsResponse. */ - interface ITestIamPermissionsResponse { - - /** TestIamPermissionsResponse permissions */ - permissions?: (string[]|null); - } - - /** Represents a TestIamPermissionsResponse. */ - class TestIamPermissionsResponse implements ITestIamPermissionsResponse { - - /** - * Constructs a new TestIamPermissionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); - - /** TestIamPermissionsResponse permissions. */ - public permissions: string[]; - - /** - * Creates a new TestIamPermissionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns TestIamPermissionsResponse instance - */ - public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; - - /** - * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @param message TestIamPermissionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @param message TestIamPermissionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse; - - /** - * Verifies a TestIamPermissionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TestIamPermissionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; - - /** - * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. - * @param message TestIamPermissionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TestIamPermissionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TestIamPermissionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPolicyOptions. */ - interface IGetPolicyOptions { - - /** GetPolicyOptions requestedPolicyVersion */ - requestedPolicyVersion?: (number|null); - } - - /** Represents a GetPolicyOptions. */ - class GetPolicyOptions implements IGetPolicyOptions { - - /** - * Constructs a new GetPolicyOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IGetPolicyOptions); - - /** GetPolicyOptions requestedPolicyVersion. */ - public requestedPolicyVersion: number; - - /** - * Creates a new GetPolicyOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPolicyOptions instance - */ - public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; - - /** - * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @param message GetPolicyOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @param message GetPolicyOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions; - - /** - * Verifies a GetPolicyOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPolicyOptions - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; - - /** - * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. - * @param message GetPolicyOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPolicyOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPolicyOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Policy. */ - interface IPolicy { - - /** Policy version */ - version?: (number|null); - - /** Policy bindings */ - bindings?: (google.iam.v1.IBinding[]|null); - - /** Policy auditConfigs */ - auditConfigs?: (google.iam.v1.IAuditConfig[]|null); - - /** Policy etag */ - etag?: (Uint8Array|Buffer|string|null); - } - - /** Represents a Policy. */ - class Policy implements IPolicy { - - /** - * Constructs a new Policy. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IPolicy); - - /** Policy version. */ - public version: number; - - /** Policy bindings. */ - public bindings: google.iam.v1.IBinding[]; - - /** Policy auditConfigs. */ - public auditConfigs: google.iam.v1.IAuditConfig[]; - - /** Policy etag. */ - public etag: (Uint8Array|Buffer|string); - - /** - * Creates a new Policy instance using the specified properties. - * @param [properties] Properties to set - * @returns Policy instance - */ - public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; - - /** - * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @param message Policy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @param message Policy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Policy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; - - /** - * Decodes a Policy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; - - /** - * Verifies a Policy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Policy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Policy - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; - - /** - * Creates a plain object from a Policy message. Also converts values to other types if specified. - * @param message Policy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Policy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Policy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Binding. */ - interface IBinding { - - /** Binding role */ - role?: (string|null); - - /** Binding members */ - members?: (string[]|null); - - /** Binding condition */ - condition?: (google.type.IExpr|null); - } - - /** Represents a Binding. */ - class Binding implements IBinding { - - /** - * Constructs a new Binding. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IBinding); - - /** Binding role. */ - public role: string; - - /** Binding members. */ - public members: string[]; - - /** Binding condition. */ - public condition?: (google.type.IExpr|null); - - /** - * Creates a new Binding instance using the specified properties. - * @param [properties] Properties to set - * @returns Binding instance - */ - public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; - - /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Binding message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; - - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; - - /** - * Verifies a Binding message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Binding - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; - - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @param message Binding - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Binding to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Binding - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AuditConfig. */ - interface IAuditConfig { - - /** AuditConfig service */ - service?: (string|null); - - /** AuditConfig auditLogConfigs */ - auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); - } - - /** Represents an AuditConfig. */ - class AuditConfig implements IAuditConfig { - - /** - * Constructs a new AuditConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditConfig); - - /** AuditConfig service. */ - public service: string; - - /** AuditConfig auditLogConfigs. */ - public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; - - /** - * Creates a new AuditConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditConfig instance - */ - public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; - - /** - * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @param message AuditConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @param message AuditConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; - - /** - * Decodes an AuditConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; - - /** - * Verifies an AuditConfig 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 AuditConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditConfig - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; - - /** - * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. - * @param message AuditConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AuditLogConfig. */ - interface IAuditLogConfig { - - /** AuditLogConfig logType */ - logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); - - /** AuditLogConfig exemptedMembers */ - exemptedMembers?: (string[]|null); - } - - /** Represents an AuditLogConfig. */ - class AuditLogConfig implements IAuditLogConfig { - - /** - * Constructs a new AuditLogConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditLogConfig); - - /** AuditLogConfig logType. */ - public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); - - /** AuditLogConfig exemptedMembers. */ - public exemptedMembers: string[]; - - /** - * Creates a new AuditLogConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditLogConfig instance - */ - public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; - - /** - * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @param message AuditLogConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @param message AuditLogConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; - - /** - * Verifies an AuditLogConfig 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 AuditLogConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditLogConfig - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; - - /** - * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. - * @param message AuditLogConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditLogConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditLogConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AuditLogConfig { - - /** LogType enum. */ - enum LogType { - LOG_TYPE_UNSPECIFIED = 0, - ADMIN_READ = 1, - DATA_WRITE = 2, - DATA_READ = 3 - } - } - - /** Properties of a PolicyDelta. */ - interface IPolicyDelta { - - /** PolicyDelta bindingDeltas */ - bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); - - /** PolicyDelta auditConfigDeltas */ - auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); - } - - /** Represents a PolicyDelta. */ - class PolicyDelta implements IPolicyDelta { - - /** - * Constructs a new PolicyDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IPolicyDelta); - - /** PolicyDelta bindingDeltas. */ - public bindingDeltas: google.iam.v1.IBindingDelta[]; - - /** PolicyDelta auditConfigDeltas. */ - public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; - - /** - * Creates a new PolicyDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns PolicyDelta instance - */ - public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; - - /** - * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @param message PolicyDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @param message PolicyDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; - - /** - * Verifies a PolicyDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PolicyDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; - - /** - * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. - * @param message PolicyDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PolicyDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PolicyDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BindingDelta. */ - interface IBindingDelta { - - /** BindingDelta action */ - action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); - - /** BindingDelta role */ - role?: (string|null); - - /** BindingDelta member */ - member?: (string|null); - - /** BindingDelta condition */ - condition?: (google.type.IExpr|null); - } - - /** Represents a BindingDelta. */ - class BindingDelta implements IBindingDelta { - - /** - * Constructs a new BindingDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IBindingDelta); - - /** BindingDelta action. */ - public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); - - /** BindingDelta role. */ - public role: string; - - /** BindingDelta member. */ - public member: string; - - /** BindingDelta condition. */ - public condition?: (google.type.IExpr|null); - - /** - * Creates a new BindingDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns BindingDelta instance - */ - public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; - - /** - * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @param message BindingDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @param message BindingDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BindingDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; - - /** - * Decodes a BindingDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; - - /** - * Verifies a BindingDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BindingDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; - - /** - * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. - * @param message BindingDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BindingDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BindingDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BindingDelta { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } - - /** Properties of an AuditConfigDelta. */ - interface IAuditConfigDelta { - - /** AuditConfigDelta action */ - action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); - - /** AuditConfigDelta service */ - service?: (string|null); - - /** AuditConfigDelta exemptedMember */ - exemptedMember?: (string|null); - - /** AuditConfigDelta logType */ - logType?: (string|null); - } - - /** Represents an AuditConfigDelta. */ - class AuditConfigDelta implements IAuditConfigDelta { - - /** - * Constructs a new AuditConfigDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditConfigDelta); - - /** AuditConfigDelta action. */ - public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); - - /** AuditConfigDelta service. */ - public service: string; - - /** AuditConfigDelta exemptedMember. */ - public exemptedMember: string; - - /** AuditConfigDelta logType. */ - public logType: string; - - /** - * Creates a new AuditConfigDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditConfigDelta instance - */ - public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; - - /** - * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @param message AuditConfigDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @param message AuditConfigDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; - - /** - * Verifies an AuditConfigDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditConfigDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; - - /** - * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. - * @param message AuditConfigDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditConfigDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditConfigDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AuditConfigDelta { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } - } - } - - /** Namespace longrunning. */ - namespace longrunning { - - /** Represents an Operations */ - class Operations extends $protobuf.rpc.Service { - - /** - * Constructs a new Operations 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 Operations 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): Operations; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOperationsResponse - */ - public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @returns Promise - */ - public listOperations(request: google.longrunning.IListOperationsRequest): Promise; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @returns Promise - */ - public getOperation(request: google.longrunning.IGetOperationRequest): Promise; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @returns Promise - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @returns Promise - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @returns Promise - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; - } - - namespace Operations { - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @param error Error, if any - * @param [response] ListOperationsResponse - */ - type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of an Operation. */ - interface IOperation { - - /** Operation name */ - name?: (string|null); - - /** Operation metadata */ - metadata?: (google.protobuf.IAny|null); - - /** Operation done */ - done?: (boolean|null); - - /** Operation error */ - error?: (google.rpc.IStatus|null); - - /** Operation response */ - response?: (google.protobuf.IAny|null); - } - - /** Represents an Operation. */ - class Operation implements IOperation { - - /** - * Constructs a new Operation. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperation); - - /** Operation name. */ - public name: string; - - /** Operation metadata. */ - public metadata?: (google.protobuf.IAny|null); - - /** Operation done. */ - public done: boolean; - - /** Operation error. */ - public error?: (google.rpc.IStatus|null); - - /** Operation response. */ - public response?: (google.protobuf.IAny|null); - - /** Operation result. */ - public result?: ("error"|"response"); - - /** - * Creates a new Operation instance using the specified properties. - * @param [properties] Properties to set - * @returns Operation instance - */ - public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Operation - * @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.longrunning.Operation; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Operation - * @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.longrunning.Operation; - - /** - * Verifies an Operation 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 Operation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Operation - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @param message Operation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Operation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Operation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetOperationRequest. */ - interface IGetOperationRequest { - - /** GetOperationRequest name */ - name?: (string|null); - } - - /** Represents a GetOperationRequest. */ - class GetOperationRequest implements IGetOperationRequest { - - /** - * Constructs a new GetOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IGetOperationRequest); - - /** GetOperationRequest name. */ - public name: string; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOperationRequest instance - */ - public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOperationRequest - * @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.longrunning.GetOperationRequest; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOperationRequest - * @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.longrunning.GetOperationRequest; - - /** - * Verifies a GetOperationRequest 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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @param message GetOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsRequest. */ - interface IListOperationsRequest { - - /** ListOperationsRequest name */ - name?: (string|null); - - /** ListOperationsRequest filter */ - filter?: (string|null); - - /** ListOperationsRequest pageSize */ - pageSize?: (number|null); - - /** ListOperationsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListOperationsRequest. */ - class ListOperationsRequest implements IListOperationsRequest { - - /** - * Constructs a new ListOperationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsRequest); - - /** ListOperationsRequest name. */ - public name: string; - - /** ListOperationsRequest filter. */ - public filter: string; - - /** ListOperationsRequest pageSize. */ - public pageSize: number; - - /** ListOperationsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsRequest instance - */ - public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsRequest - * @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.longrunning.ListOperationsRequest; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsRequest - * @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.longrunning.ListOperationsRequest; - - /** - * Verifies a ListOperationsRequest 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 ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @param message ListOperationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsResponse. */ - interface IListOperationsResponse { - - /** ListOperationsResponse operations */ - operations?: (google.longrunning.IOperation[]|null); - - /** ListOperationsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListOperationsResponse. */ - class ListOperationsResponse implements IListOperationsResponse { - - /** - * Constructs a new ListOperationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsResponse); - - /** ListOperationsResponse operations. */ - public operations: google.longrunning.IOperation[]; - - /** ListOperationsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsResponse instance - */ - public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsResponse - * @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.longrunning.ListOperationsResponse; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsResponse - * @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.longrunning.ListOperationsResponse; - - /** - * Verifies a ListOperationsResponse 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 ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @param message ListOperationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelOperationRequest. */ - interface ICancelOperationRequest { - - /** CancelOperationRequest name */ - name?: (string|null); - } - - /** Represents a CancelOperationRequest. */ - class CancelOperationRequest implements ICancelOperationRequest { - - /** - * Constructs a new CancelOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.ICancelOperationRequest); - - /** CancelOperationRequest name. */ - public name: string; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelOperationRequest instance - */ - public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelOperationRequest - * @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.longrunning.CancelOperationRequest; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelOperationRequest - * @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.longrunning.CancelOperationRequest; - - /** - * Verifies a CancelOperationRequest 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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @param message CancelOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteOperationRequest. */ - interface IDeleteOperationRequest { - - /** DeleteOperationRequest name */ - name?: (string|null); - } - - /** Represents a DeleteOperationRequest. */ - class DeleteOperationRequest implements IDeleteOperationRequest { - - /** - * Constructs a new DeleteOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IDeleteOperationRequest); - - /** DeleteOperationRequest name. */ - public name: string; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteOperationRequest instance - */ - public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteOperationRequest - * @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.longrunning.DeleteOperationRequest; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteOperationRequest - * @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.longrunning.DeleteOperationRequest; - - /** - * Verifies a DeleteOperationRequest 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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @param message DeleteOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WaitOperationRequest. */ - interface IWaitOperationRequest { - - /** WaitOperationRequest name */ - name?: (string|null); - - /** WaitOperationRequest timeout */ - timeout?: (google.protobuf.IDuration|null); - } - - /** Represents a WaitOperationRequest. */ - class WaitOperationRequest implements IWaitOperationRequest { - - /** - * Constructs a new WaitOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IWaitOperationRequest); - - /** WaitOperationRequest name. */ - public name: string; - - /** WaitOperationRequest timeout. */ - public timeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns WaitOperationRequest instance - */ - public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WaitOperationRequest - * @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.longrunning.WaitOperationRequest; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WaitOperationRequest - * @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.longrunning.WaitOperationRequest; - - /** - * Verifies a WaitOperationRequest 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 WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WaitOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @param message WaitOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WaitOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WaitOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OperationInfo. */ - interface IOperationInfo { - - /** OperationInfo responseType */ - responseType?: (string|null); - - /** OperationInfo metadataType */ - metadataType?: (string|null); - } - - /** Represents an OperationInfo. */ - class OperationInfo implements IOperationInfo { - - /** - * Constructs a new OperationInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperationInfo); - - /** OperationInfo responseType. */ - public responseType: string; - - /** OperationInfo metadataType. */ - public metadataType: string; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationInfo instance - */ - public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationInfo - * @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.longrunning.OperationInfo; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationInfo - * @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.longrunning.OperationInfo; - - /** - * Verifies an OperationInfo 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 OperationInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationInfo - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @param message OperationInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/protos.js b/owl-bot-staging/google-devtools-artifactregistry/protos/protos.js deleted file mode 100644 index c1bbd9102cf..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/protos.js +++ /dev/null @@ -1,71994 +0,0 @@ -// Copyright 2025 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. - -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); - -})(this, function($protobuf) { - "use strict"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots._google_cloud_artifact_registry_protos || ($protobuf.roots._google_cloud_artifact_registry_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.devtools = (function() { - - /** - * Namespace devtools. - * @memberof google - * @namespace - */ - var devtools = {}; - - devtools.artifactregistry = (function() { - - /** - * Namespace artifactregistry. - * @memberof google.devtools - * @namespace - */ - var artifactregistry = {}; - - artifactregistry.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.devtools.artifactregistry - * @namespace - */ - var v1 = {}; - - v1.AptArtifact = (function() { - - /** - * Properties of an AptArtifact. - * @memberof google.devtools.artifactregistry.v1 - * @interface IAptArtifact - * @property {string|null} [name] AptArtifact name - * @property {string|null} [packageName] AptArtifact packageName - * @property {google.devtools.artifactregistry.v1.AptArtifact.PackageType|null} [packageType] AptArtifact packageType - * @property {string|null} [architecture] AptArtifact architecture - * @property {string|null} [component] AptArtifact component - * @property {Uint8Array|null} [controlFile] AptArtifact controlFile - */ - - /** - * Constructs a new AptArtifact. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an AptArtifact. - * @implements IAptArtifact - * @constructor - * @param {google.devtools.artifactregistry.v1.IAptArtifact=} [properties] Properties to set - */ - function AptArtifact(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]]; - } - - /** - * AptArtifact name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @instance - */ - AptArtifact.prototype.name = ""; - - /** - * AptArtifact packageName. - * @member {string} packageName - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @instance - */ - AptArtifact.prototype.packageName = ""; - - /** - * AptArtifact packageType. - * @member {google.devtools.artifactregistry.v1.AptArtifact.PackageType} packageType - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @instance - */ - AptArtifact.prototype.packageType = 0; - - /** - * AptArtifact architecture. - * @member {string} architecture - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @instance - */ - AptArtifact.prototype.architecture = ""; - - /** - * AptArtifact component. - * @member {string} component - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @instance - */ - AptArtifact.prototype.component = ""; - - /** - * AptArtifact controlFile. - * @member {Uint8Array} controlFile - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @instance - */ - AptArtifact.prototype.controlFile = $util.newBuffer([]); - - /** - * Creates a new AptArtifact instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IAptArtifact=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.AptArtifact} AptArtifact instance - */ - AptArtifact.create = function create(properties) { - return new AptArtifact(properties); - }; - - /** - * Encodes the specified AptArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.AptArtifact.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IAptArtifact} message AptArtifact message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AptArtifact.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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 AptArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.AptArtifact.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IAptArtifact} message AptArtifact message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AptArtifact.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AptArtifact message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.AptArtifact} AptArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AptArtifact.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.AptArtifact(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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; - } - case 5: { - message.component = reader.string(); - break; - } - case 6: { - message.controlFile = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AptArtifact message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.AptArtifact} AptArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AptArtifact.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AptArtifact message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AptArtifact.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.packageName != null && message.hasOwnProperty("packageName")) - if (!$util.isString(message.packageName)) - return "packageName: string expected"; - if (message.packageType != null && message.hasOwnProperty("packageType")) - switch (message.packageType) { - default: - return "packageType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.architecture != null && message.hasOwnProperty("architecture")) - if (!$util.isString(message.architecture)) - return "architecture: string expected"; - if (message.component != null && message.hasOwnProperty("component")) - if (!$util.isString(message.component)) - return "component: string expected"; - if (message.controlFile != null && message.hasOwnProperty("controlFile")) - if (!(message.controlFile && typeof message.controlFile.length === "number" || $util.isString(message.controlFile))) - return "controlFile: buffer expected"; - return null; - }; - - /** - * Creates an AptArtifact message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.AptArtifact} AptArtifact - */ - AptArtifact.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.AptArtifact) - return object; - var message = new $root.google.devtools.artifactregistry.v1.AptArtifact(); - if (object.name != null) - message.name = String(object.name); - if (object.packageName != null) - message.packageName = String(object.packageName); - switch (object.packageType) { - default: - if (typeof object.packageType === "number") { - message.packageType = object.packageType; - break; - } - break; - case "PACKAGE_TYPE_UNSPECIFIED": - case 0: - message.packageType = 0; - break; - case "BINARY": - case 1: - message.packageType = 1; - break; - case "SOURCE": - case 2: - message.packageType = 2; - break; - } - if (object.architecture != null) - message.architecture = String(object.architecture); - if (object.component != null) - message.component = String(object.component); - if (object.controlFile != null) - if (typeof object.controlFile === "string") - $util.base64.decode(object.controlFile, message.controlFile = $util.newBuffer($util.base64.length(object.controlFile)), 0); - else if (object.controlFile.length >= 0) - message.controlFile = object.controlFile; - return message; - }; - - /** - * Creates a plain object from an AptArtifact message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @static - * @param {google.devtools.artifactregistry.v1.AptArtifact} message AptArtifact - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AptArtifact.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 = ""; - object.component = ""; - if (options.bytes === String) - object.controlFile = ""; - else { - object.controlFile = []; - if (options.bytes !== Array) - object.controlFile = $util.newBuffer(object.controlFile); - } - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.packageName != null && message.hasOwnProperty("packageName")) - object.packageName = message.packageName; - if (message.packageType != null && message.hasOwnProperty("packageType")) - object.packageType = options.enums === String ? $root.google.devtools.artifactregistry.v1.AptArtifact.PackageType[message.packageType] === undefined ? message.packageType : $root.google.devtools.artifactregistry.v1.AptArtifact.PackageType[message.packageType] : message.packageType; - if (message.architecture != null && message.hasOwnProperty("architecture")) - object.architecture = message.architecture; - if (message.component != null && message.hasOwnProperty("component")) - object.component = message.component; - if (message.controlFile != null && message.hasOwnProperty("controlFile")) - object.controlFile = options.bytes === String ? $util.base64.encode(message.controlFile, 0, message.controlFile.length) : options.bytes === Array ? Array.prototype.slice.call(message.controlFile) : message.controlFile; - return object; - }; - - /** - * Converts this AptArtifact to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @instance - * @returns {Object.} JSON object - */ - AptArtifact.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AptArtifact - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.AptArtifact - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AptArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.AptArtifact"; - }; - - /** - * PackageType enum. - * @name google.devtools.artifactregistry.v1.AptArtifact.PackageType - * @enum {number} - * @property {number} PACKAGE_TYPE_UNSPECIFIED=0 PACKAGE_TYPE_UNSPECIFIED value - * @property {number} BINARY=1 BINARY value - * @property {number} SOURCE=2 SOURCE value - */ - AptArtifact.PackageType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PACKAGE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BINARY"] = 1; - values[valuesById[2] = "SOURCE"] = 2; - return values; - })(); - - return AptArtifact; - })(); - - v1.ImportAptArtifactsGcsSource = (function() { - - /** - * Properties of an ImportAptArtifactsGcsSource. - * @memberof google.devtools.artifactregistry.v1 - * @interface IImportAptArtifactsGcsSource - * @property {Array.|null} [uris] ImportAptArtifactsGcsSource uris - * @property {boolean|null} [useWildcards] ImportAptArtifactsGcsSource useWildcards - */ - - /** - * Constructs a new ImportAptArtifactsGcsSource. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ImportAptArtifactsGcsSource. - * @implements IImportAptArtifactsGcsSource - * @constructor - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource=} [properties] Properties to set - */ - function ImportAptArtifactsGcsSource(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]]; - } - - /** - * ImportAptArtifactsGcsSource uris. - * @member {Array.} uris - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource - * @instance - */ - ImportAptArtifactsGcsSource.prototype.uris = $util.emptyArray; - - /** - * ImportAptArtifactsGcsSource useWildcards. - * @member {boolean} useWildcards - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource - * @instance - */ - ImportAptArtifactsGcsSource.prototype.useWildcards = false; - - /** - * Creates a new ImportAptArtifactsGcsSource instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource instance - */ - ImportAptArtifactsGcsSource.create = function create(properties) { - return new ImportAptArtifactsGcsSource(properties); - }; - - /** - * Encodes the specified ImportAptArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource} message ImportAptArtifactsGcsSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportAptArtifactsGcsSource.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 ImportAptArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource} message ImportAptArtifactsGcsSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportAptArtifactsGcsSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportAptArtifactsGcsSource message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsGcsSource.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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 ImportAptArtifactsGcsSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsGcsSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportAptArtifactsGcsSource message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportAptArtifactsGcsSource.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 ImportAptArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource - */ - ImportAptArtifactsGcsSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource(); - if (object.uris) { - if (!Array.isArray(object.uris)) - throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.uris: array expected"); - message.uris = []; - for (var i = 0; i < object.uris.length; ++i) - message.uris[i] = String(object.uris[i]); - } - if (object.useWildcards != null) - message.useWildcards = Boolean(object.useWildcards); - return message; - }; - - /** - * Creates a plain object from an ImportAptArtifactsGcsSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource - * @static - * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} message ImportAptArtifactsGcsSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportAptArtifactsGcsSource.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 ImportAptArtifactsGcsSource to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource - * @instance - * @returns {Object.} JSON object - */ - ImportAptArtifactsGcsSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportAptArtifactsGcsSource - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportAptArtifactsGcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource"; - }; - - return ImportAptArtifactsGcsSource; - })(); - - v1.ImportAptArtifactsRequest = (function() { - - /** - * Properties of an ImportAptArtifactsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IImportAptArtifactsRequest - * @property {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null} [gcsSource] ImportAptArtifactsRequest gcsSource - * @property {string|null} [parent] ImportAptArtifactsRequest parent - */ - - /** - * Constructs a new ImportAptArtifactsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ImportAptArtifactsRequest. - * @implements IImportAptArtifactsRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest=} [properties] Properties to set - */ - function ImportAptArtifactsRequest(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]]; - } - - /** - * ImportAptArtifactsRequest gcsSource. - * @member {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null|undefined} gcsSource - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest - * @instance - */ - ImportAptArtifactsRequest.prototype.gcsSource = null; - - /** - * ImportAptArtifactsRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest - * @instance - */ - ImportAptArtifactsRequest.prototype.parent = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ImportAptArtifactsRequest source. - * @member {"gcsSource"|undefined} source - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest - * @instance - */ - Object.defineProperty(ImportAptArtifactsRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ImportAptArtifactsRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} ImportAptArtifactsRequest instance - */ - ImportAptArtifactsRequest.create = function create(properties) { - return new ImportAptArtifactsRequest(properties); - }; - - /** - * Encodes the specified ImportAptArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest} message ImportAptArtifactsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) - $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.encode(message.gcsSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ImportAptArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest} message ImportAptArtifactsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportAptArtifactsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} ImportAptArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.decode(reader, reader.uint32()); - break; - } - case 1: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} ImportAptArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportAptArtifactsRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - 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.v1.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"; - return null; - }; - - /** - * Creates an ImportAptArtifactsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} ImportAptArtifactsRequest - */ - ImportAptArtifactsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest(); - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.gcsSource: object expected"); - message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.fromObject(object.gcsSource); - } - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from an ImportAptArtifactsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest - * @static - * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} message ImportAptArtifactsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportAptArtifactsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; - } - return object; - }; - - /** - * Converts this ImportAptArtifactsRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest - * @instance - * @returns {Object.} JSON object - */ - ImportAptArtifactsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportAptArtifactsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportAptArtifactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportAptArtifactsRequest"; - }; - - return ImportAptArtifactsRequest; - })(); - - v1.ImportAptArtifactsErrorInfo = (function() { - - /** - * Properties of an ImportAptArtifactsErrorInfo. - * @memberof google.devtools.artifactregistry.v1 - * @interface IImportAptArtifactsErrorInfo - * @property {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null} [gcsSource] ImportAptArtifactsErrorInfo gcsSource - * @property {google.rpc.IStatus|null} [error] ImportAptArtifactsErrorInfo error - */ - - /** - * Constructs a new ImportAptArtifactsErrorInfo. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ImportAptArtifactsErrorInfo. - * @implements IImportAptArtifactsErrorInfo - * @constructor - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo=} [properties] Properties to set - */ - function ImportAptArtifactsErrorInfo(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]]; - } - - /** - * ImportAptArtifactsErrorInfo gcsSource. - * @member {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null|undefined} gcsSource - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo - * @instance - */ - ImportAptArtifactsErrorInfo.prototype.gcsSource = null; - - /** - * ImportAptArtifactsErrorInfo error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo - * @instance - */ - ImportAptArtifactsErrorInfo.prototype.error = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ImportAptArtifactsErrorInfo source. - * @member {"gcsSource"|undefined} source - * @memberof google.devtools.artifactregistry.v1.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.v1.ImportAptArtifactsErrorInfo - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo instance - */ - ImportAptArtifactsErrorInfo.create = function create(properties) { - return new ImportAptArtifactsErrorInfo(properties); - }; - - /** - * Encodes the specified ImportAptArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo} message ImportAptArtifactsErrorInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportAptArtifactsErrorInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) - $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ImportAptArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo} message ImportAptArtifactsErrorInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportAptArtifactsErrorInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportAptArtifactsErrorInfo message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsErrorInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.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 ImportAptArtifactsErrorInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsErrorInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportAptArtifactsErrorInfo message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportAptArtifactsErrorInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - properties.source = 1; - { - var error = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.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 ImportAptArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo - */ - ImportAptArtifactsErrorInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo(); - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.gcsSource: object expected"); - message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.fromObject(object.gcsSource); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - return message; - }; - - /** - * Creates a plain object from an ImportAptArtifactsErrorInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo - * @static - * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} message ImportAptArtifactsErrorInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportAptArtifactsErrorInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.error = null; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.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 ImportAptArtifactsErrorInfo to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo - * @instance - * @returns {Object.} JSON object - */ - ImportAptArtifactsErrorInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportAptArtifactsErrorInfo - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportAptArtifactsErrorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo"; - }; - - return ImportAptArtifactsErrorInfo; - })(); - - v1.ImportAptArtifactsResponse = (function() { - - /** - * Properties of an ImportAptArtifactsResponse. - * @memberof google.devtools.artifactregistry.v1 - * @interface IImportAptArtifactsResponse - * @property {Array.|null} [aptArtifacts] ImportAptArtifactsResponse aptArtifacts - * @property {Array.|null} [errors] ImportAptArtifactsResponse errors - */ - - /** - * Constructs a new ImportAptArtifactsResponse. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ImportAptArtifactsResponse. - * @implements IImportAptArtifactsResponse - * @constructor - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsResponse=} [properties] Properties to set - */ - 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportAptArtifactsResponse aptArtifacts. - * @member {Array.} aptArtifacts - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse - * @instance - */ - ImportAptArtifactsResponse.prototype.aptArtifacts = $util.emptyArray; - - /** - * ImportAptArtifactsResponse errors. - * @member {Array.} errors - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse - * @instance - */ - ImportAptArtifactsResponse.prototype.errors = $util.emptyArray; - - /** - * Creates a new ImportAptArtifactsResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} ImportAptArtifactsResponse instance - */ - ImportAptArtifactsResponse.create = function create(properties) { - return new ImportAptArtifactsResponse(properties); - }; - - /** - * Encodes the specified ImportAptArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsResponse} message ImportAptArtifactsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportAptArtifactsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.aptArtifacts != null && message.aptArtifacts.length) - for (var i = 0; i < message.aptArtifacts.length; ++i) - $root.google.devtools.artifactregistry.v1.AptArtifact.encode(message.aptArtifacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ImportAptArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsResponse} message ImportAptArtifactsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportAptArtifactsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} ImportAptArtifactsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.aptArtifacts && message.aptArtifacts.length)) - message.aptArtifacts = []; - message.aptArtifacts.push($root.google.devtools.artifactregistry.v1.AptArtifact.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} ImportAptArtifactsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportAptArtifactsResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportAptArtifactsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.aptArtifacts != null && message.hasOwnProperty("aptArtifacts")) { - if (!Array.isArray(message.aptArtifacts)) - return "aptArtifacts: array expected"; - for (var i = 0; i < message.aptArtifacts.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.AptArtifact.verify(message.aptArtifacts[i]); - if (error) - return "aptArtifacts." + error; - } - } - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } - return null; - }; - - /** - * Creates an ImportAptArtifactsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} ImportAptArtifactsResponse - */ - ImportAptArtifactsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsResponse(); - if (object.aptArtifacts) { - if (!Array.isArray(object.aptArtifacts)) - throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.aptArtifacts: array expected"); - message.aptArtifacts = []; - for (var i = 0; i < object.aptArtifacts.length; ++i) { - if (typeof object.aptArtifacts[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.aptArtifacts: object expected"); - message.aptArtifacts[i] = $root.google.devtools.artifactregistry.v1.AptArtifact.fromObject(object.aptArtifacts[i]); - } - } - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.errors: object expected"); - message.errors[i] = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.fromObject(object.errors[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an ImportAptArtifactsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse - * @static - * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} message ImportAptArtifactsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportAptArtifactsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.aptArtifacts = []; - object.errors = []; - } - if (message.aptArtifacts && message.aptArtifacts.length) { - object.aptArtifacts = []; - for (var j = 0; j < message.aptArtifacts.length; ++j) - object.aptArtifacts[j] = $root.google.devtools.artifactregistry.v1.AptArtifact.toObject(message.aptArtifacts[j], options); - } - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.toObject(message.errors[j], options); - } - return object; - }; - - /** - * Converts this ImportAptArtifactsResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse - * @instance - * @returns {Object.} JSON object - */ - ImportAptArtifactsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportAptArtifactsResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportAptArtifactsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportAptArtifactsResponse"; - }; - - return ImportAptArtifactsResponse; - })(); - - v1.ImportAptArtifactsMetadata = (function() { - - /** - * Properties of an ImportAptArtifactsMetadata. - * @memberof google.devtools.artifactregistry.v1 - * @interface IImportAptArtifactsMetadata - */ - - /** - * Constructs a new ImportAptArtifactsMetadata. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ImportAptArtifactsMetadata. - * @implements IImportAptArtifactsMetadata - * @constructor - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata=} [properties] Properties to set - */ - function ImportAptArtifactsMetadata(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 ImportAptArtifactsMetadata instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata instance - */ - ImportAptArtifactsMetadata.create = function create(properties) { - return new ImportAptArtifactsMetadata(properties); - }; - - /** - * Encodes the specified ImportAptArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata} message ImportAptArtifactsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportAptArtifactsMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ImportAptArtifactsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata} message ImportAptArtifactsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportAptArtifactsMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportAptArtifactsMetadata message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportAptArtifactsMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an ImportAptArtifactsMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata - */ - ImportAptArtifactsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata) - return object; - return new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata(); - }; - - /** - * Creates a plain object from an ImportAptArtifactsMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata - * @static - * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} message ImportAptArtifactsMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportAptArtifactsMetadata.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ImportAptArtifactsMetadata to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata - * @instance - * @returns {Object.} JSON object - */ - ImportAptArtifactsMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportAptArtifactsMetadata - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportAptArtifactsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata"; - }; - - return ImportAptArtifactsMetadata; - })(); - - v1.DockerImage = (function() { - - /** - * Properties of a DockerImage. - * @memberof google.devtools.artifactregistry.v1 - * @interface IDockerImage - * @property {string|null} [name] DockerImage name - * @property {string|null} [uri] DockerImage uri - * @property {Array.|null} [tags] DockerImage tags - * @property {number|Long|null} [imageSizeBytes] DockerImage imageSizeBytes - * @property {google.protobuf.ITimestamp|null} [uploadTime] DockerImage uploadTime - * @property {string|null} [mediaType] DockerImage mediaType - * @property {google.protobuf.ITimestamp|null} [buildTime] DockerImage buildTime - * @property {google.protobuf.ITimestamp|null} [updateTime] DockerImage updateTime - * @property {string|null} [artifactType] DockerImage artifactType - * @property {Array.|null} [imageManifests] DockerImage imageManifests - */ - - /** - * Constructs a new DockerImage. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a DockerImage. - * @implements IDockerImage - * @constructor - * @param {google.devtools.artifactregistry.v1.IDockerImage=} [properties] Properties to set - */ - function DockerImage(properties) { - this.tags = []; - this.imageManifests = []; - 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]]; - } - - /** - * DockerImage name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @instance - */ - DockerImage.prototype.name = ""; - - /** - * DockerImage uri. - * @member {string} uri - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @instance - */ - DockerImage.prototype.uri = ""; - - /** - * DockerImage tags. - * @member {Array.} tags - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @instance - */ - DockerImage.prototype.tags = $util.emptyArray; - - /** - * DockerImage imageSizeBytes. - * @member {number|Long} imageSizeBytes - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @instance - */ - DockerImage.prototype.imageSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DockerImage uploadTime. - * @member {google.protobuf.ITimestamp|null|undefined} uploadTime - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @instance - */ - DockerImage.prototype.uploadTime = null; - - /** - * DockerImage mediaType. - * @member {string} mediaType - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @instance - */ - DockerImage.prototype.mediaType = ""; - - /** - * DockerImage buildTime. - * @member {google.protobuf.ITimestamp|null|undefined} buildTime - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @instance - */ - DockerImage.prototype.buildTime = null; - - /** - * DockerImage updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @instance - */ - DockerImage.prototype.updateTime = null; - - /** - * DockerImage artifactType. - * @member {string} artifactType - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @instance - */ - DockerImage.prototype.artifactType = ""; - - /** - * DockerImage imageManifests. - * @member {Array.} imageManifests - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @instance - */ - DockerImage.prototype.imageManifests = $util.emptyArray; - - /** - * Creates a new DockerImage instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @static - * @param {google.devtools.artifactregistry.v1.IDockerImage=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage instance - */ - DockerImage.create = function create(properties) { - return new DockerImage(properties); - }; - - /** - * Encodes the specified DockerImage message. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @static - * @param {google.devtools.artifactregistry.v1.IDockerImage} message DockerImage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DockerImage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); - if (message.imageSizeBytes != null && Object.hasOwnProperty.call(message, "imageSizeBytes")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.imageSizeBytes); - if (message.uploadTime != null && Object.hasOwnProperty.call(message, "uploadTime")) - $root.google.protobuf.Timestamp.encode(message.uploadTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.mediaType); - if (message.buildTime != null && Object.hasOwnProperty.call(message, "buildTime")) - $root.google.protobuf.Timestamp.encode(message.buildTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.artifactType != null && Object.hasOwnProperty.call(message, "artifactType")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.artifactType); - if (message.imageManifests != null && message.imageManifests.length) - for (var i = 0; i < message.imageManifests.length; ++i) - $root.google.devtools.artifactregistry.v1.ImageManifest.encode(message.imageManifests[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DockerImage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @static - * @param {google.devtools.artifactregistry.v1.IDockerImage} message DockerImage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DockerImage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DockerImage message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DockerImage.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DockerImage(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - } - case 4: { - message.imageSizeBytes = reader.int64(); - break; - } - case 5: { - message.uploadTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.mediaType = reader.string(); - break; - } - case 7: { - message.buildTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.artifactType = reader.string(); - break; - } - case 11: { - if (!(message.imageManifests && message.imageManifests.length)) - message.imageManifests = []; - message.imageManifests.push($root.google.devtools.artifactregistry.v1.ImageManifest.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DockerImage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DockerImage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DockerImage message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DockerImage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) - if (!$util.isString(message.tags[i])) - return "tags: string[] expected"; - } - if (message.imageSizeBytes != null && message.hasOwnProperty("imageSizeBytes")) - if (!$util.isInteger(message.imageSizeBytes) && !(message.imageSizeBytes && $util.isInteger(message.imageSizeBytes.low) && $util.isInteger(message.imageSizeBytes.high))) - return "imageSizeBytes: integer|Long expected"; - if (message.uploadTime != null && message.hasOwnProperty("uploadTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.uploadTime); - if (error) - return "uploadTime." + error; - } - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - if (!$util.isString(message.mediaType)) - return "mediaType: string expected"; - if (message.buildTime != null && message.hasOwnProperty("buildTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.buildTime); - if (error) - return "buildTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.artifactType != null && message.hasOwnProperty("artifactType")) - if (!$util.isString(message.artifactType)) - return "artifactType: string expected"; - if (message.imageManifests != null && message.hasOwnProperty("imageManifests")) { - if (!Array.isArray(message.imageManifests)) - return "imageManifests: array expected"; - for (var i = 0; i < message.imageManifests.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.ImageManifest.verify(message.imageManifests[i]); - if (error) - return "imageManifests." + error; - } - } - return null; - }; - - /** - * Creates a DockerImage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage - */ - DockerImage.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.DockerImage) - return object; - var message = new $root.google.devtools.artifactregistry.v1.DockerImage(); - if (object.name != null) - message.name = String(object.name); - if (object.uri != null) - message.uri = String(object.uri); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) - message.tags[i] = String(object.tags[i]); - } - if (object.imageSizeBytes != null) - if ($util.Long) - (message.imageSizeBytes = $util.Long.fromValue(object.imageSizeBytes)).unsigned = false; - else if (typeof object.imageSizeBytes === "string") - message.imageSizeBytes = parseInt(object.imageSizeBytes, 10); - else if (typeof object.imageSizeBytes === "number") - message.imageSizeBytes = object.imageSizeBytes; - else if (typeof object.imageSizeBytes === "object") - message.imageSizeBytes = new $util.LongBits(object.imageSizeBytes.low >>> 0, object.imageSizeBytes.high >>> 0).toNumber(); - if (object.uploadTime != null) { - if (typeof object.uploadTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.uploadTime: object expected"); - message.uploadTime = $root.google.protobuf.Timestamp.fromObject(object.uploadTime); - } - if (object.mediaType != null) - message.mediaType = String(object.mediaType); - if (object.buildTime != null) { - if (typeof object.buildTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.buildTime: object expected"); - message.buildTime = $root.google.protobuf.Timestamp.fromObject(object.buildTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.artifactType != null) - message.artifactType = String(object.artifactType); - if (object.imageManifests) { - if (!Array.isArray(object.imageManifests)) - throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.imageManifests: array expected"); - message.imageManifests = []; - for (var i = 0; i < object.imageManifests.length; ++i) { - if (typeof object.imageManifests[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.imageManifests: object expected"); - message.imageManifests[i] = $root.google.devtools.artifactregistry.v1.ImageManifest.fromObject(object.imageManifests[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a DockerImage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @static - * @param {google.devtools.artifactregistry.v1.DockerImage} message DockerImage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DockerImage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.tags = []; - object.imageManifests = []; - } - if (options.defaults) { - object.name = ""; - object.uri = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.imageSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.imageSizeBytes = options.longs === String ? "0" : 0; - object.uploadTime = null; - object.mediaType = ""; - object.buildTime = null; - object.updateTime = null; - object.artifactType = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = message.tags[j]; - } - if (message.imageSizeBytes != null && message.hasOwnProperty("imageSizeBytes")) - if (typeof message.imageSizeBytes === "number") - object.imageSizeBytes = options.longs === String ? String(message.imageSizeBytes) : message.imageSizeBytes; - else - object.imageSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.imageSizeBytes) : options.longs === Number ? new $util.LongBits(message.imageSizeBytes.low >>> 0, message.imageSizeBytes.high >>> 0).toNumber() : message.imageSizeBytes; - if (message.uploadTime != null && message.hasOwnProperty("uploadTime")) - object.uploadTime = $root.google.protobuf.Timestamp.toObject(message.uploadTime, options); - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - object.mediaType = message.mediaType; - if (message.buildTime != null && message.hasOwnProperty("buildTime")) - object.buildTime = $root.google.protobuf.Timestamp.toObject(message.buildTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.artifactType != null && message.hasOwnProperty("artifactType")) - object.artifactType = message.artifactType; - if (message.imageManifests && message.imageManifests.length) { - object.imageManifests = []; - for (var j = 0; j < message.imageManifests.length; ++j) - object.imageManifests[j] = $root.google.devtools.artifactregistry.v1.ImageManifest.toObject(message.imageManifests[j], options); - } - return object; - }; - - /** - * Converts this DockerImage to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @instance - * @returns {Object.} JSON object - */ - DockerImage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DockerImage - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DockerImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DockerImage"; - }; - - return DockerImage; - })(); - - v1.ImageManifest = (function() { - - /** - * Properties of an ImageManifest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IImageManifest - * @property {string|null} [architecture] ImageManifest architecture - * @property {string|null} [os] ImageManifest os - * @property {string|null} [digest] ImageManifest digest - * @property {string|null} [mediaType] ImageManifest mediaType - * @property {string|null} [osVersion] ImageManifest osVersion - * @property {Array.|null} [osFeatures] ImageManifest osFeatures - * @property {string|null} [variant] ImageManifest variant - */ - - /** - * Constructs a new ImageManifest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ImageManifest. - * @implements IImageManifest - * @constructor - * @param {google.devtools.artifactregistry.v1.IImageManifest=} [properties] Properties to set - */ - function ImageManifest(properties) { - this.osFeatures = []; - 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]]; - } - - /** - * ImageManifest architecture. - * @member {string} architecture - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @instance - */ - ImageManifest.prototype.architecture = ""; - - /** - * ImageManifest os. - * @member {string} os - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @instance - */ - ImageManifest.prototype.os = ""; - - /** - * ImageManifest digest. - * @member {string} digest - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @instance - */ - ImageManifest.prototype.digest = ""; - - /** - * ImageManifest mediaType. - * @member {string} mediaType - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @instance - */ - ImageManifest.prototype.mediaType = ""; - - /** - * ImageManifest osVersion. - * @member {string} osVersion - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @instance - */ - ImageManifest.prototype.osVersion = ""; - - /** - * ImageManifest osFeatures. - * @member {Array.} osFeatures - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @instance - */ - ImageManifest.prototype.osFeatures = $util.emptyArray; - - /** - * ImageManifest variant. - * @member {string} variant - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @instance - */ - ImageManifest.prototype.variant = ""; - - /** - * Creates a new ImageManifest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @static - * @param {google.devtools.artifactregistry.v1.IImageManifest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ImageManifest} ImageManifest instance - */ - ImageManifest.create = function create(properties) { - return new ImageManifest(properties); - }; - - /** - * Encodes the specified ImageManifest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImageManifest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @static - * @param {google.devtools.artifactregistry.v1.IImageManifest} message ImageManifest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImageManifest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.architecture); - if (message.os != null && Object.hasOwnProperty.call(message, "os")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.os); - if (message.digest != null && Object.hasOwnProperty.call(message, "digest")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.digest); - if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.mediaType); - if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.osVersion); - if (message.osFeatures != null && message.osFeatures.length) - for (var i = 0; i < message.osFeatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.osFeatures[i]); - if (message.variant != null && Object.hasOwnProperty.call(message, "variant")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.variant); - return writer; - }; - - /** - * Encodes the specified ImageManifest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImageManifest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @static - * @param {google.devtools.artifactregistry.v1.IImageManifest} message ImageManifest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImageManifest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImageManifest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ImageManifest} ImageManifest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImageManifest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImageManifest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.architecture = reader.string(); - break; - } - case 2: { - message.os = reader.string(); - break; - } - case 3: { - message.digest = reader.string(); - break; - } - case 4: { - message.mediaType = reader.string(); - break; - } - case 5: { - message.osVersion = reader.string(); - break; - } - case 6: { - if (!(message.osFeatures && message.osFeatures.length)) - message.osFeatures = []; - message.osFeatures.push(reader.string()); - break; - } - case 7: { - message.variant = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImageManifest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ImageManifest} ImageManifest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImageManifest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImageManifest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImageManifest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.architecture != null && message.hasOwnProperty("architecture")) - if (!$util.isString(message.architecture)) - return "architecture: string expected"; - if (message.os != null && message.hasOwnProperty("os")) - if (!$util.isString(message.os)) - return "os: string expected"; - if (message.digest != null && message.hasOwnProperty("digest")) - if (!$util.isString(message.digest)) - return "digest: string expected"; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - if (!$util.isString(message.mediaType)) - return "mediaType: string expected"; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) - if (!$util.isString(message.osVersion)) - return "osVersion: string expected"; - if (message.osFeatures != null && message.hasOwnProperty("osFeatures")) { - if (!Array.isArray(message.osFeatures)) - return "osFeatures: array expected"; - for (var i = 0; i < message.osFeatures.length; ++i) - if (!$util.isString(message.osFeatures[i])) - return "osFeatures: string[] expected"; - } - if (message.variant != null && message.hasOwnProperty("variant")) - if (!$util.isString(message.variant)) - return "variant: string expected"; - return null; - }; - - /** - * Creates an ImageManifest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ImageManifest} ImageManifest - */ - ImageManifest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ImageManifest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ImageManifest(); - if (object.architecture != null) - message.architecture = String(object.architecture); - if (object.os != null) - message.os = String(object.os); - if (object.digest != null) - message.digest = String(object.digest); - if (object.mediaType != null) - message.mediaType = String(object.mediaType); - if (object.osVersion != null) - message.osVersion = String(object.osVersion); - if (object.osFeatures) { - if (!Array.isArray(object.osFeatures)) - throw TypeError(".google.devtools.artifactregistry.v1.ImageManifest.osFeatures: array expected"); - message.osFeatures = []; - for (var i = 0; i < object.osFeatures.length; ++i) - message.osFeatures[i] = String(object.osFeatures[i]); - } - if (object.variant != null) - message.variant = String(object.variant); - return message; - }; - - /** - * Creates a plain object from an ImageManifest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @static - * @param {google.devtools.artifactregistry.v1.ImageManifest} message ImageManifest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImageManifest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.osFeatures = []; - if (options.defaults) { - object.architecture = ""; - object.os = ""; - object.digest = ""; - object.mediaType = ""; - object.osVersion = ""; - object.variant = ""; - } - if (message.architecture != null && message.hasOwnProperty("architecture")) - object.architecture = message.architecture; - if (message.os != null && message.hasOwnProperty("os")) - object.os = message.os; - if (message.digest != null && message.hasOwnProperty("digest")) - object.digest = message.digest; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - object.mediaType = message.mediaType; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) - object.osVersion = message.osVersion; - if (message.osFeatures && message.osFeatures.length) { - object.osFeatures = []; - for (var j = 0; j < message.osFeatures.length; ++j) - object.osFeatures[j] = message.osFeatures[j]; - } - if (message.variant != null && message.hasOwnProperty("variant")) - object.variant = message.variant; - return object; - }; - - /** - * Converts this ImageManifest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @instance - * @returns {Object.} JSON object - */ - ImageManifest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImageManifest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ImageManifest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImageManifest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImageManifest"; - }; - - return ImageManifest; - })(); - - v1.ListDockerImagesRequest = (function() { - - /** - * Properties of a ListDockerImagesRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListDockerImagesRequest - * @property {string|null} [parent] ListDockerImagesRequest parent - * @property {number|null} [pageSize] ListDockerImagesRequest pageSize - * @property {string|null} [pageToken] ListDockerImagesRequest pageToken - * @property {string|null} [orderBy] ListDockerImagesRequest orderBy - */ - - /** - * Constructs a new ListDockerImagesRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListDockerImagesRequest. - * @implements IListDockerImagesRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest=} [properties] Properties to set - */ - function ListDockerImagesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDockerImagesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @instance - */ - ListDockerImagesRequest.prototype.parent = ""; - - /** - * ListDockerImagesRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @instance - */ - ListDockerImagesRequest.prototype.pageSize = 0; - - /** - * ListDockerImagesRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @instance - */ - ListDockerImagesRequest.prototype.pageToken = ""; - - /** - * ListDockerImagesRequest orderBy. - * @member {string} orderBy - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @instance - */ - ListDockerImagesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListDockerImagesRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest instance - */ - ListDockerImagesRequest.create = function create(properties) { - return new ListDockerImagesRequest(properties); - }; - - /** - * Encodes the specified ListDockerImagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} message ListDockerImagesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDockerImagesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListDockerImagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} message ListDockerImagesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDockerImagesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDockerImagesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDockerImagesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListDockerImagesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDockerImagesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDockerImagesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDockerImagesRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDockerImagesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListDockerImagesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest - */ - ListDockerImagesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListDockerImagesRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListDockerImagesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListDockerImagesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.ListDockerImagesRequest} message ListDockerImagesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDockerImagesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - 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.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListDockerImagesRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @instance - * @returns {Object.} JSON object - */ - ListDockerImagesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDockerImagesRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDockerImagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListDockerImagesRequest"; - }; - - return ListDockerImagesRequest; - })(); - - v1.ListDockerImagesResponse = (function() { - - /** - * Properties of a ListDockerImagesResponse. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListDockerImagesResponse - * @property {Array.|null} [dockerImages] ListDockerImagesResponse dockerImages - * @property {string|null} [nextPageToken] ListDockerImagesResponse nextPageToken - */ - - /** - * Constructs a new ListDockerImagesResponse. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListDockerImagesResponse. - * @implements IListDockerImagesResponse - * @constructor - * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse=} [properties] Properties to set - */ - function ListDockerImagesResponse(properties) { - this.dockerImages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDockerImagesResponse dockerImages. - * @member {Array.} dockerImages - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse - * @instance - */ - ListDockerImagesResponse.prototype.dockerImages = $util.emptyArray; - - /** - * ListDockerImagesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse - * @instance - */ - ListDockerImagesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListDockerImagesResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse instance - */ - ListDockerImagesResponse.create = function create(properties) { - return new ListDockerImagesResponse(properties); - }; - - /** - * Encodes the specified ListDockerImagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse} message ListDockerImagesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDockerImagesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dockerImages != null && message.dockerImages.length) - for (var i = 0; i < message.dockerImages.length; ++i) - $root.google.devtools.artifactregistry.v1.DockerImage.encode(message.dockerImages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListDockerImagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse} message ListDockerImagesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDockerImagesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDockerImagesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDockerImagesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListDockerImagesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dockerImages && message.dockerImages.length)) - message.dockerImages = []; - message.dockerImages.push($root.google.devtools.artifactregistry.v1.DockerImage.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDockerImagesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDockerImagesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDockerImagesResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDockerImagesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dockerImages != null && message.hasOwnProperty("dockerImages")) { - if (!Array.isArray(message.dockerImages)) - return "dockerImages: array expected"; - for (var i = 0; i < message.dockerImages.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.DockerImage.verify(message.dockerImages[i]); - if (error) - return "dockerImages." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListDockerImagesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse - */ - ListDockerImagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListDockerImagesResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListDockerImagesResponse(); - if (object.dockerImages) { - if (!Array.isArray(object.dockerImages)) - throw TypeError(".google.devtools.artifactregistry.v1.ListDockerImagesResponse.dockerImages: array expected"); - message.dockerImages = []; - for (var i = 0; i < object.dockerImages.length; ++i) { - if (typeof object.dockerImages[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ListDockerImagesResponse.dockerImages: object expected"); - message.dockerImages[i] = $root.google.devtools.artifactregistry.v1.DockerImage.fromObject(object.dockerImages[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListDockerImagesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.ListDockerImagesResponse} message ListDockerImagesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDockerImagesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dockerImages = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.dockerImages && message.dockerImages.length) { - object.dockerImages = []; - for (var j = 0; j < message.dockerImages.length; ++j) - object.dockerImages[j] = $root.google.devtools.artifactregistry.v1.DockerImage.toObject(message.dockerImages[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListDockerImagesResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse - * @instance - * @returns {Object.} JSON object - */ - ListDockerImagesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDockerImagesResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDockerImagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListDockerImagesResponse"; - }; - - return ListDockerImagesResponse; - })(); - - v1.GetDockerImageRequest = (function() { - - /** - * Properties of a GetDockerImageRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGetDockerImageRequest - * @property {string|null} [name] GetDockerImageRequest name - */ - - /** - * Constructs a new GetDockerImageRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GetDockerImageRequest. - * @implements IGetDockerImageRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest=} [properties] Properties to set - */ - function GetDockerImageRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetDockerImageRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest - * @instance - */ - GetDockerImageRequest.prototype.name = ""; - - /** - * Creates a new GetDockerImageRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GetDockerImageRequest} GetDockerImageRequest instance - */ - GetDockerImageRequest.create = function create(properties) { - return new GetDockerImageRequest(properties); - }; - - /** - * Encodes the specified GetDockerImageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetDockerImageRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest} message GetDockerImageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDockerImageRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetDockerImageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetDockerImageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest} message GetDockerImageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDockerImageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetDockerImageRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GetDockerImageRequest} GetDockerImageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDockerImageRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetDockerImageRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetDockerImageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GetDockerImageRequest} GetDockerImageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDockerImageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetDockerImageRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetDockerImageRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetDockerImageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GetDockerImageRequest} GetDockerImageRequest - */ - GetDockerImageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GetDockerImageRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GetDockerImageRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetDockerImageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest - * @static - * @param {google.devtools.artifactregistry.v1.GetDockerImageRequest} message GetDockerImageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetDockerImageRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetDockerImageRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest - * @instance - * @returns {Object.} JSON object - */ - GetDockerImageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetDockerImageRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetDockerImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetDockerImageRequest"; - }; - - return GetDockerImageRequest; - })(); - - v1.MavenArtifact = (function() { - - /** - * Properties of a MavenArtifact. - * @memberof google.devtools.artifactregistry.v1 - * @interface IMavenArtifact - * @property {string|null} [name] MavenArtifact name - * @property {string|null} [pomUri] MavenArtifact pomUri - * @property {string|null} [groupId] MavenArtifact groupId - * @property {string|null} [artifactId] MavenArtifact artifactId - * @property {string|null} [version] MavenArtifact version - * @property {google.protobuf.ITimestamp|null} [createTime] MavenArtifact createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] MavenArtifact updateTime - */ - - /** - * Constructs a new MavenArtifact. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a MavenArtifact. - * @implements IMavenArtifact - * @constructor - * @param {google.devtools.artifactregistry.v1.IMavenArtifact=} [properties] Properties to set - */ - function MavenArtifact(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]]; - } - - /** - * MavenArtifact name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @instance - */ - MavenArtifact.prototype.name = ""; - - /** - * MavenArtifact pomUri. - * @member {string} pomUri - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @instance - */ - MavenArtifact.prototype.pomUri = ""; - - /** - * MavenArtifact groupId. - * @member {string} groupId - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @instance - */ - MavenArtifact.prototype.groupId = ""; - - /** - * MavenArtifact artifactId. - * @member {string} artifactId - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @instance - */ - MavenArtifact.prototype.artifactId = ""; - - /** - * MavenArtifact version. - * @member {string} version - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @instance - */ - MavenArtifact.prototype.version = ""; - - /** - * MavenArtifact createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @instance - */ - MavenArtifact.prototype.createTime = null; - - /** - * MavenArtifact updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @instance - */ - MavenArtifact.prototype.updateTime = null; - - /** - * Creates a new MavenArtifact instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IMavenArtifact=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.MavenArtifact} MavenArtifact instance - */ - MavenArtifact.create = function create(properties) { - return new MavenArtifact(properties); - }; - - /** - * Encodes the specified MavenArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.MavenArtifact.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IMavenArtifact} message MavenArtifact message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MavenArtifact.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.pomUri != null && Object.hasOwnProperty.call(message, "pomUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pomUri); - if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupId); - if (message.artifactId != null && Object.hasOwnProperty.call(message, "artifactId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.artifactId); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MavenArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.MavenArtifact.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IMavenArtifact} message MavenArtifact message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MavenArtifact.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MavenArtifact message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.MavenArtifact} MavenArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MavenArtifact.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.MavenArtifact(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.pomUri = reader.string(); - break; - } - case 3: { - message.groupId = reader.string(); - break; - } - case 4: { - message.artifactId = reader.string(); - break; - } - case 5: { - message.version = reader.string(); - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MavenArtifact message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.MavenArtifact} MavenArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MavenArtifact.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MavenArtifact message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MavenArtifact.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.pomUri != null && message.hasOwnProperty("pomUri")) - if (!$util.isString(message.pomUri)) - return "pomUri: string expected"; - if (message.groupId != null && message.hasOwnProperty("groupId")) - if (!$util.isString(message.groupId)) - return "groupId: string expected"; - if (message.artifactId != null && message.hasOwnProperty("artifactId")) - if (!$util.isString(message.artifactId)) - return "artifactId: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: 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 MavenArtifact message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.MavenArtifact} MavenArtifact - */ - MavenArtifact.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.MavenArtifact) - return object; - var message = new $root.google.devtools.artifactregistry.v1.MavenArtifact(); - if (object.name != null) - message.name = String(object.name); - if (object.pomUri != null) - message.pomUri = String(object.pomUri); - if (object.groupId != null) - message.groupId = String(object.groupId); - if (object.artifactId != null) - message.artifactId = String(object.artifactId); - if (object.version != null) - message.version = String(object.version); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.MavenArtifact.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.MavenArtifact.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from a MavenArtifact message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @static - * @param {google.devtools.artifactregistry.v1.MavenArtifact} message MavenArtifact - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MavenArtifact.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.pomUri = ""; - object.groupId = ""; - object.artifactId = ""; - object.version = ""; - object.createTime = null; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.pomUri != null && message.hasOwnProperty("pomUri")) - object.pomUri = message.pomUri; - if (message.groupId != null && message.hasOwnProperty("groupId")) - object.groupId = message.groupId; - if (message.artifactId != null && message.hasOwnProperty("artifactId")) - object.artifactId = message.artifactId; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - 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 MavenArtifact to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @instance - * @returns {Object.} JSON object - */ - MavenArtifact.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MavenArtifact - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.MavenArtifact - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MavenArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.MavenArtifact"; - }; - - return MavenArtifact; - })(); - - v1.ListMavenArtifactsRequest = (function() { - - /** - * Properties of a ListMavenArtifactsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListMavenArtifactsRequest - * @property {string|null} [parent] ListMavenArtifactsRequest parent - * @property {number|null} [pageSize] ListMavenArtifactsRequest pageSize - * @property {string|null} [pageToken] ListMavenArtifactsRequest pageToken - */ - - /** - * Constructs a new ListMavenArtifactsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListMavenArtifactsRequest. - * @implements IListMavenArtifactsRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsRequest=} [properties] Properties to set - */ - function ListMavenArtifactsRequest(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]]; - } - - /** - * ListMavenArtifactsRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest - * @instance - */ - ListMavenArtifactsRequest.prototype.parent = ""; - - /** - * ListMavenArtifactsRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest - * @instance - */ - ListMavenArtifactsRequest.prototype.pageSize = 0; - - /** - * ListMavenArtifactsRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest - * @instance - */ - ListMavenArtifactsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListMavenArtifactsRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsRequest} ListMavenArtifactsRequest instance - */ - ListMavenArtifactsRequest.create = function create(properties) { - return new ListMavenArtifactsRequest(properties); - }; - - /** - * Encodes the specified ListMavenArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsRequest} message ListMavenArtifactsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMavenArtifactsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListMavenArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsRequest} message ListMavenArtifactsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMavenArtifactsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMavenArtifactsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsRequest} ListMavenArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMavenArtifactsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMavenArtifactsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsRequest} ListMavenArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMavenArtifactsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMavenArtifactsRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMavenArtifactsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListMavenArtifactsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsRequest} ListMavenArtifactsRequest - */ - ListMavenArtifactsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest(); - 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 ListMavenArtifactsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest - * @static - * @param {google.devtools.artifactregistry.v1.ListMavenArtifactsRequest} message ListMavenArtifactsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMavenArtifactsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListMavenArtifactsRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest - * @instance - * @returns {Object.} JSON object - */ - ListMavenArtifactsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListMavenArtifactsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListMavenArtifactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListMavenArtifactsRequest"; - }; - - return ListMavenArtifactsRequest; - })(); - - v1.ListMavenArtifactsResponse = (function() { - - /** - * Properties of a ListMavenArtifactsResponse. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListMavenArtifactsResponse - * @property {Array.|null} [mavenArtifacts] ListMavenArtifactsResponse mavenArtifacts - * @property {string|null} [nextPageToken] ListMavenArtifactsResponse nextPageToken - */ - - /** - * Constructs a new ListMavenArtifactsResponse. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListMavenArtifactsResponse. - * @implements IListMavenArtifactsResponse - * @constructor - * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsResponse=} [properties] Properties to set - */ - function ListMavenArtifactsResponse(properties) { - this.mavenArtifacts = []; - 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]]; - } - - /** - * ListMavenArtifactsResponse mavenArtifacts. - * @member {Array.} mavenArtifacts - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse - * @instance - */ - ListMavenArtifactsResponse.prototype.mavenArtifacts = $util.emptyArray; - - /** - * ListMavenArtifactsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse - * @instance - */ - ListMavenArtifactsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListMavenArtifactsResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsResponse} ListMavenArtifactsResponse instance - */ - ListMavenArtifactsResponse.create = function create(properties) { - return new ListMavenArtifactsResponse(properties); - }; - - /** - * Encodes the specified ListMavenArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsResponse} message ListMavenArtifactsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMavenArtifactsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mavenArtifacts != null && message.mavenArtifacts.length) - for (var i = 0; i < message.mavenArtifacts.length; ++i) - $root.google.devtools.artifactregistry.v1.MavenArtifact.encode(message.mavenArtifacts[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 ListMavenArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsResponse} message ListMavenArtifactsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMavenArtifactsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMavenArtifactsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsResponse} ListMavenArtifactsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMavenArtifactsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.mavenArtifacts && message.mavenArtifacts.length)) - message.mavenArtifacts = []; - message.mavenArtifacts.push($root.google.devtools.artifactregistry.v1.MavenArtifact.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMavenArtifactsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsResponse} ListMavenArtifactsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMavenArtifactsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMavenArtifactsResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMavenArtifactsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.mavenArtifacts != null && message.hasOwnProperty("mavenArtifacts")) { - if (!Array.isArray(message.mavenArtifacts)) - return "mavenArtifacts: array expected"; - for (var i = 0; i < message.mavenArtifacts.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.MavenArtifact.verify(message.mavenArtifacts[i]); - if (error) - return "mavenArtifacts." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListMavenArtifactsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListMavenArtifactsResponse} ListMavenArtifactsResponse - */ - ListMavenArtifactsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse(); - if (object.mavenArtifacts) { - if (!Array.isArray(object.mavenArtifacts)) - throw TypeError(".google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.mavenArtifacts: array expected"); - message.mavenArtifacts = []; - for (var i = 0; i < object.mavenArtifacts.length; ++i) { - if (typeof object.mavenArtifacts[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ListMavenArtifactsResponse.mavenArtifacts: object expected"); - message.mavenArtifacts[i] = $root.google.devtools.artifactregistry.v1.MavenArtifact.fromObject(object.mavenArtifacts[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListMavenArtifactsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse - * @static - * @param {google.devtools.artifactregistry.v1.ListMavenArtifactsResponse} message ListMavenArtifactsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMavenArtifactsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.mavenArtifacts = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.mavenArtifacts && message.mavenArtifacts.length) { - object.mavenArtifacts = []; - for (var j = 0; j < message.mavenArtifacts.length; ++j) - object.mavenArtifacts[j] = $root.google.devtools.artifactregistry.v1.MavenArtifact.toObject(message.mavenArtifacts[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListMavenArtifactsResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse - * @instance - * @returns {Object.} JSON object - */ - ListMavenArtifactsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListMavenArtifactsResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListMavenArtifactsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListMavenArtifactsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListMavenArtifactsResponse"; - }; - - return ListMavenArtifactsResponse; - })(); - - v1.GetMavenArtifactRequest = (function() { - - /** - * Properties of a GetMavenArtifactRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGetMavenArtifactRequest - * @property {string|null} [name] GetMavenArtifactRequest name - */ - - /** - * Constructs a new GetMavenArtifactRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GetMavenArtifactRequest. - * @implements IGetMavenArtifactRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IGetMavenArtifactRequest=} [properties] Properties to set - */ - function GetMavenArtifactRequest(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]]; - } - - /** - * GetMavenArtifactRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest - * @instance - */ - GetMavenArtifactRequest.prototype.name = ""; - - /** - * Creates a new GetMavenArtifactRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetMavenArtifactRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GetMavenArtifactRequest} GetMavenArtifactRequest instance - */ - GetMavenArtifactRequest.create = function create(properties) { - return new GetMavenArtifactRequest(properties); - }; - - /** - * Encodes the specified GetMavenArtifactRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetMavenArtifactRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetMavenArtifactRequest} message GetMavenArtifactRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMavenArtifactRequest.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 GetMavenArtifactRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetMavenArtifactRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetMavenArtifactRequest} message GetMavenArtifactRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMavenArtifactRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetMavenArtifactRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GetMavenArtifactRequest} GetMavenArtifactRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMavenArtifactRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetMavenArtifactRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetMavenArtifactRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GetMavenArtifactRequest} GetMavenArtifactRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMavenArtifactRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetMavenArtifactRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetMavenArtifactRequest.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 GetMavenArtifactRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GetMavenArtifactRequest} GetMavenArtifactRequest - */ - GetMavenArtifactRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GetMavenArtifactRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GetMavenArtifactRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetMavenArtifactRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest - * @static - * @param {google.devtools.artifactregistry.v1.GetMavenArtifactRequest} message GetMavenArtifactRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetMavenArtifactRequest.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 GetMavenArtifactRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest - * @instance - * @returns {Object.} JSON object - */ - GetMavenArtifactRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetMavenArtifactRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GetMavenArtifactRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetMavenArtifactRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetMavenArtifactRequest"; - }; - - return GetMavenArtifactRequest; - })(); - - v1.NpmPackage = (function() { - - /** - * Properties of a NpmPackage. - * @memberof google.devtools.artifactregistry.v1 - * @interface INpmPackage - * @property {string|null} [name] NpmPackage name - * @property {string|null} [packageName] NpmPackage packageName - * @property {string|null} [version] NpmPackage version - * @property {Array.|null} [tags] NpmPackage tags - * @property {google.protobuf.ITimestamp|null} [createTime] NpmPackage createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] NpmPackage updateTime - */ - - /** - * Constructs a new NpmPackage. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a NpmPackage. - * @implements INpmPackage - * @constructor - * @param {google.devtools.artifactregistry.v1.INpmPackage=} [properties] Properties to set - */ - function NpmPackage(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]]; - } - - /** - * NpmPackage name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @instance - */ - NpmPackage.prototype.name = ""; - - /** - * NpmPackage packageName. - * @member {string} packageName - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @instance - */ - NpmPackage.prototype.packageName = ""; - - /** - * NpmPackage version. - * @member {string} version - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @instance - */ - NpmPackage.prototype.version = ""; - - /** - * NpmPackage tags. - * @member {Array.} tags - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @instance - */ - NpmPackage.prototype.tags = $util.emptyArray; - - /** - * NpmPackage createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @instance - */ - NpmPackage.prototype.createTime = null; - - /** - * NpmPackage updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @instance - */ - NpmPackage.prototype.updateTime = null; - - /** - * Creates a new NpmPackage instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @static - * @param {google.devtools.artifactregistry.v1.INpmPackage=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.NpmPackage} NpmPackage instance - */ - NpmPackage.create = function create(properties) { - return new NpmPackage(properties); - }; - - /** - * Encodes the specified NpmPackage message. Does not implicitly {@link google.devtools.artifactregistry.v1.NpmPackage.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @static - * @param {google.devtools.artifactregistry.v1.INpmPackage} message NpmPackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NpmPackage.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 3, wireType 2 =*/26).string(message.packageName); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.version); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.tags[i]); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NpmPackage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.NpmPackage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @static - * @param {google.devtools.artifactregistry.v1.INpmPackage} message NpmPackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NpmPackage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NpmPackage message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.NpmPackage} NpmPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NpmPackage.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.NpmPackage(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.packageName = reader.string(); - break; - } - case 4: { - message.version = reader.string(); - break; - } - case 5: { - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NpmPackage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.NpmPackage} NpmPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NpmPackage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NpmPackage message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NpmPackage.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.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) - if (!$util.isString(message.tags[i])) - return "tags: string[] expected"; - } - if (message.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 NpmPackage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.NpmPackage} NpmPackage - */ - NpmPackage.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.NpmPackage) - return object; - var message = new $root.google.devtools.artifactregistry.v1.NpmPackage(); - if (object.name != null) - message.name = String(object.name); - if (object.packageName != null) - message.packageName = String(object.packageName); - if (object.version != null) - message.version = String(object.version); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.devtools.artifactregistry.v1.NpmPackage.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) - message.tags[i] = String(object.tags[i]); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.NpmPackage.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.NpmPackage.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from a NpmPackage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @static - * @param {google.devtools.artifactregistry.v1.NpmPackage} message NpmPackage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NpmPackage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tags = []; - if (options.defaults) { - object.name = ""; - object.packageName = ""; - object.version = ""; - object.createTime = null; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.packageName != null && message.hasOwnProperty("packageName")) - object.packageName = message.packageName; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = message.tags[j]; - } - if (message.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 NpmPackage to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @instance - * @returns {Object.} JSON object - */ - NpmPackage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NpmPackage - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.NpmPackage - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NpmPackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.NpmPackage"; - }; - - return NpmPackage; - })(); - - v1.ListNpmPackagesRequest = (function() { - - /** - * Properties of a ListNpmPackagesRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListNpmPackagesRequest - * @property {string|null} [parent] ListNpmPackagesRequest parent - * @property {number|null} [pageSize] ListNpmPackagesRequest pageSize - * @property {string|null} [pageToken] ListNpmPackagesRequest pageToken - */ - - /** - * Constructs a new ListNpmPackagesRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListNpmPackagesRequest. - * @implements IListNpmPackagesRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IListNpmPackagesRequest=} [properties] Properties to set - */ - function ListNpmPackagesRequest(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]]; - } - - /** - * ListNpmPackagesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest - * @instance - */ - ListNpmPackagesRequest.prototype.parent = ""; - - /** - * ListNpmPackagesRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest - * @instance - */ - ListNpmPackagesRequest.prototype.pageSize = 0; - - /** - * ListNpmPackagesRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest - * @instance - */ - ListNpmPackagesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListNpmPackagesRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListNpmPackagesRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesRequest} ListNpmPackagesRequest instance - */ - ListNpmPackagesRequest.create = function create(properties) { - return new ListNpmPackagesRequest(properties); - }; - - /** - * Encodes the specified ListNpmPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListNpmPackagesRequest} message ListNpmPackagesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNpmPackagesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListNpmPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListNpmPackagesRequest} message ListNpmPackagesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNpmPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListNpmPackagesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesRequest} ListNpmPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNpmPackagesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListNpmPackagesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListNpmPackagesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesRequest} ListNpmPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNpmPackagesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListNpmPackagesRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListNpmPackagesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListNpmPackagesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesRequest} ListNpmPackagesRequest - */ - ListNpmPackagesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListNpmPackagesRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListNpmPackagesRequest(); - 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 ListNpmPackagesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.ListNpmPackagesRequest} message ListNpmPackagesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListNpmPackagesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListNpmPackagesRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest - * @instance - * @returns {Object.} JSON object - */ - ListNpmPackagesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListNpmPackagesRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListNpmPackagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListNpmPackagesRequest"; - }; - - return ListNpmPackagesRequest; - })(); - - v1.ListNpmPackagesResponse = (function() { - - /** - * Properties of a ListNpmPackagesResponse. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListNpmPackagesResponse - * @property {Array.|null} [npmPackages] ListNpmPackagesResponse npmPackages - * @property {string|null} [nextPageToken] ListNpmPackagesResponse nextPageToken - */ - - /** - * Constructs a new ListNpmPackagesResponse. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListNpmPackagesResponse. - * @implements IListNpmPackagesResponse - * @constructor - * @param {google.devtools.artifactregistry.v1.IListNpmPackagesResponse=} [properties] Properties to set - */ - function ListNpmPackagesResponse(properties) { - this.npmPackages = []; - 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]]; - } - - /** - * ListNpmPackagesResponse npmPackages. - * @member {Array.} npmPackages - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse - * @instance - */ - ListNpmPackagesResponse.prototype.npmPackages = $util.emptyArray; - - /** - * ListNpmPackagesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse - * @instance - */ - ListNpmPackagesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListNpmPackagesResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListNpmPackagesResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesResponse} ListNpmPackagesResponse instance - */ - ListNpmPackagesResponse.create = function create(properties) { - return new ListNpmPackagesResponse(properties); - }; - - /** - * Encodes the specified ListNpmPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListNpmPackagesResponse} message ListNpmPackagesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNpmPackagesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.npmPackages != null && message.npmPackages.length) - for (var i = 0; i < message.npmPackages.length; ++i) - $root.google.devtools.artifactregistry.v1.NpmPackage.encode(message.npmPackages[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 ListNpmPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListNpmPackagesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListNpmPackagesResponse} message ListNpmPackagesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNpmPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListNpmPackagesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesResponse} ListNpmPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNpmPackagesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListNpmPackagesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.npmPackages && message.npmPackages.length)) - message.npmPackages = []; - message.npmPackages.push($root.google.devtools.artifactregistry.v1.NpmPackage.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListNpmPackagesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesResponse} ListNpmPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNpmPackagesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListNpmPackagesResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListNpmPackagesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.npmPackages != null && message.hasOwnProperty("npmPackages")) { - if (!Array.isArray(message.npmPackages)) - return "npmPackages: array expected"; - for (var i = 0; i < message.npmPackages.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.NpmPackage.verify(message.npmPackages[i]); - if (error) - return "npmPackages." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListNpmPackagesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListNpmPackagesResponse} ListNpmPackagesResponse - */ - ListNpmPackagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListNpmPackagesResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListNpmPackagesResponse(); - if (object.npmPackages) { - if (!Array.isArray(object.npmPackages)) - throw TypeError(".google.devtools.artifactregistry.v1.ListNpmPackagesResponse.npmPackages: array expected"); - message.npmPackages = []; - for (var i = 0; i < object.npmPackages.length; ++i) { - if (typeof object.npmPackages[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ListNpmPackagesResponse.npmPackages: object expected"); - message.npmPackages[i] = $root.google.devtools.artifactregistry.v1.NpmPackage.fromObject(object.npmPackages[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListNpmPackagesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.ListNpmPackagesResponse} message ListNpmPackagesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListNpmPackagesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.npmPackages = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.npmPackages && message.npmPackages.length) { - object.npmPackages = []; - for (var j = 0; j < message.npmPackages.length; ++j) - object.npmPackages[j] = $root.google.devtools.artifactregistry.v1.NpmPackage.toObject(message.npmPackages[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListNpmPackagesResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse - * @instance - * @returns {Object.} JSON object - */ - ListNpmPackagesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListNpmPackagesResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListNpmPackagesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListNpmPackagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListNpmPackagesResponse"; - }; - - return ListNpmPackagesResponse; - })(); - - v1.GetNpmPackageRequest = (function() { - - /** - * Properties of a GetNpmPackageRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGetNpmPackageRequest - * @property {string|null} [name] GetNpmPackageRequest name - */ - - /** - * Constructs a new GetNpmPackageRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GetNpmPackageRequest. - * @implements IGetNpmPackageRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IGetNpmPackageRequest=} [properties] Properties to set - */ - function GetNpmPackageRequest(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]]; - } - - /** - * GetNpmPackageRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest - * @instance - */ - GetNpmPackageRequest.prototype.name = ""; - - /** - * Creates a new GetNpmPackageRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetNpmPackageRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GetNpmPackageRequest} GetNpmPackageRequest instance - */ - GetNpmPackageRequest.create = function create(properties) { - return new GetNpmPackageRequest(properties); - }; - - /** - * Encodes the specified GetNpmPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetNpmPackageRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetNpmPackageRequest} message GetNpmPackageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetNpmPackageRequest.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 GetNpmPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetNpmPackageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetNpmPackageRequest} message GetNpmPackageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetNpmPackageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetNpmPackageRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GetNpmPackageRequest} GetNpmPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetNpmPackageRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetNpmPackageRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetNpmPackageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GetNpmPackageRequest} GetNpmPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetNpmPackageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetNpmPackageRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetNpmPackageRequest.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 GetNpmPackageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GetNpmPackageRequest} GetNpmPackageRequest - */ - GetNpmPackageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GetNpmPackageRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GetNpmPackageRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetNpmPackageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.GetNpmPackageRequest} message GetNpmPackageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetNpmPackageRequest.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 GetNpmPackageRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest - * @instance - * @returns {Object.} JSON object - */ - GetNpmPackageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetNpmPackageRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GetNpmPackageRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetNpmPackageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetNpmPackageRequest"; - }; - - return GetNpmPackageRequest; - })(); - - v1.PythonPackage = (function() { - - /** - * Properties of a PythonPackage. - * @memberof google.devtools.artifactregistry.v1 - * @interface IPythonPackage - * @property {string|null} [name] PythonPackage name - * @property {string|null} [uri] PythonPackage uri - * @property {string|null} [packageName] PythonPackage packageName - * @property {string|null} [version] PythonPackage version - * @property {google.protobuf.ITimestamp|null} [createTime] PythonPackage createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PythonPackage updateTime - */ - - /** - * Constructs a new PythonPackage. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a PythonPackage. - * @implements IPythonPackage - * @constructor - * @param {google.devtools.artifactregistry.v1.IPythonPackage=} [properties] Properties to set - */ - function PythonPackage(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]]; - } - - /** - * PythonPackage name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @instance - */ - PythonPackage.prototype.name = ""; - - /** - * PythonPackage uri. - * @member {string} uri - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @instance - */ - PythonPackage.prototype.uri = ""; - - /** - * PythonPackage packageName. - * @member {string} packageName - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @instance - */ - PythonPackage.prototype.packageName = ""; - - /** - * PythonPackage version. - * @member {string} version - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @instance - */ - PythonPackage.prototype.version = ""; - - /** - * PythonPackage createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @instance - */ - PythonPackage.prototype.createTime = null; - - /** - * PythonPackage updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @instance - */ - PythonPackage.prototype.updateTime = null; - - /** - * Creates a new PythonPackage instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @static - * @param {google.devtools.artifactregistry.v1.IPythonPackage=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.PythonPackage} PythonPackage instance - */ - PythonPackage.create = function create(properties) { - return new PythonPackage(properties); - }; - - /** - * Encodes the specified PythonPackage message. Does not implicitly {@link google.devtools.artifactregistry.v1.PythonPackage.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @static - * @param {google.devtools.artifactregistry.v1.IPythonPackage} message PythonPackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonPackage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.packageName); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.version); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonPackage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.PythonPackage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @static - * @param {google.devtools.artifactregistry.v1.IPythonPackage} message PythonPackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonPackage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonPackage message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.PythonPackage} PythonPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonPackage.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.PythonPackage(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.packageName = reader.string(); - break; - } - case 4: { - message.version = reader.string(); - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonPackage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.PythonPackage} PythonPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonPackage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonPackage message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonPackage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.packageName != null && message.hasOwnProperty("packageName")) - if (!$util.isString(message.packageName)) - return "packageName: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: 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 PythonPackage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.PythonPackage} PythonPackage - */ - PythonPackage.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.PythonPackage) - return object; - var message = new $root.google.devtools.artifactregistry.v1.PythonPackage(); - if (object.name != null) - message.name = String(object.name); - if (object.uri != null) - message.uri = String(object.uri); - if (object.packageName != null) - message.packageName = String(object.packageName); - if (object.version != null) - message.version = String(object.version); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.PythonPackage.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.PythonPackage.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from a PythonPackage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @static - * @param {google.devtools.artifactregistry.v1.PythonPackage} message PythonPackage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonPackage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.uri = ""; - object.packageName = ""; - object.version = ""; - object.createTime = null; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.packageName != null && message.hasOwnProperty("packageName")) - object.packageName = message.packageName; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - 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 PythonPackage to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @instance - * @returns {Object.} JSON object - */ - PythonPackage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonPackage - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.PythonPackage - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonPackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.PythonPackage"; - }; - - return PythonPackage; - })(); - - v1.ListPythonPackagesRequest = (function() { - - /** - * Properties of a ListPythonPackagesRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListPythonPackagesRequest - * @property {string|null} [parent] ListPythonPackagesRequest parent - * @property {number|null} [pageSize] ListPythonPackagesRequest pageSize - * @property {string|null} [pageToken] ListPythonPackagesRequest pageToken - */ - - /** - * Constructs a new ListPythonPackagesRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListPythonPackagesRequest. - * @implements IListPythonPackagesRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IListPythonPackagesRequest=} [properties] Properties to set - */ - function ListPythonPackagesRequest(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]]; - } - - /** - * ListPythonPackagesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest - * @instance - */ - ListPythonPackagesRequest.prototype.parent = ""; - - /** - * ListPythonPackagesRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest - * @instance - */ - ListPythonPackagesRequest.prototype.pageSize = 0; - - /** - * ListPythonPackagesRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest - * @instance - */ - ListPythonPackagesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListPythonPackagesRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListPythonPackagesRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesRequest} ListPythonPackagesRequest instance - */ - ListPythonPackagesRequest.create = function create(properties) { - return new ListPythonPackagesRequest(properties); - }; - - /** - * Encodes the specified ListPythonPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListPythonPackagesRequest} message ListPythonPackagesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPythonPackagesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListPythonPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListPythonPackagesRequest} message ListPythonPackagesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPythonPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPythonPackagesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesRequest} ListPythonPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPythonPackagesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListPythonPackagesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPythonPackagesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesRequest} ListPythonPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPythonPackagesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPythonPackagesRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPythonPackagesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListPythonPackagesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesRequest} ListPythonPackagesRequest - */ - ListPythonPackagesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListPythonPackagesRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListPythonPackagesRequest(); - 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 ListPythonPackagesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.ListPythonPackagesRequest} message ListPythonPackagesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPythonPackagesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListPythonPackagesRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest - * @instance - * @returns {Object.} JSON object - */ - ListPythonPackagesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPythonPackagesRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPythonPackagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListPythonPackagesRequest"; - }; - - return ListPythonPackagesRequest; - })(); - - v1.ListPythonPackagesResponse = (function() { - - /** - * Properties of a ListPythonPackagesResponse. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListPythonPackagesResponse - * @property {Array.|null} [pythonPackages] ListPythonPackagesResponse pythonPackages - * @property {string|null} [nextPageToken] ListPythonPackagesResponse nextPageToken - */ - - /** - * Constructs a new ListPythonPackagesResponse. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListPythonPackagesResponse. - * @implements IListPythonPackagesResponse - * @constructor - * @param {google.devtools.artifactregistry.v1.IListPythonPackagesResponse=} [properties] Properties to set - */ - function ListPythonPackagesResponse(properties) { - this.pythonPackages = []; - 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]]; - } - - /** - * ListPythonPackagesResponse pythonPackages. - * @member {Array.} pythonPackages - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse - * @instance - */ - ListPythonPackagesResponse.prototype.pythonPackages = $util.emptyArray; - - /** - * ListPythonPackagesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse - * @instance - */ - ListPythonPackagesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListPythonPackagesResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListPythonPackagesResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesResponse} ListPythonPackagesResponse instance - */ - ListPythonPackagesResponse.create = function create(properties) { - return new ListPythonPackagesResponse(properties); - }; - - /** - * Encodes the specified ListPythonPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListPythonPackagesResponse} message ListPythonPackagesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPythonPackagesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pythonPackages != null && message.pythonPackages.length) - for (var i = 0; i < message.pythonPackages.length; ++i) - $root.google.devtools.artifactregistry.v1.PythonPackage.encode(message.pythonPackages[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 ListPythonPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPythonPackagesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListPythonPackagesResponse} message ListPythonPackagesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPythonPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPythonPackagesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesResponse} ListPythonPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPythonPackagesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListPythonPackagesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.pythonPackages && message.pythonPackages.length)) - message.pythonPackages = []; - message.pythonPackages.push($root.google.devtools.artifactregistry.v1.PythonPackage.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPythonPackagesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesResponse} ListPythonPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPythonPackagesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPythonPackagesResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPythonPackagesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { - if (!Array.isArray(message.pythonPackages)) - return "pythonPackages: array expected"; - for (var i = 0; i < message.pythonPackages.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.PythonPackage.verify(message.pythonPackages[i]); - if (error) - return "pythonPackages." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListPythonPackagesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListPythonPackagesResponse} ListPythonPackagesResponse - */ - ListPythonPackagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListPythonPackagesResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListPythonPackagesResponse(); - if (object.pythonPackages) { - if (!Array.isArray(object.pythonPackages)) - throw TypeError(".google.devtools.artifactregistry.v1.ListPythonPackagesResponse.pythonPackages: array expected"); - message.pythonPackages = []; - for (var i = 0; i < object.pythonPackages.length; ++i) { - if (typeof object.pythonPackages[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ListPythonPackagesResponse.pythonPackages: object expected"); - message.pythonPackages[i] = $root.google.devtools.artifactregistry.v1.PythonPackage.fromObject(object.pythonPackages[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListPythonPackagesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.ListPythonPackagesResponse} message ListPythonPackagesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPythonPackagesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.pythonPackages = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.pythonPackages && message.pythonPackages.length) { - object.pythonPackages = []; - for (var j = 0; j < message.pythonPackages.length; ++j) - object.pythonPackages[j] = $root.google.devtools.artifactregistry.v1.PythonPackage.toObject(message.pythonPackages[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListPythonPackagesResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse - * @instance - * @returns {Object.} JSON object - */ - ListPythonPackagesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPythonPackagesResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListPythonPackagesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPythonPackagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListPythonPackagesResponse"; - }; - - return ListPythonPackagesResponse; - })(); - - v1.GetPythonPackageRequest = (function() { - - /** - * Properties of a GetPythonPackageRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGetPythonPackageRequest - * @property {string|null} [name] GetPythonPackageRequest name - */ - - /** - * Constructs a new GetPythonPackageRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GetPythonPackageRequest. - * @implements IGetPythonPackageRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IGetPythonPackageRequest=} [properties] Properties to set - */ - function GetPythonPackageRequest(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]]; - } - - /** - * GetPythonPackageRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest - * @instance - */ - GetPythonPackageRequest.prototype.name = ""; - - /** - * Creates a new GetPythonPackageRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetPythonPackageRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GetPythonPackageRequest} GetPythonPackageRequest instance - */ - GetPythonPackageRequest.create = function create(properties) { - return new GetPythonPackageRequest(properties); - }; - - /** - * Encodes the specified GetPythonPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPythonPackageRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetPythonPackageRequest} message GetPythonPackageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPythonPackageRequest.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 GetPythonPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPythonPackageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetPythonPackageRequest} message GetPythonPackageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPythonPackageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPythonPackageRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GetPythonPackageRequest} GetPythonPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPythonPackageRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetPythonPackageRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPythonPackageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GetPythonPackageRequest} GetPythonPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPythonPackageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPythonPackageRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPythonPackageRequest.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 GetPythonPackageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GetPythonPackageRequest} GetPythonPackageRequest - */ - GetPythonPackageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GetPythonPackageRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GetPythonPackageRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetPythonPackageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.GetPythonPackageRequest} message GetPythonPackageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPythonPackageRequest.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 GetPythonPackageRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest - * @instance - * @returns {Object.} JSON object - */ - GetPythonPackageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPythonPackageRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GetPythonPackageRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPythonPackageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetPythonPackageRequest"; - }; - - return GetPythonPackageRequest; - })(); - - v1.Attachment = (function() { - - /** - * Properties of an Attachment. - * @memberof google.devtools.artifactregistry.v1 - * @interface IAttachment - * @property {string|null} [name] Attachment name - * @property {string|null} [target] Attachment target - * @property {string|null} [type] Attachment type - * @property {string|null} [attachmentNamespace] Attachment attachmentNamespace - * @property {Object.|null} [annotations] Attachment annotations - * @property {google.protobuf.ITimestamp|null} [createTime] Attachment createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Attachment updateTime - * @property {Array.|null} [files] Attachment files - * @property {string|null} [ociVersionName] Attachment ociVersionName - */ - - /** - * Constructs a new Attachment. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an Attachment. - * @implements IAttachment - * @constructor - * @param {google.devtools.artifactregistry.v1.IAttachment=} [properties] Properties to set - */ - function Attachment(properties) { - this.annotations = {}; - this.files = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Attachment name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.Attachment - * @instance - */ - Attachment.prototype.name = ""; - - /** - * Attachment target. - * @member {string} target - * @memberof google.devtools.artifactregistry.v1.Attachment - * @instance - */ - Attachment.prototype.target = ""; - - /** - * Attachment type. - * @member {string} type - * @memberof google.devtools.artifactregistry.v1.Attachment - * @instance - */ - Attachment.prototype.type = ""; - - /** - * Attachment attachmentNamespace. - * @member {string} attachmentNamespace - * @memberof google.devtools.artifactregistry.v1.Attachment - * @instance - */ - Attachment.prototype.attachmentNamespace = ""; - - /** - * Attachment annotations. - * @member {Object.} annotations - * @memberof google.devtools.artifactregistry.v1.Attachment - * @instance - */ - Attachment.prototype.annotations = $util.emptyObject; - - /** - * Attachment createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1.Attachment - * @instance - */ - Attachment.prototype.createTime = null; - - /** - * Attachment updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1.Attachment - * @instance - */ - Attachment.prototype.updateTime = null; - - /** - * Attachment files. - * @member {Array.} files - * @memberof google.devtools.artifactregistry.v1.Attachment - * @instance - */ - Attachment.prototype.files = $util.emptyArray; - - /** - * Attachment ociVersionName. - * @member {string} ociVersionName - * @memberof google.devtools.artifactregistry.v1.Attachment - * @instance - */ - Attachment.prototype.ociVersionName = ""; - - /** - * Creates a new Attachment instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.Attachment - * @static - * @param {google.devtools.artifactregistry.v1.IAttachment=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.Attachment} Attachment instance - */ - Attachment.create = function create(properties) { - return new Attachment(properties); - }; - - /** - * Encodes the specified Attachment message. Does not implicitly {@link google.devtools.artifactregistry.v1.Attachment.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.Attachment - * @static - * @param {google.devtools.artifactregistry.v1.IAttachment} message Attachment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Attachment.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.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.target); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.attachmentNamespace != null && Object.hasOwnProperty.call(message, "attachmentNamespace")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.attachmentNamespace); - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) - for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.files != null && message.files.length) - for (var i = 0; i < message.files.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.files[i]); - if (message.ociVersionName != null && Object.hasOwnProperty.call(message, "ociVersionName")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.ociVersionName); - return writer; - }; - - /** - * Encodes the specified Attachment message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Attachment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.Attachment - * @static - * @param {google.devtools.artifactregistry.v1.IAttachment} message Attachment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Attachment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Attachment message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.Attachment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.Attachment} Attachment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Attachment.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Attachment(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.target = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 4: { - message.attachmentNamespace = reader.string(); - break; - } - case 5: { - if (message.annotations === $util.emptyObject) - message.annotations = {}; - 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.annotations[key] = value; - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - if (!(message.files && message.files.length)) - message.files = []; - message.files.push(reader.string()); - break; - } - case 9: { - message.ociVersionName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Attachment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.Attachment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.Attachment} Attachment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Attachment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Attachment message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.Attachment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Attachment.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.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.attachmentNamespace != null && message.hasOwnProperty("attachmentNamespace")) - if (!$util.isString(message.attachmentNamespace)) - return "attachmentNamespace: string expected"; - if (message.annotations != null && message.hasOwnProperty("annotations")) { - if (!$util.isObject(message.annotations)) - return "annotations: object expected"; - var key = Object.keys(message.annotations); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.annotations[key[i]])) - return "annotations: 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.files != null && message.hasOwnProperty("files")) { - if (!Array.isArray(message.files)) - return "files: array expected"; - for (var i = 0; i < message.files.length; ++i) - if (!$util.isString(message.files[i])) - return "files: string[] expected"; - } - if (message.ociVersionName != null && message.hasOwnProperty("ociVersionName")) - if (!$util.isString(message.ociVersionName)) - return "ociVersionName: string expected"; - return null; - }; - - /** - * Creates an Attachment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.Attachment - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.Attachment} Attachment - */ - Attachment.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.Attachment) - return object; - var message = new $root.google.devtools.artifactregistry.v1.Attachment(); - if (object.name != null) - message.name = String(object.name); - if (object.target != null) - message.target = String(object.target); - if (object.type != null) - message.type = String(object.type); - if (object.attachmentNamespace != null) - message.attachmentNamespace = String(object.attachmentNamespace); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Attachment.annotations: object expected"); - message.annotations = {}; - for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) - message.annotations[keys[i]] = String(object.annotations[keys[i]]); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Attachment.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Attachment.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.files) { - if (!Array.isArray(object.files)) - throw TypeError(".google.devtools.artifactregistry.v1.Attachment.files: array expected"); - message.files = []; - for (var i = 0; i < object.files.length; ++i) - message.files[i] = String(object.files[i]); - } - if (object.ociVersionName != null) - message.ociVersionName = String(object.ociVersionName); - return message; - }; - - /** - * Creates a plain object from an Attachment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.Attachment - * @static - * @param {google.devtools.artifactregistry.v1.Attachment} message Attachment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Attachment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.files = []; - if (options.objects || options.defaults) - object.annotations = {}; - if (options.defaults) { - object.name = ""; - object.target = ""; - object.type = ""; - object.attachmentNamespace = ""; - object.createTime = null; - object.updateTime = null; - object.ociVersionName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.attachmentNamespace != null && message.hasOwnProperty("attachmentNamespace")) - object.attachmentNamespace = message.attachmentNamespace; - var keys2; - if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { - object.annotations = {}; - for (var j = 0; j < keys2.length; ++j) - object.annotations[keys2[j]] = message.annotations[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.files && message.files.length) { - object.files = []; - for (var j = 0; j < message.files.length; ++j) - object.files[j] = message.files[j]; - } - if (message.ociVersionName != null && message.hasOwnProperty("ociVersionName")) - object.ociVersionName = message.ociVersionName; - return object; - }; - - /** - * Converts this Attachment to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.Attachment - * @instance - * @returns {Object.} JSON object - */ - Attachment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Attachment - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.Attachment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Attachment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Attachment"; - }; - - return Attachment; - })(); - - v1.ListAttachmentsRequest = (function() { - - /** - * Properties of a ListAttachmentsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListAttachmentsRequest - * @property {string|null} [parent] ListAttachmentsRequest parent - * @property {string|null} [filter] ListAttachmentsRequest filter - * @property {number|null} [pageSize] ListAttachmentsRequest pageSize - * @property {string|null} [pageToken] ListAttachmentsRequest pageToken - */ - - /** - * Constructs a new ListAttachmentsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListAttachmentsRequest. - * @implements IListAttachmentsRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IListAttachmentsRequest=} [properties] Properties to set - */ - function ListAttachmentsRequest(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]]; - } - - /** - * ListAttachmentsRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest - * @instance - */ - ListAttachmentsRequest.prototype.parent = ""; - - /** - * ListAttachmentsRequest filter. - * @member {string} filter - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest - * @instance - */ - ListAttachmentsRequest.prototype.filter = ""; - - /** - * ListAttachmentsRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest - * @instance - */ - ListAttachmentsRequest.prototype.pageSize = 0; - - /** - * ListAttachmentsRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest - * @instance - */ - ListAttachmentsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListAttachmentsRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListAttachmentsRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListAttachmentsRequest} ListAttachmentsRequest instance - */ - ListAttachmentsRequest.create = function create(properties) { - return new ListAttachmentsRequest(properties); - }; - - /** - * Encodes the specified ListAttachmentsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListAttachmentsRequest} message ListAttachmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAttachmentsRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListAttachmentsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListAttachmentsRequest} message ListAttachmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAttachmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAttachmentsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListAttachmentsRequest} ListAttachmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAttachmentsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListAttachmentsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.filter = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListAttachmentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListAttachmentsRequest} ListAttachmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAttachmentsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAttachmentsRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAttachmentsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListAttachmentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListAttachmentsRequest} ListAttachmentsRequest - */ - ListAttachmentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListAttachmentsRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListAttachmentsRequest(); - 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 ListAttachmentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest - * @static - * @param {google.devtools.artifactregistry.v1.ListAttachmentsRequest} message ListAttachmentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAttachmentsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - 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 ListAttachmentsRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest - * @instance - * @returns {Object.} JSON object - */ - ListAttachmentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAttachmentsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAttachmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListAttachmentsRequest"; - }; - - return ListAttachmentsRequest; - })(); - - v1.ListAttachmentsResponse = (function() { - - /** - * Properties of a ListAttachmentsResponse. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListAttachmentsResponse - * @property {Array.|null} [attachments] ListAttachmentsResponse attachments - * @property {string|null} [nextPageToken] ListAttachmentsResponse nextPageToken - */ - - /** - * Constructs a new ListAttachmentsResponse. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListAttachmentsResponse. - * @implements IListAttachmentsResponse - * @constructor - * @param {google.devtools.artifactregistry.v1.IListAttachmentsResponse=} [properties] Properties to set - */ - function ListAttachmentsResponse(properties) { - this.attachments = []; - 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]]; - } - - /** - * ListAttachmentsResponse attachments. - * @member {Array.} attachments - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse - * @instance - */ - ListAttachmentsResponse.prototype.attachments = $util.emptyArray; - - /** - * ListAttachmentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse - * @instance - */ - ListAttachmentsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListAttachmentsResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListAttachmentsResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListAttachmentsResponse} ListAttachmentsResponse instance - */ - ListAttachmentsResponse.create = function create(properties) { - return new ListAttachmentsResponse(properties); - }; - - /** - * Encodes the specified ListAttachmentsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListAttachmentsResponse} message ListAttachmentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAttachmentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.attachments != null && message.attachments.length) - for (var i = 0; i < message.attachments.length; ++i) - $root.google.devtools.artifactregistry.v1.Attachment.encode(message.attachments[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 ListAttachmentsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListAttachmentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListAttachmentsResponse} message ListAttachmentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAttachmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAttachmentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListAttachmentsResponse} ListAttachmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAttachmentsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListAttachmentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.attachments && message.attachments.length)) - message.attachments = []; - message.attachments.push($root.google.devtools.artifactregistry.v1.Attachment.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListAttachmentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListAttachmentsResponse} ListAttachmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAttachmentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAttachmentsResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAttachmentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.attachments != null && message.hasOwnProperty("attachments")) { - if (!Array.isArray(message.attachments)) - return "attachments: array expected"; - for (var i = 0; i < message.attachments.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.Attachment.verify(message.attachments[i]); - if (error) - return "attachments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListAttachmentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListAttachmentsResponse} ListAttachmentsResponse - */ - ListAttachmentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListAttachmentsResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListAttachmentsResponse(); - if (object.attachments) { - if (!Array.isArray(object.attachments)) - throw TypeError(".google.devtools.artifactregistry.v1.ListAttachmentsResponse.attachments: array expected"); - message.attachments = []; - for (var i = 0; i < object.attachments.length; ++i) { - if (typeof object.attachments[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ListAttachmentsResponse.attachments: object expected"); - message.attachments[i] = $root.google.devtools.artifactregistry.v1.Attachment.fromObject(object.attachments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListAttachmentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse - * @static - * @param {google.devtools.artifactregistry.v1.ListAttachmentsResponse} message ListAttachmentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAttachmentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.attachments = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.attachments && message.attachments.length) { - object.attachments = []; - for (var j = 0; j < message.attachments.length; ++j) - object.attachments[j] = $root.google.devtools.artifactregistry.v1.Attachment.toObject(message.attachments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListAttachmentsResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse - * @instance - * @returns {Object.} JSON object - */ - ListAttachmentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAttachmentsResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListAttachmentsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAttachmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListAttachmentsResponse"; - }; - - return ListAttachmentsResponse; - })(); - - v1.GetAttachmentRequest = (function() { - - /** - * Properties of a GetAttachmentRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGetAttachmentRequest - * @property {string|null} [name] GetAttachmentRequest name - */ - - /** - * Constructs a new GetAttachmentRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GetAttachmentRequest. - * @implements IGetAttachmentRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IGetAttachmentRequest=} [properties] Properties to set - */ - function GetAttachmentRequest(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]]; - } - - /** - * GetAttachmentRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest - * @instance - */ - GetAttachmentRequest.prototype.name = ""; - - /** - * Creates a new GetAttachmentRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetAttachmentRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GetAttachmentRequest} GetAttachmentRequest instance - */ - GetAttachmentRequest.create = function create(properties) { - return new GetAttachmentRequest(properties); - }; - - /** - * Encodes the specified GetAttachmentRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetAttachmentRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetAttachmentRequest} message GetAttachmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAttachmentRequest.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 GetAttachmentRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetAttachmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetAttachmentRequest} message GetAttachmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAttachmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetAttachmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GetAttachmentRequest} GetAttachmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetAttachmentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetAttachmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetAttachmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GetAttachmentRequest} GetAttachmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetAttachmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetAttachmentRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetAttachmentRequest.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 GetAttachmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GetAttachmentRequest} GetAttachmentRequest - */ - GetAttachmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GetAttachmentRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GetAttachmentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetAttachmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest - * @static - * @param {google.devtools.artifactregistry.v1.GetAttachmentRequest} message GetAttachmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetAttachmentRequest.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 GetAttachmentRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest - * @instance - * @returns {Object.} JSON object - */ - GetAttachmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetAttachmentRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GetAttachmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetAttachmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetAttachmentRequest"; - }; - - return GetAttachmentRequest; - })(); - - v1.CreateAttachmentRequest = (function() { - - /** - * Properties of a CreateAttachmentRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface ICreateAttachmentRequest - * @property {string|null} [parent] CreateAttachmentRequest parent - * @property {string|null} [attachmentId] CreateAttachmentRequest attachmentId - * @property {google.devtools.artifactregistry.v1.IAttachment|null} [attachment] CreateAttachmentRequest attachment - */ - - /** - * Constructs a new CreateAttachmentRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a CreateAttachmentRequest. - * @implements ICreateAttachmentRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.ICreateAttachmentRequest=} [properties] Properties to set - */ - function CreateAttachmentRequest(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]]; - } - - /** - * CreateAttachmentRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest - * @instance - */ - CreateAttachmentRequest.prototype.parent = ""; - - /** - * CreateAttachmentRequest attachmentId. - * @member {string} attachmentId - * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest - * @instance - */ - CreateAttachmentRequest.prototype.attachmentId = ""; - - /** - * CreateAttachmentRequest attachment. - * @member {google.devtools.artifactregistry.v1.IAttachment|null|undefined} attachment - * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest - * @instance - */ - CreateAttachmentRequest.prototype.attachment = null; - - /** - * Creates a new CreateAttachmentRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest - * @static - * @param {google.devtools.artifactregistry.v1.ICreateAttachmentRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.CreateAttachmentRequest} CreateAttachmentRequest instance - */ - CreateAttachmentRequest.create = function create(properties) { - return new CreateAttachmentRequest(properties); - }; - - /** - * Encodes the specified CreateAttachmentRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateAttachmentRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest - * @static - * @param {google.devtools.artifactregistry.v1.ICreateAttachmentRequest} message CreateAttachmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateAttachmentRequest.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.attachmentId != null && Object.hasOwnProperty.call(message, "attachmentId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.attachmentId); - if (message.attachment != null && Object.hasOwnProperty.call(message, "attachment")) - $root.google.devtools.artifactregistry.v1.Attachment.encode(message.attachment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateAttachmentRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateAttachmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest - * @static - * @param {google.devtools.artifactregistry.v1.ICreateAttachmentRequest} message CreateAttachmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateAttachmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateAttachmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.CreateAttachmentRequest} CreateAttachmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateAttachmentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.CreateAttachmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.attachmentId = reader.string(); - break; - } - case 3: { - message.attachment = $root.google.devtools.artifactregistry.v1.Attachment.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateAttachmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.CreateAttachmentRequest} CreateAttachmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateAttachmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateAttachmentRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateAttachmentRequest.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.attachmentId != null && message.hasOwnProperty("attachmentId")) - if (!$util.isString(message.attachmentId)) - return "attachmentId: string expected"; - if (message.attachment != null && message.hasOwnProperty("attachment")) { - var error = $root.google.devtools.artifactregistry.v1.Attachment.verify(message.attachment); - if (error) - return "attachment." + error; - } - return null; - }; - - /** - * Creates a CreateAttachmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.CreateAttachmentRequest} CreateAttachmentRequest - */ - CreateAttachmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.CreateAttachmentRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.CreateAttachmentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.attachmentId != null) - message.attachmentId = String(object.attachmentId); - if (object.attachment != null) { - if (typeof object.attachment !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.CreateAttachmentRequest.attachment: object expected"); - message.attachment = $root.google.devtools.artifactregistry.v1.Attachment.fromObject(object.attachment); - } - return message; - }; - - /** - * Creates a plain object from a CreateAttachmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest - * @static - * @param {google.devtools.artifactregistry.v1.CreateAttachmentRequest} message CreateAttachmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateAttachmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.attachmentId = ""; - object.attachment = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.attachmentId != null && message.hasOwnProperty("attachmentId")) - object.attachmentId = message.attachmentId; - if (message.attachment != null && message.hasOwnProperty("attachment")) - object.attachment = $root.google.devtools.artifactregistry.v1.Attachment.toObject(message.attachment, options); - return object; - }; - - /** - * Converts this CreateAttachmentRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest - * @instance - * @returns {Object.} JSON object - */ - CreateAttachmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateAttachmentRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.CreateAttachmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateAttachmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.CreateAttachmentRequest"; - }; - - return CreateAttachmentRequest; - })(); - - v1.DeleteAttachmentRequest = (function() { - - /** - * Properties of a DeleteAttachmentRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IDeleteAttachmentRequest - * @property {string|null} [name] DeleteAttachmentRequest name - */ - - /** - * Constructs a new DeleteAttachmentRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a DeleteAttachmentRequest. - * @implements IDeleteAttachmentRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IDeleteAttachmentRequest=} [properties] Properties to set - */ - function DeleteAttachmentRequest(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]]; - } - - /** - * DeleteAttachmentRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest - * @instance - */ - DeleteAttachmentRequest.prototype.name = ""; - - /** - * Creates a new DeleteAttachmentRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteAttachmentRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.DeleteAttachmentRequest} DeleteAttachmentRequest instance - */ - DeleteAttachmentRequest.create = function create(properties) { - return new DeleteAttachmentRequest(properties); - }; - - /** - * Encodes the specified DeleteAttachmentRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteAttachmentRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteAttachmentRequest} message DeleteAttachmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteAttachmentRequest.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 DeleteAttachmentRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteAttachmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteAttachmentRequest} message DeleteAttachmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteAttachmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteAttachmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.DeleteAttachmentRequest} DeleteAttachmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteAttachmentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DeleteAttachmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteAttachmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.DeleteAttachmentRequest} DeleteAttachmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteAttachmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteAttachmentRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteAttachmentRequest.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 DeleteAttachmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.DeleteAttachmentRequest} DeleteAttachmentRequest - */ - DeleteAttachmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteAttachmentRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.DeleteAttachmentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteAttachmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest - * @static - * @param {google.devtools.artifactregistry.v1.DeleteAttachmentRequest} message DeleteAttachmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteAttachmentRequest.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 DeleteAttachmentRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteAttachmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteAttachmentRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.DeleteAttachmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteAttachmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DeleteAttachmentRequest"; - }; - - return DeleteAttachmentRequest; - })(); - - v1.ExportArtifactRequest = (function() { - - /** - * Properties of an ExportArtifactRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IExportArtifactRequest - * @property {string|null} [sourceVersion] ExportArtifactRequest sourceVersion - * @property {string|null} [sourceTag] ExportArtifactRequest sourceTag - * @property {string|null} [gcsPath] ExportArtifactRequest gcsPath - * @property {string|null} [repository] ExportArtifactRequest repository - */ - - /** - * Constructs a new ExportArtifactRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ExportArtifactRequest. - * @implements IExportArtifactRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IExportArtifactRequest=} [properties] Properties to set - */ - function ExportArtifactRequest(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]]; - } - - /** - * ExportArtifactRequest sourceVersion. - * @member {string|null|undefined} sourceVersion - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @instance - */ - ExportArtifactRequest.prototype.sourceVersion = null; - - /** - * ExportArtifactRequest sourceTag. - * @member {string|null|undefined} sourceTag - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @instance - */ - ExportArtifactRequest.prototype.sourceTag = null; - - /** - * ExportArtifactRequest gcsPath. - * @member {string|null|undefined} gcsPath - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @instance - */ - ExportArtifactRequest.prototype.gcsPath = null; - - /** - * ExportArtifactRequest repository. - * @member {string} repository - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @instance - */ - ExportArtifactRequest.prototype.repository = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ExportArtifactRequest sourceArtifact. - * @member {"sourceVersion"|"sourceTag"|undefined} sourceArtifact - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @instance - */ - Object.defineProperty(ExportArtifactRequest.prototype, "sourceArtifact", { - get: $util.oneOfGetter($oneOfFields = ["sourceVersion", "sourceTag"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ExportArtifactRequest destination. - * @member {"gcsPath"|undefined} destination - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @instance - */ - Object.defineProperty(ExportArtifactRequest.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsPath"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ExportArtifactRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @static - * @param {google.devtools.artifactregistry.v1.IExportArtifactRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ExportArtifactRequest} ExportArtifactRequest instance - */ - ExportArtifactRequest.create = function create(properties) { - return new ExportArtifactRequest(properties); - }; - - /** - * Encodes the specified ExportArtifactRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @static - * @param {google.devtools.artifactregistry.v1.IExportArtifactRequest} message ExportArtifactRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportArtifactRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.repository); - if (message.sourceVersion != null && Object.hasOwnProperty.call(message, "sourceVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceVersion); - if (message.gcsPath != null && Object.hasOwnProperty.call(message, "gcsPath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.gcsPath); - if (message.sourceTag != null && Object.hasOwnProperty.call(message, "sourceTag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.sourceTag); - return writer; - }; - - /** - * Encodes the specified ExportArtifactRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @static - * @param {google.devtools.artifactregistry.v1.IExportArtifactRequest} message ExportArtifactRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportArtifactRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportArtifactRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ExportArtifactRequest} ExportArtifactRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportArtifactRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ExportArtifactRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.sourceVersion = reader.string(); - break; - } - case 4: { - message.sourceTag = reader.string(); - break; - } - case 3: { - message.gcsPath = reader.string(); - break; - } - case 1: { - message.repository = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportArtifactRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ExportArtifactRequest} ExportArtifactRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportArtifactRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportArtifactRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportArtifactRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.sourceVersion != null && message.hasOwnProperty("sourceVersion")) { - properties.sourceArtifact = 1; - if (!$util.isString(message.sourceVersion)) - return "sourceVersion: string expected"; - } - if (message.sourceTag != null && message.hasOwnProperty("sourceTag")) { - if (properties.sourceArtifact === 1) - return "sourceArtifact: multiple values"; - properties.sourceArtifact = 1; - if (!$util.isString(message.sourceTag)) - return "sourceTag: string expected"; - } - if (message.gcsPath != null && message.hasOwnProperty("gcsPath")) { - properties.destination = 1; - if (!$util.isString(message.gcsPath)) - return "gcsPath: string expected"; - } - if (message.repository != null && message.hasOwnProperty("repository")) - if (!$util.isString(message.repository)) - return "repository: string expected"; - return null; - }; - - /** - * Creates an ExportArtifactRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ExportArtifactRequest} ExportArtifactRequest - */ - ExportArtifactRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ExportArtifactRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ExportArtifactRequest(); - if (object.sourceVersion != null) - message.sourceVersion = String(object.sourceVersion); - if (object.sourceTag != null) - message.sourceTag = String(object.sourceTag); - if (object.gcsPath != null) - message.gcsPath = String(object.gcsPath); - if (object.repository != null) - message.repository = String(object.repository); - return message; - }; - - /** - * Creates a plain object from an ExportArtifactRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @static - * @param {google.devtools.artifactregistry.v1.ExportArtifactRequest} message ExportArtifactRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportArtifactRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.repository = ""; - if (message.repository != null && message.hasOwnProperty("repository")) - object.repository = message.repository; - if (message.sourceVersion != null && message.hasOwnProperty("sourceVersion")) { - object.sourceVersion = message.sourceVersion; - if (options.oneofs) - object.sourceArtifact = "sourceVersion"; - } - if (message.gcsPath != null && message.hasOwnProperty("gcsPath")) { - object.gcsPath = message.gcsPath; - if (options.oneofs) - object.destination = "gcsPath"; - } - if (message.sourceTag != null && message.hasOwnProperty("sourceTag")) { - object.sourceTag = message.sourceTag; - if (options.oneofs) - object.sourceArtifact = "sourceTag"; - } - return object; - }; - - /** - * Converts this ExportArtifactRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @instance - * @returns {Object.} JSON object - */ - ExportArtifactRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExportArtifactRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ExportArtifactRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportArtifactRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ExportArtifactRequest"; - }; - - return ExportArtifactRequest; - })(); - - v1.ExportArtifactResponse = (function() { - - /** - * Properties of an ExportArtifactResponse. - * @memberof google.devtools.artifactregistry.v1 - * @interface IExportArtifactResponse - * @property {google.devtools.artifactregistry.v1.IVersion|null} [exportedVersion] ExportArtifactResponse exportedVersion - */ - - /** - * Constructs a new ExportArtifactResponse. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ExportArtifactResponse. - * @implements IExportArtifactResponse - * @constructor - * @param {google.devtools.artifactregistry.v1.IExportArtifactResponse=} [properties] Properties to set - */ - function ExportArtifactResponse(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]]; - } - - /** - * ExportArtifactResponse exportedVersion. - * @member {google.devtools.artifactregistry.v1.IVersion|null|undefined} exportedVersion - * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse - * @instance - */ - ExportArtifactResponse.prototype.exportedVersion = null; - - /** - * Creates a new ExportArtifactResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse - * @static - * @param {google.devtools.artifactregistry.v1.IExportArtifactResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ExportArtifactResponse} ExportArtifactResponse instance - */ - ExportArtifactResponse.create = function create(properties) { - return new ExportArtifactResponse(properties); - }; - - /** - * Encodes the specified ExportArtifactResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse - * @static - * @param {google.devtools.artifactregistry.v1.IExportArtifactResponse} message ExportArtifactResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportArtifactResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exportedVersion != null && Object.hasOwnProperty.call(message, "exportedVersion")) - $root.google.devtools.artifactregistry.v1.Version.encode(message.exportedVersion, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExportArtifactResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse - * @static - * @param {google.devtools.artifactregistry.v1.IExportArtifactResponse} message ExportArtifactResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportArtifactResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportArtifactResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ExportArtifactResponse} ExportArtifactResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportArtifactResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ExportArtifactResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.exportedVersion = $root.google.devtools.artifactregistry.v1.Version.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportArtifactResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ExportArtifactResponse} ExportArtifactResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportArtifactResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportArtifactResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportArtifactResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.exportedVersion != null && message.hasOwnProperty("exportedVersion")) { - var error = $root.google.devtools.artifactregistry.v1.Version.verify(message.exportedVersion); - if (error) - return "exportedVersion." + error; - } - return null; - }; - - /** - * Creates an ExportArtifactResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ExportArtifactResponse} ExportArtifactResponse - */ - ExportArtifactResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ExportArtifactResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ExportArtifactResponse(); - if (object.exportedVersion != null) { - if (typeof object.exportedVersion !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ExportArtifactResponse.exportedVersion: object expected"); - message.exportedVersion = $root.google.devtools.artifactregistry.v1.Version.fromObject(object.exportedVersion); - } - return message; - }; - - /** - * Creates a plain object from an ExportArtifactResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse - * @static - * @param {google.devtools.artifactregistry.v1.ExportArtifactResponse} message ExportArtifactResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportArtifactResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.exportedVersion = null; - if (message.exportedVersion != null && message.hasOwnProperty("exportedVersion")) - object.exportedVersion = $root.google.devtools.artifactregistry.v1.Version.toObject(message.exportedVersion, options); - return object; - }; - - /** - * Converts this ExportArtifactResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse - * @instance - * @returns {Object.} JSON object - */ - ExportArtifactResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExportArtifactResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ExportArtifactResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportArtifactResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ExportArtifactResponse"; - }; - - return ExportArtifactResponse; - })(); - - v1.ExportArtifactMetadata = (function() { - - /** - * Properties of an ExportArtifactMetadata. - * @memberof google.devtools.artifactregistry.v1 - * @interface IExportArtifactMetadata - * @property {Array.|null} [exportedFiles] ExportArtifactMetadata exportedFiles - */ - - /** - * Constructs a new ExportArtifactMetadata. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ExportArtifactMetadata. - * @implements IExportArtifactMetadata - * @constructor - * @param {google.devtools.artifactregistry.v1.IExportArtifactMetadata=} [properties] Properties to set - */ - function ExportArtifactMetadata(properties) { - this.exportedFiles = []; - 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]]; - } - - /** - * ExportArtifactMetadata exportedFiles. - * @member {Array.} exportedFiles - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata - * @instance - */ - ExportArtifactMetadata.prototype.exportedFiles = $util.emptyArray; - - /** - * Creates a new ExportArtifactMetadata instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IExportArtifactMetadata=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata} ExportArtifactMetadata instance - */ - ExportArtifactMetadata.create = function create(properties) { - return new ExportArtifactMetadata(properties); - }; - - /** - * Encodes the specified ExportArtifactMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IExportArtifactMetadata} message ExportArtifactMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportArtifactMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exportedFiles != null && message.exportedFiles.length) - for (var i = 0; i < message.exportedFiles.length; ++i) - $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.encode(message.exportedFiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExportArtifactMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IExportArtifactMetadata} message ExportArtifactMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportArtifactMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportArtifactMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata} ExportArtifactMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportArtifactMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.exportedFiles && message.exportedFiles.length)) - message.exportedFiles = []; - message.exportedFiles.push($root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportArtifactMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata} ExportArtifactMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportArtifactMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportArtifactMetadata message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportArtifactMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.exportedFiles != null && message.hasOwnProperty("exportedFiles")) { - if (!Array.isArray(message.exportedFiles)) - return "exportedFiles: array expected"; - for (var i = 0; i < message.exportedFiles.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.verify(message.exportedFiles[i]); - if (error) - return "exportedFiles." + error; - } - } - return null; - }; - - /** - * Creates an ExportArtifactMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata} ExportArtifactMetadata - */ - ExportArtifactMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata(); - if (object.exportedFiles) { - if (!Array.isArray(object.exportedFiles)) - throw TypeError(".google.devtools.artifactregistry.v1.ExportArtifactMetadata.exportedFiles: array expected"); - message.exportedFiles = []; - for (var i = 0; i < object.exportedFiles.length; ++i) { - if (typeof object.exportedFiles[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ExportArtifactMetadata.exportedFiles: object expected"); - message.exportedFiles[i] = $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.fromObject(object.exportedFiles[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an ExportArtifactMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata - * @static - * @param {google.devtools.artifactregistry.v1.ExportArtifactMetadata} message ExportArtifactMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportArtifactMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.exportedFiles = []; - if (message.exportedFiles && message.exportedFiles.length) { - object.exportedFiles = []; - for (var j = 0; j < message.exportedFiles.length; ++j) - object.exportedFiles[j] = $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.toObject(message.exportedFiles[j], options); - } - return object; - }; - - /** - * Converts this ExportArtifactMetadata to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata - * @instance - * @returns {Object.} JSON object - */ - ExportArtifactMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExportArtifactMetadata - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportArtifactMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ExportArtifactMetadata"; - }; - - ExportArtifactMetadata.ExportedFile = (function() { - - /** - * Properties of an ExportedFile. - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata - * @interface IExportedFile - * @property {string|null} [gcsObjectPath] ExportedFile gcsObjectPath - * @property {string|null} [name] ExportedFile name - * @property {Array.|null} [hashes] ExportedFile hashes - */ - - /** - * Constructs a new ExportedFile. - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata - * @classdesc Represents an ExportedFile. - * @implements IExportedFile - * @constructor - * @param {google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile=} [properties] Properties to set - */ - function ExportedFile(properties) { - this.hashes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExportedFile gcsObjectPath. - * @member {string|null|undefined} gcsObjectPath - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile - * @instance - */ - ExportedFile.prototype.gcsObjectPath = null; - - /** - * ExportedFile name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile - * @instance - */ - ExportedFile.prototype.name = ""; - - /** - * ExportedFile hashes. - * @member {Array.} hashes - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile - * @instance - */ - ExportedFile.prototype.hashes = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ExportedFile destination. - * @member {"gcsObjectPath"|undefined} destination - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile - * @instance - */ - Object.defineProperty(ExportedFile.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsObjectPath"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ExportedFile instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile - * @static - * @param {google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile} ExportedFile instance - */ - ExportedFile.create = function create(properties) { - return new ExportedFile(properties); - }; - - /** - * Encodes the specified ExportedFile message. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile - * @static - * @param {google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile} message ExportedFile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportedFile.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.gcsObjectPath != null && Object.hasOwnProperty.call(message, "gcsObjectPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsObjectPath); - if (message.hashes != null && message.hashes.length) - for (var i = 0; i < message.hashes.length; ++i) - $root.google.devtools.artifactregistry.v1.Hash.encode(message.hashes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExportedFile message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile - * @static - * @param {google.devtools.artifactregistry.v1.ExportArtifactMetadata.IExportedFile} message ExportedFile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportedFile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportedFile message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile} ExportedFile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportedFile.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.gcsObjectPath = reader.string(); - break; - } - case 1: { - message.name = reader.string(); - break; - } - case 3: { - if (!(message.hashes && message.hashes.length)) - message.hashes = []; - message.hashes.push($root.google.devtools.artifactregistry.v1.Hash.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportedFile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile} ExportedFile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportedFile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportedFile message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportedFile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcsObjectPath != null && message.hasOwnProperty("gcsObjectPath")) { - properties.destination = 1; - if (!$util.isString(message.gcsObjectPath)) - return "gcsObjectPath: string expected"; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.hashes != null && message.hasOwnProperty("hashes")) { - if (!Array.isArray(message.hashes)) - return "hashes: array expected"; - for (var i = 0; i < message.hashes.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.Hash.verify(message.hashes[i]); - if (error) - return "hashes." + error; - } - } - return null; - }; - - /** - * Creates an ExportedFile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile} ExportedFile - */ - ExportedFile.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile(); - if (object.gcsObjectPath != null) - message.gcsObjectPath = String(object.gcsObjectPath); - if (object.name != null) - message.name = String(object.name); - if (object.hashes) { - if (!Array.isArray(object.hashes)) - throw TypeError(".google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.hashes: array expected"); - message.hashes = []; - for (var i = 0; i < object.hashes.length; ++i) { - if (typeof object.hashes[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile.hashes: object expected"); - message.hashes[i] = $root.google.devtools.artifactregistry.v1.Hash.fromObject(object.hashes[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an ExportedFile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile - * @static - * @param {google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile} message ExportedFile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportedFile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.hashes = []; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.gcsObjectPath != null && message.hasOwnProperty("gcsObjectPath")) { - object.gcsObjectPath = message.gcsObjectPath; - if (options.oneofs) - object.destination = "gcsObjectPath"; - } - if (message.hashes && message.hashes.length) { - object.hashes = []; - for (var j = 0; j < message.hashes.length; ++j) - object.hashes[j] = $root.google.devtools.artifactregistry.v1.Hash.toObject(message.hashes[j], options); - } - return object; - }; - - /** - * Converts this ExportedFile to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile - * @instance - * @returns {Object.} JSON object - */ - ExportedFile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExportedFile - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportedFile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile"; - }; - - return ExportedFile; - })(); - - return ExportArtifactMetadata; - })(); - - v1.Hash = (function() { - - /** - * Properties of a Hash. - * @memberof google.devtools.artifactregistry.v1 - * @interface IHash - * @property {google.devtools.artifactregistry.v1.Hash.HashType|null} [type] Hash type - * @property {Uint8Array|null} [value] Hash value - */ - - /** - * Constructs a new Hash. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a Hash. - * @implements IHash - * @constructor - * @param {google.devtools.artifactregistry.v1.IHash=} [properties] Properties to set - */ - function Hash(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Hash type. - * @member {google.devtools.artifactregistry.v1.Hash.HashType} type - * @memberof google.devtools.artifactregistry.v1.Hash - * @instance - */ - Hash.prototype.type = 0; - - /** - * Hash value. - * @member {Uint8Array} value - * @memberof google.devtools.artifactregistry.v1.Hash - * @instance - */ - Hash.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Hash instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.Hash - * @static - * @param {google.devtools.artifactregistry.v1.IHash=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.Hash} Hash instance - */ - Hash.create = function create(properties) { - return new Hash(properties); - }; - - /** - * Encodes the specified Hash message. Does not implicitly {@link google.devtools.artifactregistry.v1.Hash.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.Hash - * @static - * @param {google.devtools.artifactregistry.v1.IHash} message Hash message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Hash.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Hash message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Hash.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.Hash - * @static - * @param {google.devtools.artifactregistry.v1.IHash} message Hash message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Hash.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Hash message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.Hash - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.Hash} Hash - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Hash.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Hash(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Hash message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.Hash - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.Hash} Hash - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Hash.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Hash message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.Hash - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Hash.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates a Hash message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.Hash - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.Hash} Hash - */ - Hash.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.Hash) - return object; - var message = new $root.google.devtools.artifactregistry.v1.Hash(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - 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 >= 0) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from a Hash message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.Hash - * @static - * @param {google.devtools.artifactregistry.v1.Hash} message Hash - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Hash.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "HASH_TYPE_UNSPECIFIED" : 0; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.devtools.artifactregistry.v1.Hash.HashType[message.type] === undefined ? message.type : $root.google.devtools.artifactregistry.v1.Hash.HashType[message.type] : message.type; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Hash to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.Hash - * @instance - * @returns {Object.} JSON object - */ - Hash.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Hash - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.Hash - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Hash.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Hash"; - }; - - /** - * HashType enum. - * @name google.devtools.artifactregistry.v1.Hash.HashType - * @enum {number} - * @property {number} HASH_TYPE_UNSPECIFIED=0 HASH_TYPE_UNSPECIFIED value - * @property {number} SHA256=1 SHA256 value - * @property {number} MD5=2 MD5 value - */ - Hash.HashType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HASH_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SHA256"] = 1; - values[valuesById[2] = "MD5"] = 2; - return values; - })(); - - return Hash; - })(); - - v1.File = (function() { - - /** - * Properties of a File. - * @memberof google.devtools.artifactregistry.v1 - * @interface IFile - * @property {string|null} [name] File name - * @property {number|Long|null} [sizeBytes] File sizeBytes - * @property {Array.|null} [hashes] File hashes - * @property {google.protobuf.ITimestamp|null} [createTime] File createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] File updateTime - * @property {string|null} [owner] File owner - * @property {google.protobuf.ITimestamp|null} [fetchTime] File fetchTime - * @property {Object.|null} [annotations] File annotations - */ - - /** - * Constructs a new File. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a File. - * @implements IFile - * @constructor - * @param {google.devtools.artifactregistry.v1.IFile=} [properties] Properties to set - */ - function File(properties) { - this.hashes = []; - this.annotations = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * File name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.File - * @instance - */ - File.prototype.name = ""; - - /** - * File sizeBytes. - * @member {number|Long} sizeBytes - * @memberof google.devtools.artifactregistry.v1.File - * @instance - */ - File.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * File hashes. - * @member {Array.} hashes - * @memberof google.devtools.artifactregistry.v1.File - * @instance - */ - File.prototype.hashes = $util.emptyArray; - - /** - * File createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1.File - * @instance - */ - File.prototype.createTime = null; - - /** - * File updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1.File - * @instance - */ - File.prototype.updateTime = null; - - /** - * File owner. - * @member {string} owner - * @memberof google.devtools.artifactregistry.v1.File - * @instance - */ - File.prototype.owner = ""; - - /** - * File fetchTime. - * @member {google.protobuf.ITimestamp|null|undefined} fetchTime - * @memberof google.devtools.artifactregistry.v1.File - * @instance - */ - File.prototype.fetchTime = null; - - /** - * File annotations. - * @member {Object.} annotations - * @memberof google.devtools.artifactregistry.v1.File - * @instance - */ - File.prototype.annotations = $util.emptyObject; - - /** - * Creates a new File instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.File - * @static - * @param {google.devtools.artifactregistry.v1.IFile=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.File} File instance - */ - File.create = function create(properties) { - return new File(properties); - }; - - /** - * Encodes the specified File message. Does not implicitly {@link google.devtools.artifactregistry.v1.File.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.File - * @static - * @param {google.devtools.artifactregistry.v1.IFile} message File message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - File.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.sizeBytes); - if (message.hashes != null && message.hashes.length) - for (var i = 0; i < message.hashes.length; ++i) - $root.google.devtools.artifactregistry.v1.Hash.encode(message.hashes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.owner); - if (message.fetchTime != null && Object.hasOwnProperty.call(message, "fetchTime")) - $root.google.protobuf.Timestamp.encode(message.fetchTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) - for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified File message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.File.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.File - * @static - * @param {google.devtools.artifactregistry.v1.IFile} message File message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - File.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a File message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.File - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.File} File - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - File.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.File(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.sizeBytes = reader.int64(); - break; - } - case 4: { - if (!(message.hashes && message.hashes.length)) - message.hashes = []; - message.hashes.push($root.google.devtools.artifactregistry.v1.Hash.decode(reader, reader.uint32())); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.owner = reader.string(); - break; - } - case 8: { - message.fetchTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - if (message.annotations === $util.emptyObject) - message.annotations = {}; - 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.annotations[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a File message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.File - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.File} File - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - File.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a File message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.File - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - File.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high))) - return "sizeBytes: integer|Long expected"; - if (message.hashes != null && message.hasOwnProperty("hashes")) { - if (!Array.isArray(message.hashes)) - return "hashes: array expected"; - for (var i = 0; i < message.hashes.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.Hash.verify(message.hashes[i]); - if (error) - return "hashes." + error; - } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.owner != null && message.hasOwnProperty("owner")) - if (!$util.isString(message.owner)) - return "owner: string expected"; - if (message.fetchTime != null && message.hasOwnProperty("fetchTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.fetchTime); - if (error) - return "fetchTime." + error; - } - if (message.annotations != null && message.hasOwnProperty("annotations")) { - if (!$util.isObject(message.annotations)) - return "annotations: object expected"; - var key = Object.keys(message.annotations); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.annotations[key[i]])) - return "annotations: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a File message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.File - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.File} File - */ - File.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.File) - return object; - var message = new $root.google.devtools.artifactregistry.v1.File(); - if (object.name != null) - message.name = String(object.name); - if (object.sizeBytes != null) - if ($util.Long) - (message.sizeBytes = $util.Long.fromValue(object.sizeBytes)).unsigned = false; - else if (typeof object.sizeBytes === "string") - message.sizeBytes = parseInt(object.sizeBytes, 10); - else if (typeof object.sizeBytes === "number") - message.sizeBytes = object.sizeBytes; - else if (typeof object.sizeBytes === "object") - message.sizeBytes = new $util.LongBits(object.sizeBytes.low >>> 0, object.sizeBytes.high >>> 0).toNumber(); - if (object.hashes) { - if (!Array.isArray(object.hashes)) - throw TypeError(".google.devtools.artifactregistry.v1.File.hashes: array expected"); - message.hashes = []; - for (var i = 0; i < object.hashes.length; ++i) { - if (typeof object.hashes[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.File.hashes: object expected"); - message.hashes[i] = $root.google.devtools.artifactregistry.v1.Hash.fromObject(object.hashes[i]); - } - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.File.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.File.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.owner != null) - message.owner = String(object.owner); - if (object.fetchTime != null) { - if (typeof object.fetchTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.File.fetchTime: object expected"); - message.fetchTime = $root.google.protobuf.Timestamp.fromObject(object.fetchTime); - } - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.File.annotations: object expected"); - message.annotations = {}; - for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) - message.annotations[keys[i]] = String(object.annotations[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a File message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.File - * @static - * @param {google.devtools.artifactregistry.v1.File} message File - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - File.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.hashes = []; - if (options.objects || options.defaults) - object.annotations = {}; - 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 = ""; - object.fetchTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - if (typeof message.sizeBytes === "number") - object.sizeBytes = options.longs === String ? String(message.sizeBytes) : message.sizeBytes; - else - object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; - if (message.hashes && message.hashes.length) { - object.hashes = []; - for (var j = 0; j < message.hashes.length; ++j) - object.hashes[j] = $root.google.devtools.artifactregistry.v1.Hash.toObject(message.hashes[j], options); - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.owner != null && message.hasOwnProperty("owner")) - object.owner = message.owner; - if (message.fetchTime != null && message.hasOwnProperty("fetchTime")) - object.fetchTime = $root.google.protobuf.Timestamp.toObject(message.fetchTime, options); - var keys2; - if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { - object.annotations = {}; - for (var j = 0; j < keys2.length; ++j) - object.annotations[keys2[j]] = message.annotations[keys2[j]]; - } - return object; - }; - - /** - * Converts this File to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.File - * @instance - * @returns {Object.} JSON object - */ - File.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for File - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.File - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - File.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.File"; - }; - - return File; - })(); - - v1.ListFilesRequest = (function() { - - /** - * Properties of a ListFilesRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListFilesRequest - * @property {string|null} [parent] ListFilesRequest parent - * @property {string|null} [filter] ListFilesRequest filter - * @property {number|null} [pageSize] ListFilesRequest pageSize - * @property {string|null} [pageToken] ListFilesRequest pageToken - * @property {string|null} [orderBy] ListFilesRequest orderBy - */ - - /** - * Constructs a new ListFilesRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListFilesRequest. - * @implements IListFilesRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IListFilesRequest=} [properties] Properties to set - */ - function ListFilesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFilesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @instance - */ - ListFilesRequest.prototype.parent = ""; - - /** - * ListFilesRequest filter. - * @member {string} filter - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @instance - */ - ListFilesRequest.prototype.filter = ""; - - /** - * ListFilesRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @instance - */ - ListFilesRequest.prototype.pageSize = 0; - - /** - * ListFilesRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @instance - */ - ListFilesRequest.prototype.pageToken = ""; - - /** - * ListFilesRequest orderBy. - * @member {string} orderBy - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @instance - */ - ListFilesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListFilesRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListFilesRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListFilesRequest} ListFilesRequest instance - */ - ListFilesRequest.create = function create(properties) { - return new ListFilesRequest(properties); - }; - - /** - * Encodes the specified ListFilesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListFilesRequest} message ListFilesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFilesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListFilesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListFilesRequest} message ListFilesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFilesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFilesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListFilesRequest} ListFilesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFilesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListFilesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListFilesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListFilesRequest} ListFilesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFilesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFilesRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFilesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListFilesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListFilesRequest} ListFilesRequest - */ - ListFilesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListFilesRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListFilesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListFilesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @static - * @param {google.devtools.artifactregistry.v1.ListFilesRequest} message ListFilesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFilesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListFilesRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @instance - * @returns {Object.} JSON object - */ - ListFilesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListFilesRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListFilesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListFilesRequest"; - }; - - return ListFilesRequest; - })(); - - v1.ListFilesResponse = (function() { - - /** - * Properties of a ListFilesResponse. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListFilesResponse - * @property {Array.|null} [files] ListFilesResponse files - * @property {string|null} [nextPageToken] ListFilesResponse nextPageToken - */ - - /** - * Constructs a new ListFilesResponse. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListFilesResponse. - * @implements IListFilesResponse - * @constructor - * @param {google.devtools.artifactregistry.v1.IListFilesResponse=} [properties] Properties to set - */ - function ListFilesResponse(properties) { - this.files = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFilesResponse files. - * @member {Array.} files - * @memberof google.devtools.artifactregistry.v1.ListFilesResponse - * @instance - */ - ListFilesResponse.prototype.files = $util.emptyArray; - - /** - * ListFilesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1.ListFilesResponse - * @instance - */ - ListFilesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListFilesResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListFilesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListFilesResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListFilesResponse} ListFilesResponse instance - */ - ListFilesResponse.create = function create(properties) { - return new ListFilesResponse(properties); - }; - - /** - * Encodes the specified ListFilesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListFilesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListFilesResponse} message ListFilesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFilesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.files != null && message.files.length) - for (var i = 0; i < message.files.length; ++i) - $root.google.devtools.artifactregistry.v1.File.encode(message.files[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListFilesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListFilesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListFilesResponse} message ListFilesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFilesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFilesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListFilesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListFilesResponse} ListFilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFilesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListFilesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.files && message.files.length)) - message.files = []; - message.files.push($root.google.devtools.artifactregistry.v1.File.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListFilesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListFilesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListFilesResponse} ListFilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFilesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFilesResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListFilesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFilesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.files != null && message.hasOwnProperty("files")) { - if (!Array.isArray(message.files)) - return "files: array expected"; - for (var i = 0; i < message.files.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.File.verify(message.files[i]); - if (error) - return "files." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListFilesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListFilesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListFilesResponse} ListFilesResponse - */ - ListFilesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListFilesResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListFilesResponse(); - if (object.files) { - if (!Array.isArray(object.files)) - throw TypeError(".google.devtools.artifactregistry.v1.ListFilesResponse.files: array expected"); - message.files = []; - for (var i = 0; i < object.files.length; ++i) { - if (typeof object.files[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ListFilesResponse.files: object expected"); - message.files[i] = $root.google.devtools.artifactregistry.v1.File.fromObject(object.files[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListFilesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListFilesResponse - * @static - * @param {google.devtools.artifactregistry.v1.ListFilesResponse} message ListFilesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFilesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.files = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.files && message.files.length) { - object.files = []; - for (var j = 0; j < message.files.length; ++j) - object.files[j] = $root.google.devtools.artifactregistry.v1.File.toObject(message.files[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListFilesResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListFilesResponse - * @instance - * @returns {Object.} JSON object - */ - ListFilesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListFilesResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListFilesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListFilesResponse"; - }; - - return ListFilesResponse; - })(); - - v1.GetFileRequest = (function() { - - /** - * Properties of a GetFileRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGetFileRequest - * @property {string|null} [name] GetFileRequest name - */ - - /** - * Constructs a new GetFileRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GetFileRequest. - * @implements IGetFileRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IGetFileRequest=} [properties] Properties to set - */ - function GetFileRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetFileRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GetFileRequest - * @instance - */ - GetFileRequest.prototype.name = ""; - - /** - * Creates a new GetFileRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GetFileRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetFileRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GetFileRequest} GetFileRequest instance - */ - GetFileRequest.create = function create(properties) { - return new GetFileRequest(properties); - }; - - /** - * Encodes the specified GetFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetFileRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GetFileRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetFileRequest} message GetFileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetFileRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetFileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetFileRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetFileRequest} message GetFileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetFileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetFileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GetFileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GetFileRequest} GetFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetFileRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetFileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetFileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetFileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GetFileRequest} GetFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetFileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetFileRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GetFileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetFileRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetFileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GetFileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GetFileRequest} GetFileRequest - */ - GetFileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GetFileRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GetFileRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetFileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GetFileRequest - * @static - * @param {google.devtools.artifactregistry.v1.GetFileRequest} message GetFileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetFileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetFileRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GetFileRequest - * @instance - * @returns {Object.} JSON object - */ - GetFileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetFileRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GetFileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetFileRequest"; - }; - - return GetFileRequest; - })(); - - v1.DeleteFileRequest = (function() { - - /** - * Properties of a DeleteFileRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IDeleteFileRequest - * @property {string|null} [name] DeleteFileRequest name - */ - - /** - * Constructs a new DeleteFileRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a DeleteFileRequest. - * @implements IDeleteFileRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IDeleteFileRequest=} [properties] Properties to set - */ - function DeleteFileRequest(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]]; - } - - /** - * DeleteFileRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest - * @instance - */ - DeleteFileRequest.prototype.name = ""; - - /** - * Creates a new DeleteFileRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteFileRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.DeleteFileRequest} DeleteFileRequest instance - */ - DeleteFileRequest.create = function create(properties) { - return new DeleteFileRequest(properties); - }; - - /** - * Encodes the specified DeleteFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteFileRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteFileRequest} message DeleteFileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteFileRequest.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 DeleteFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteFileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteFileRequest} message DeleteFileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteFileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteFileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.DeleteFileRequest} DeleteFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteFileRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DeleteFileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteFileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.DeleteFileRequest} DeleteFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteFileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteFileRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteFileRequest.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 DeleteFileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.DeleteFileRequest} DeleteFileRequest - */ - DeleteFileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteFileRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.DeleteFileRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteFileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest - * @static - * @param {google.devtools.artifactregistry.v1.DeleteFileRequest} message DeleteFileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteFileRequest.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 DeleteFileRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteFileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteFileRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.DeleteFileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DeleteFileRequest"; - }; - - return DeleteFileRequest; - })(); - - v1.UpdateFileRequest = (function() { - - /** - * Properties of an UpdateFileRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IUpdateFileRequest - * @property {google.devtools.artifactregistry.v1.IFile|null} [file] UpdateFileRequest file - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFileRequest updateMask - */ - - /** - * Constructs a new UpdateFileRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an UpdateFileRequest. - * @implements IUpdateFileRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IUpdateFileRequest=} [properties] Properties to set - */ - function UpdateFileRequest(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]]; - } - - /** - * UpdateFileRequest file. - * @member {google.devtools.artifactregistry.v1.IFile|null|undefined} file - * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest - * @instance - */ - UpdateFileRequest.prototype.file = null; - - /** - * UpdateFileRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest - * @instance - */ - UpdateFileRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateFileRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateFileRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.UpdateFileRequest} UpdateFileRequest instance - */ - UpdateFileRequest.create = function create(properties) { - return new UpdateFileRequest(properties); - }; - - /** - * Encodes the specified UpdateFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateFileRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateFileRequest} message UpdateFileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateFileRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && Object.hasOwnProperty.call(message, "file")) - $root.google.devtools.artifactregistry.v1.File.encode(message.file, 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 UpdateFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateFileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateFileRequest} message UpdateFileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateFileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateFileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.UpdateFileRequest} UpdateFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateFileRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdateFileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.file = $root.google.devtools.artifactregistry.v1.File.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 UpdateFileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.UpdateFileRequest} UpdateFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateFileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateFileRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateFileRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - var error = $root.google.devtools.artifactregistry.v1.File.verify(message.file); - if (error) - return "file." + 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 UpdateFileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.UpdateFileRequest} UpdateFileRequest - */ - UpdateFileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateFileRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.UpdateFileRequest(); - if (object.file != null) { - if (typeof object.file !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdateFileRequest.file: object expected"); - message.file = $root.google.devtools.artifactregistry.v1.File.fromObject(object.file); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdateFileRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateFileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest - * @static - * @param {google.devtools.artifactregistry.v1.UpdateFileRequest} message UpdateFileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateFileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.file = null; - object.updateMask = null; - } - if (message.file != null && message.hasOwnProperty("file")) - object.file = $root.google.devtools.artifactregistry.v1.File.toObject(message.file, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateFileRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateFileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateFileRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.UpdateFileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdateFileRequest"; - }; - - return UpdateFileRequest; - })(); - - /** - * VersionView enum. - * @name google.devtools.artifactregistry.v1.VersionView - * @enum {number} - * @property {number} VERSION_VIEW_UNSPECIFIED=0 VERSION_VIEW_UNSPECIFIED value - * @property {number} BASIC=1 BASIC value - * @property {number} FULL=2 FULL value - */ - v1.VersionView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VERSION_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BASIC"] = 1; - values[valuesById[2] = "FULL"] = 2; - return values; - })(); - - v1.Version = (function() { - - /** - * Properties of a Version. - * @memberof google.devtools.artifactregistry.v1 - * @interface IVersion - * @property {string|null} [name] Version name - * @property {string|null} [description] Version description - * @property {google.protobuf.ITimestamp|null} [createTime] Version createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Version updateTime - * @property {Array.|null} [relatedTags] Version relatedTags - * @property {google.protobuf.IStruct|null} [metadata] Version metadata - * @property {Object.|null} [annotations] Version annotations - * @property {Array.|null} [fingerprints] Version fingerprints - */ - - /** - * Constructs a new Version. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a Version. - * @implements IVersion - * @constructor - * @param {google.devtools.artifactregistry.v1.IVersion=} [properties] Properties to set - */ - function Version(properties) { - this.relatedTags = []; - this.annotations = {}; - this.fingerprints = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Version name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.Version - * @instance - */ - Version.prototype.name = ""; - - /** - * Version description. - * @member {string} description - * @memberof google.devtools.artifactregistry.v1.Version - * @instance - */ - Version.prototype.description = ""; - - /** - * Version createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1.Version - * @instance - */ - Version.prototype.createTime = null; - - /** - * Version updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1.Version - * @instance - */ - Version.prototype.updateTime = null; - - /** - * Version relatedTags. - * @member {Array.} relatedTags - * @memberof google.devtools.artifactregistry.v1.Version - * @instance - */ - Version.prototype.relatedTags = $util.emptyArray; - - /** - * Version metadata. - * @member {google.protobuf.IStruct|null|undefined} metadata - * @memberof google.devtools.artifactregistry.v1.Version - * @instance - */ - Version.prototype.metadata = null; - - /** - * Version annotations. - * @member {Object.} annotations - * @memberof google.devtools.artifactregistry.v1.Version - * @instance - */ - Version.prototype.annotations = $util.emptyObject; - - /** - * Version fingerprints. - * @member {Array.} fingerprints - * @memberof google.devtools.artifactregistry.v1.Version - * @instance - */ - Version.prototype.fingerprints = $util.emptyArray; - - /** - * Creates a new Version instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.Version - * @static - * @param {google.devtools.artifactregistry.v1.IVersion=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.Version} Version instance - */ - Version.create = function create(properties) { - return new Version(properties); - }; - - /** - * Encodes the specified Version message. Does not implicitly {@link google.devtools.artifactregistry.v1.Version.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.Version - * @static - * @param {google.devtools.artifactregistry.v1.IVersion} message Version message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Version.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.relatedTags != null && message.relatedTags.length) - for (var i = 0; i < message.relatedTags.length; ++i) - $root.google.devtools.artifactregistry.v1.Tag.encode(message.relatedTags[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) - for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.fingerprints != null && message.fingerprints.length) - for (var i = 0; i < message.fingerprints.length; ++i) - $root.google.devtools.artifactregistry.v1.Hash.encode(message.fingerprints[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Version.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.Version - * @static - * @param {google.devtools.artifactregistry.v1.IVersion} message Version message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Version.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Version message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.Version - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.Version} Version - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Version.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Version(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - if (!(message.relatedTags && message.relatedTags.length)) - message.relatedTags = []; - message.relatedTags.push($root.google.devtools.artifactregistry.v1.Tag.decode(reader, reader.uint32())); - break; - } - case 8: { - message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 9: { - if (message.annotations === $util.emptyObject) - message.annotations = {}; - 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.annotations[key] = value; - break; - } - case 10: { - if (!(message.fingerprints && message.fingerprints.length)) - message.fingerprints = []; - message.fingerprints.push($root.google.devtools.artifactregistry.v1.Hash.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Version message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.Version - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.Version} Version - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Version.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Version message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.Version - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Version.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.relatedTags != null && message.hasOwnProperty("relatedTags")) { - if (!Array.isArray(message.relatedTags)) - return "relatedTags: array expected"; - for (var i = 0; i < message.relatedTags.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.Tag.verify(message.relatedTags[i]); - if (error) - return "relatedTags." + error; - } - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Struct.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.annotations != null && message.hasOwnProperty("annotations")) { - if (!$util.isObject(message.annotations)) - return "annotations: object expected"; - var key = Object.keys(message.annotations); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.annotations[key[i]])) - return "annotations: string{k:string} expected"; - } - if (message.fingerprints != null && message.hasOwnProperty("fingerprints")) { - if (!Array.isArray(message.fingerprints)) - return "fingerprints: array expected"; - for (var i = 0; i < message.fingerprints.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.Hash.verify(message.fingerprints[i]); - if (error) - return "fingerprints." + error; - } - } - return null; - }; - - /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.Version - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.Version} Version - */ - Version.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.Version) - return object; - var message = new $root.google.devtools.artifactregistry.v1.Version(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Version.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Version.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.relatedTags) { - if (!Array.isArray(object.relatedTags)) - throw TypeError(".google.devtools.artifactregistry.v1.Version.relatedTags: array expected"); - message.relatedTags = []; - for (var i = 0; i < object.relatedTags.length; ++i) { - if (typeof object.relatedTags[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Version.relatedTags: object expected"); - message.relatedTags[i] = $root.google.devtools.artifactregistry.v1.Tag.fromObject(object.relatedTags[i]); - } - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Version.metadata: object expected"); - message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); - } - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Version.annotations: object expected"); - message.annotations = {}; - for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) - message.annotations[keys[i]] = String(object.annotations[keys[i]]); - } - if (object.fingerprints) { - if (!Array.isArray(object.fingerprints)) - throw TypeError(".google.devtools.artifactregistry.v1.Version.fingerprints: array expected"); - message.fingerprints = []; - for (var i = 0; i < object.fingerprints.length; ++i) { - if (typeof object.fingerprints[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Version.fingerprints: object expected"); - message.fingerprints[i] = $root.google.devtools.artifactregistry.v1.Hash.fromObject(object.fingerprints[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Version message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.Version - * @static - * @param {google.devtools.artifactregistry.v1.Version} message Version - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Version.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.relatedTags = []; - object.fingerprints = []; - } - if (options.objects || options.defaults) - object.annotations = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.metadata = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.relatedTags && message.relatedTags.length) { - object.relatedTags = []; - for (var j = 0; j < message.relatedTags.length; ++j) - object.relatedTags[j] = $root.google.devtools.artifactregistry.v1.Tag.toObject(message.relatedTags[j], options); - } - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); - var keys2; - if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { - object.annotations = {}; - for (var j = 0; j < keys2.length; ++j) - object.annotations[keys2[j]] = message.annotations[keys2[j]]; - } - if (message.fingerprints && message.fingerprints.length) { - object.fingerprints = []; - for (var j = 0; j < message.fingerprints.length; ++j) - object.fingerprints[j] = $root.google.devtools.artifactregistry.v1.Hash.toObject(message.fingerprints[j], options); - } - return object; - }; - - /** - * Converts this Version to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.Version - * @instance - * @returns {Object.} JSON object - */ - Version.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Version - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.Version - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Version.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Version"; - }; - - return Version; - })(); - - v1.ListVersionsRequest = (function() { - - /** - * Properties of a ListVersionsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListVersionsRequest - * @property {string|null} [parent] ListVersionsRequest parent - * @property {number|null} [pageSize] ListVersionsRequest pageSize - * @property {string|null} [pageToken] ListVersionsRequest pageToken - * @property {google.devtools.artifactregistry.v1.VersionView|null} [view] ListVersionsRequest view - * @property {string|null} [orderBy] ListVersionsRequest orderBy - * @property {string|null} [filter] ListVersionsRequest filter - */ - - /** - * Constructs a new ListVersionsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListVersionsRequest. - * @implements IListVersionsRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IListVersionsRequest=} [properties] Properties to set - */ - function ListVersionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListVersionsRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @instance - */ - ListVersionsRequest.prototype.parent = ""; - - /** - * ListVersionsRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @instance - */ - ListVersionsRequest.prototype.pageSize = 0; - - /** - * ListVersionsRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @instance - */ - ListVersionsRequest.prototype.pageToken = ""; - - /** - * ListVersionsRequest view. - * @member {google.devtools.artifactregistry.v1.VersionView} view - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @instance - */ - ListVersionsRequest.prototype.view = 0; - - /** - * ListVersionsRequest orderBy. - * @member {string} orderBy - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @instance - */ - ListVersionsRequest.prototype.orderBy = ""; - - /** - * ListVersionsRequest filter. - * @member {string} filter - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @instance - */ - ListVersionsRequest.prototype.filter = ""; - - /** - * Creates a new ListVersionsRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListVersionsRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListVersionsRequest} ListVersionsRequest instance - */ - ListVersionsRequest.create = function create(properties) { - return new ListVersionsRequest(properties); - }; - - /** - * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListVersionsRequest} message ListVersionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVersionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.view); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.filter); - return writer; - }; - - /** - * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListVersionsRequest} message ListVersionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListVersionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListVersionsRequest} ListVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVersionsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListVersionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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; - } - case 6: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListVersionsRequest} ListVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVersionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListVersionsRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListVersionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListVersionsRequest} ListVersionsRequest - */ - ListVersionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListVersionsRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListVersionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - 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); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @static - * @param {google.devtools.artifactregistry.v1.ListVersionsRequest} message ListVersionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListVersionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.view = options.enums === String ? "VERSION_VIEW_UNSPECIFIED" : 0; - object.orderBy = ""; - 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.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.devtools.artifactregistry.v1.VersionView[message.view] === undefined ? message.view : $root.google.devtools.artifactregistry.v1.VersionView[message.view] : message.view; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListVersionsRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListVersionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListVersionsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListVersionsRequest"; - }; - - return ListVersionsRequest; - })(); - - v1.ListVersionsResponse = (function() { - - /** - * Properties of a ListVersionsResponse. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListVersionsResponse - * @property {Array.|null} [versions] ListVersionsResponse versions - * @property {string|null} [nextPageToken] ListVersionsResponse nextPageToken - */ - - /** - * Constructs a new ListVersionsResponse. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListVersionsResponse. - * @implements IListVersionsResponse - * @constructor - * @param {google.devtools.artifactregistry.v1.IListVersionsResponse=} [properties] Properties to set - */ - function ListVersionsResponse(properties) { - this.versions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListVersionsResponse versions. - * @member {Array.} versions - * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse - * @instance - */ - ListVersionsResponse.prototype.versions = $util.emptyArray; - - /** - * ListVersionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse - * @instance - */ - ListVersionsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListVersionsResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListVersionsResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListVersionsResponse} ListVersionsResponse instance - */ - ListVersionsResponse.create = function create(properties) { - return new ListVersionsResponse(properties); - }; - - /** - * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListVersionsResponse} message ListVersionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVersionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.versions != null && message.versions.length) - for (var i = 0; i < message.versions.length; ++i) - $root.google.devtools.artifactregistry.v1.Version.encode(message.versions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListVersionsResponse} message ListVersionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListVersionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListVersionsResponse} ListVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVersionsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListVersionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.versions && message.versions.length)) - message.versions = []; - message.versions.push($root.google.devtools.artifactregistry.v1.Version.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListVersionsResponse} ListVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVersionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListVersionsResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListVersionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.versions != null && message.hasOwnProperty("versions")) { - if (!Array.isArray(message.versions)) - return "versions: array expected"; - for (var i = 0; i < message.versions.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.Version.verify(message.versions[i]); - if (error) - return "versions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListVersionsResponse} ListVersionsResponse - */ - ListVersionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListVersionsResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListVersionsResponse(); - if (object.versions) { - if (!Array.isArray(object.versions)) - throw TypeError(".google.devtools.artifactregistry.v1.ListVersionsResponse.versions: array expected"); - message.versions = []; - for (var i = 0; i < object.versions.length; ++i) { - if (typeof object.versions[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ListVersionsResponse.versions: object expected"); - message.versions[i] = $root.google.devtools.artifactregistry.v1.Version.fromObject(object.versions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse - * @static - * @param {google.devtools.artifactregistry.v1.ListVersionsResponse} message ListVersionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListVersionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.versions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.versions && message.versions.length) { - object.versions = []; - for (var j = 0; j < message.versions.length; ++j) - object.versions[j] = $root.google.devtools.artifactregistry.v1.Version.toObject(message.versions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListVersionsResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListVersionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListVersionsResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListVersionsResponse"; - }; - - return ListVersionsResponse; - })(); - - v1.GetVersionRequest = (function() { - - /** - * Properties of a GetVersionRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGetVersionRequest - * @property {string|null} [name] GetVersionRequest name - * @property {google.devtools.artifactregistry.v1.VersionView|null} [view] GetVersionRequest view - */ - - /** - * Constructs a new GetVersionRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GetVersionRequest. - * @implements IGetVersionRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IGetVersionRequest=} [properties] Properties to set - */ - function GetVersionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetVersionRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GetVersionRequest - * @instance - */ - GetVersionRequest.prototype.name = ""; - - /** - * GetVersionRequest view. - * @member {google.devtools.artifactregistry.v1.VersionView} view - * @memberof google.devtools.artifactregistry.v1.GetVersionRequest - * @instance - */ - GetVersionRequest.prototype.view = 0; - - /** - * Creates a new GetVersionRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GetVersionRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetVersionRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GetVersionRequest} GetVersionRequest instance - */ - GetVersionRequest.create = function create(properties) { - return new GetVersionRequest(properties); - }; - - /** - * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVersionRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GetVersionRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetVersionRequest} message GetVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVersionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; - - /** - * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVersionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetVersionRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetVersionRequest} message GetVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetVersionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GetVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GetVersionRequest} GetVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVersionRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetVersionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GetVersionRequest} GetVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVersionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetVersionRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GetVersionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetVersionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GetVersionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GetVersionRequest} GetVersionRequest - */ - GetVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GetVersionRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GetVersionRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "VERSION_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GetVersionRequest - * @static - * @param {google.devtools.artifactregistry.v1.GetVersionRequest} message GetVersionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetVersionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "VERSION_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.devtools.artifactregistry.v1.VersionView[message.view] === undefined ? message.view : $root.google.devtools.artifactregistry.v1.VersionView[message.view] : message.view; - return object; - }; - - /** - * Converts this GetVersionRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GetVersionRequest - * @instance - * @returns {Object.} JSON object - */ - GetVersionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetVersionRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GetVersionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetVersionRequest"; - }; - - return GetVersionRequest; - })(); - - v1.DeleteVersionRequest = (function() { - - /** - * Properties of a DeleteVersionRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IDeleteVersionRequest - * @property {string|null} [name] DeleteVersionRequest name - * @property {boolean|null} [force] DeleteVersionRequest force - */ - - /** - * Constructs a new DeleteVersionRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a DeleteVersionRequest. - * @implements IDeleteVersionRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest=} [properties] Properties to set - */ - function DeleteVersionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteVersionRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest - * @instance - */ - DeleteVersionRequest.prototype.name = ""; - - /** - * DeleteVersionRequest force. - * @member {boolean} force - * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest - * @instance - */ - DeleteVersionRequest.prototype.force = false; - - /** - * Creates a new DeleteVersionRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.DeleteVersionRequest} DeleteVersionRequest instance - */ - DeleteVersionRequest.create = function create(properties) { - return new DeleteVersionRequest(properties); - }; - - /** - * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteVersionRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteVersionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - return writer; - }; - - /** - * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteVersionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.DeleteVersionRequest} DeleteVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteVersionRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DeleteVersionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.DeleteVersionRequest} DeleteVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteVersionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteVersionRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteVersionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.DeleteVersionRequest} DeleteVersionRequest - */ - DeleteVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteVersionRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.DeleteVersionRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest - * @static - * @param {google.devtools.artifactregistry.v1.DeleteVersionRequest} message DeleteVersionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteVersionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this DeleteVersionRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteVersionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteVersionRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DeleteVersionRequest"; - }; - - return DeleteVersionRequest; - })(); - - v1.BatchDeleteVersionsRequest = (function() { - - /** - * Properties of a BatchDeleteVersionsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IBatchDeleteVersionsRequest - * @property {string|null} [parent] BatchDeleteVersionsRequest parent - * @property {Array.|null} [names] BatchDeleteVersionsRequest names - * @property {boolean|null} [validateOnly] BatchDeleteVersionsRequest validateOnly - */ - - /** - * Constructs a new BatchDeleteVersionsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a BatchDeleteVersionsRequest. - * @implements IBatchDeleteVersionsRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest=} [properties] Properties to set - */ - function BatchDeleteVersionsRequest(properties) { - this.names = []; - 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]]; - } - - /** - * BatchDeleteVersionsRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest - * @instance - */ - BatchDeleteVersionsRequest.prototype.parent = ""; - - /** - * BatchDeleteVersionsRequest names. - * @member {Array.} names - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest - * @instance - */ - BatchDeleteVersionsRequest.prototype.names = $util.emptyArray; - - /** - * BatchDeleteVersionsRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest - * @instance - */ - BatchDeleteVersionsRequest.prototype.validateOnly = false; - - /** - * Creates a new BatchDeleteVersionsRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest} BatchDeleteVersionsRequest instance - */ - BatchDeleteVersionsRequest.create = function create(properties) { - return new BatchDeleteVersionsRequest(properties); - }; - - /** - * Encodes the specified BatchDeleteVersionsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest} message BatchDeleteVersionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchDeleteVersionsRequest.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.names != null && message.names.length) - for (var i = 0; i < message.names.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.names[i]); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified BatchDeleteVersionsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest} message BatchDeleteVersionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchDeleteVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchDeleteVersionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest} BatchDeleteVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchDeleteVersionsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - if (!(message.names && message.names.length)) - message.names = []; - message.names.push(reader.string()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchDeleteVersionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest} BatchDeleteVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchDeleteVersionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchDeleteVersionsRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchDeleteVersionsRequest.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.names != null && message.hasOwnProperty("names")) { - if (!Array.isArray(message.names)) - return "names: array expected"; - for (var i = 0; i < message.names.length; ++i) - if (!$util.isString(message.names[i])) - return "names: string[] expected"; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a BatchDeleteVersionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest} BatchDeleteVersionsRequest - */ - BatchDeleteVersionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.names) { - if (!Array.isArray(object.names)) - throw TypeError(".google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.names: array expected"); - message.names = []; - for (var i = 0; i < object.names.length; ++i) - message.names[i] = String(object.names[i]); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a BatchDeleteVersionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest - * @static - * @param {google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest} message BatchDeleteVersionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchDeleteVersionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.names = []; - if (options.defaults) { - object.parent = ""; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.names && message.names.length) { - object.names = []; - for (var j = 0; j < message.names.length; ++j) - object.names[j] = message.names[j]; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this BatchDeleteVersionsRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest - * @instance - * @returns {Object.} JSON object - */ - BatchDeleteVersionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BatchDeleteVersionsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BatchDeleteVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest"; - }; - - return BatchDeleteVersionsRequest; - })(); - - v1.BatchDeleteVersionsMetadata = (function() { - - /** - * Properties of a BatchDeleteVersionsMetadata. - * @memberof google.devtools.artifactregistry.v1 - * @interface IBatchDeleteVersionsMetadata - * @property {Array.|null} [failedVersions] BatchDeleteVersionsMetadata failedVersions - */ - - /** - * Constructs a new BatchDeleteVersionsMetadata. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a BatchDeleteVersionsMetadata. - * @implements IBatchDeleteVersionsMetadata - * @constructor - * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata=} [properties] Properties to set - */ - function BatchDeleteVersionsMetadata(properties) { - this.failedVersions = []; - 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]]; - } - - /** - * BatchDeleteVersionsMetadata failedVersions. - * @member {Array.} failedVersions - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata - * @instance - */ - BatchDeleteVersionsMetadata.prototype.failedVersions = $util.emptyArray; - - /** - * Creates a new BatchDeleteVersionsMetadata instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata} BatchDeleteVersionsMetadata instance - */ - BatchDeleteVersionsMetadata.create = function create(properties) { - return new BatchDeleteVersionsMetadata(properties); - }; - - /** - * Encodes the specified BatchDeleteVersionsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata} message BatchDeleteVersionsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchDeleteVersionsMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.failedVersions != null && message.failedVersions.length) - for (var i = 0; i < message.failedVersions.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.failedVersions[i]); - return writer; - }; - - /** - * Encodes the specified BatchDeleteVersionsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsMetadata} message BatchDeleteVersionsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchDeleteVersionsMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchDeleteVersionsMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata} BatchDeleteVersionsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchDeleteVersionsMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.failedVersions && message.failedVersions.length)) - message.failedVersions = []; - message.failedVersions.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchDeleteVersionsMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata} BatchDeleteVersionsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchDeleteVersionsMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchDeleteVersionsMetadata message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchDeleteVersionsMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.failedVersions != null && message.hasOwnProperty("failedVersions")) { - if (!Array.isArray(message.failedVersions)) - return "failedVersions: array expected"; - for (var i = 0; i < message.failedVersions.length; ++i) - if (!$util.isString(message.failedVersions[i])) - return "failedVersions: string[] expected"; - } - return null; - }; - - /** - * Creates a BatchDeleteVersionsMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata} BatchDeleteVersionsMetadata - */ - BatchDeleteVersionsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata) - return object; - var message = new $root.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata(); - if (object.failedVersions) { - if (!Array.isArray(object.failedVersions)) - throw TypeError(".google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata.failedVersions: array expected"); - message.failedVersions = []; - for (var i = 0; i < object.failedVersions.length; ++i) - message.failedVersions[i] = String(object.failedVersions[i]); - } - return message; - }; - - /** - * Creates a plain object from a BatchDeleteVersionsMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata - * @static - * @param {google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata} message BatchDeleteVersionsMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchDeleteVersionsMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.failedVersions = []; - if (message.failedVersions && message.failedVersions.length) { - object.failedVersions = []; - for (var j = 0; j < message.failedVersions.length; ++j) - object.failedVersions[j] = message.failedVersions[j]; - } - return object; - }; - - /** - * Converts this BatchDeleteVersionsMetadata to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata - * @instance - * @returns {Object.} JSON object - */ - BatchDeleteVersionsMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BatchDeleteVersionsMetadata - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BatchDeleteVersionsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata"; - }; - - return BatchDeleteVersionsMetadata; - })(); - - v1.UpdateVersionRequest = (function() { - - /** - * Properties of an UpdateVersionRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IUpdateVersionRequest - * @property {google.devtools.artifactregistry.v1.IVersion|null} [version] UpdateVersionRequest version - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVersionRequest updateMask - */ - - /** - * Constructs a new UpdateVersionRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an UpdateVersionRequest. - * @implements IUpdateVersionRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IUpdateVersionRequest=} [properties] Properties to set - */ - function UpdateVersionRequest(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]]; - } - - /** - * UpdateVersionRequest version. - * @member {google.devtools.artifactregistry.v1.IVersion|null|undefined} version - * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest - * @instance - */ - UpdateVersionRequest.prototype.version = null; - - /** - * UpdateVersionRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest - * @instance - */ - UpdateVersionRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateVersionRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateVersionRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.UpdateVersionRequest} UpdateVersionRequest instance - */ - UpdateVersionRequest.create = function create(properties) { - return new UpdateVersionRequest(properties); - }; - - /** - * Encodes the specified UpdateVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVersionRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateVersionRequest} message UpdateVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateVersionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.google.devtools.artifactregistry.v1.Version.encode(message.version, 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 UpdateVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVersionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateVersionRequest} message UpdateVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateVersionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.UpdateVersionRequest} UpdateVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateVersionRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdateVersionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.version = $root.google.devtools.artifactregistry.v1.Version.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 UpdateVersionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.UpdateVersionRequest} UpdateVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateVersionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateVersionRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateVersionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.google.devtools.artifactregistry.v1.Version.verify(message.version); - if (error) - return "version." + 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 UpdateVersionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.UpdateVersionRequest} UpdateVersionRequest - */ - UpdateVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateVersionRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.UpdateVersionRequest(); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdateVersionRequest.version: object expected"); - message.version = $root.google.devtools.artifactregistry.v1.Version.fromObject(object.version); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdateVersionRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateVersionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest - * @static - * @param {google.devtools.artifactregistry.v1.UpdateVersionRequest} message UpdateVersionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateVersionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = null; - object.updateMask = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.google.devtools.artifactregistry.v1.Version.toObject(message.version, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateVersionRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateVersionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateVersionRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.UpdateVersionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdateVersionRequest"; - }; - - return UpdateVersionRequest; - })(); - - v1.Tag = (function() { - - /** - * Properties of a Tag. - * @memberof google.devtools.artifactregistry.v1 - * @interface ITag - * @property {string|null} [name] Tag name - * @property {string|null} [version] Tag version - */ - - /** - * Constructs a new Tag. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a Tag. - * @implements ITag - * @constructor - * @param {google.devtools.artifactregistry.v1.ITag=} [properties] Properties to set - */ - function Tag(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Tag name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.Tag - * @instance - */ - Tag.prototype.name = ""; - - /** - * Tag version. - * @member {string} version - * @memberof google.devtools.artifactregistry.v1.Tag - * @instance - */ - Tag.prototype.version = ""; - - /** - * Creates a new Tag instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.Tag - * @static - * @param {google.devtools.artifactregistry.v1.ITag=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.Tag} Tag instance - */ - Tag.create = function create(properties) { - return new Tag(properties); - }; - - /** - * Encodes the specified Tag message. Does not implicitly {@link google.devtools.artifactregistry.v1.Tag.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.Tag - * @static - * @param {google.devtools.artifactregistry.v1.ITag} message Tag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tag.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); - return writer; - }; - - /** - * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Tag.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.Tag - * @static - * @param {google.devtools.artifactregistry.v1.ITag} message Tag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Tag message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.Tag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.Tag} Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tag.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Tag(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.version = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Tag message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.Tag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.Tag} Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tag.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Tag message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.Tag - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Tag.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; - - /** - * Creates a Tag message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.Tag - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.Tag} Tag - */ - Tag.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.Tag) - return object; - var message = new $root.google.devtools.artifactregistry.v1.Tag(); - if (object.name != null) - message.name = String(object.name); - if (object.version != null) - message.version = String(object.version); - return message; - }; - - /** - * Creates a plain object from a Tag message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.Tag - * @static - * @param {google.devtools.artifactregistry.v1.Tag} message Tag - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Tag.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.version = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this Tag to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.Tag - * @instance - * @returns {Object.} JSON object - */ - Tag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Tag - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.Tag - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Tag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Tag"; - }; - - return Tag; - })(); - - v1.ListTagsRequest = (function() { - - /** - * Properties of a ListTagsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListTagsRequest - * @property {string|null} [parent] ListTagsRequest parent - * @property {string|null} [filter] ListTagsRequest filter - * @property {number|null} [pageSize] ListTagsRequest pageSize - * @property {string|null} [pageToken] ListTagsRequest pageToken - */ - - /** - * Constructs a new ListTagsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListTagsRequest. - * @implements IListTagsRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IListTagsRequest=} [properties] Properties to set - */ - function ListTagsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTagsRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ListTagsRequest - * @instance - */ - ListTagsRequest.prototype.parent = ""; - - /** - * ListTagsRequest filter. - * @member {string} filter - * @memberof google.devtools.artifactregistry.v1.ListTagsRequest - * @instance - */ - ListTagsRequest.prototype.filter = ""; - - /** - * ListTagsRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1.ListTagsRequest - * @instance - */ - ListTagsRequest.prototype.pageSize = 0; - - /** - * ListTagsRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1.ListTagsRequest - * @instance - */ - ListTagsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListTagsRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListTagsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListTagsRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListTagsRequest} ListTagsRequest instance - */ - ListTagsRequest.create = function create(properties) { - return new ListTagsRequest(properties); - }; - - /** - * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListTagsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListTagsRequest} message ListTagsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTagsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - return writer; - }; - - /** - * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListTagsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListTagsRequest} message ListTagsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTagsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListTagsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListTagsRequest} ListTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTagsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListTagsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListTagsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListTagsRequest} ListTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTagsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTagsRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListTagsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTagsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListTagsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListTagsRequest} ListTagsRequest - */ - ListTagsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListTagsRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListTagsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListTagsRequest - * @static - * @param {google.devtools.artifactregistry.v1.ListTagsRequest} message ListTagsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTagsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListTagsRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListTagsRequest - * @instance - * @returns {Object.} JSON object - */ - ListTagsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTagsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListTagsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTagsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListTagsRequest"; - }; - - return ListTagsRequest; - })(); - - v1.ListTagsResponse = (function() { - - /** - * Properties of a ListTagsResponse. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListTagsResponse - * @property {Array.|null} [tags] ListTagsResponse tags - * @property {string|null} [nextPageToken] ListTagsResponse nextPageToken - */ - - /** - * Constructs a new ListTagsResponse. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListTagsResponse. - * @implements IListTagsResponse - * @constructor - * @param {google.devtools.artifactregistry.v1.IListTagsResponse=} [properties] Properties to set - */ - function ListTagsResponse(properties) { - this.tags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTagsResponse tags. - * @member {Array.} tags - * @memberof google.devtools.artifactregistry.v1.ListTagsResponse - * @instance - */ - ListTagsResponse.prototype.tags = $util.emptyArray; - - /** - * ListTagsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1.ListTagsResponse - * @instance - */ - ListTagsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListTagsResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListTagsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListTagsResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListTagsResponse} ListTagsResponse instance - */ - ListTagsResponse.create = function create(properties) { - return new ListTagsResponse(properties); - }; - - /** - * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListTagsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListTagsResponse} message ListTagsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTagsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - $root.google.devtools.artifactregistry.v1.Tag.encode(message.tags[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListTagsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListTagsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListTagsResponse} message ListTagsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTagsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListTagsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListTagsResponse} ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTagsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListTagsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push($root.google.devtools.artifactregistry.v1.Tag.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListTagsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListTagsResponse} ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTagsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTagsResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListTagsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTagsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.Tag.verify(message.tags[i]); - if (error) - return "tags." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListTagsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListTagsResponse} ListTagsResponse - */ - ListTagsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListTagsResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListTagsResponse(); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.devtools.artifactregistry.v1.ListTagsResponse.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) { - if (typeof object.tags[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ListTagsResponse.tags: object expected"); - message.tags[i] = $root.google.devtools.artifactregistry.v1.Tag.fromObject(object.tags[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListTagsResponse - * @static - * @param {google.devtools.artifactregistry.v1.ListTagsResponse} message ListTagsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTagsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tags = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = $root.google.devtools.artifactregistry.v1.Tag.toObject(message.tags[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListTagsResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListTagsResponse - * @instance - * @returns {Object.} JSON object - */ - ListTagsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTagsResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListTagsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTagsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListTagsResponse"; - }; - - return ListTagsResponse; - })(); - - v1.GetTagRequest = (function() { - - /** - * Properties of a GetTagRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGetTagRequest - * @property {string|null} [name] GetTagRequest name - */ - - /** - * Constructs a new GetTagRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GetTagRequest. - * @implements IGetTagRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IGetTagRequest=} [properties] Properties to set - */ - function GetTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTagRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GetTagRequest - * @instance - */ - GetTagRequest.prototype.name = ""; - - /** - * Creates a new GetTagRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GetTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetTagRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GetTagRequest} GetTagRequest instance - */ - GetTagRequest.create = function create(properties) { - return new GetTagRequest(properties); - }; - - /** - * Encodes the specified GetTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetTagRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GetTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetTagRequest} message GetTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTagRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetTagRequest} message GetTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GetTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GetTagRequest} GetTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTagRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetTagRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GetTagRequest} GetTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTagRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GetTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTagRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GetTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GetTagRequest} GetTagRequest - */ - GetTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GetTagRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GetTagRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GetTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.GetTagRequest} message GetTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTagRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetTagRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GetTagRequest - * @instance - * @returns {Object.} JSON object - */ - GetTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetTagRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GetTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetTagRequest"; - }; - - return GetTagRequest; - })(); - - v1.CreateTagRequest = (function() { - - /** - * Properties of a CreateTagRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface ICreateTagRequest - * @property {string|null} [parent] CreateTagRequest parent - * @property {string|null} [tagId] CreateTagRequest tagId - * @property {google.devtools.artifactregistry.v1.ITag|null} [tag] CreateTagRequest tag - */ - - /** - * Constructs a new CreateTagRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a CreateTagRequest. - * @implements ICreateTagRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.ICreateTagRequest=} [properties] Properties to set - */ - function CreateTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateTagRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.CreateTagRequest - * @instance - */ - CreateTagRequest.prototype.parent = ""; - - /** - * CreateTagRequest tagId. - * @member {string} tagId - * @memberof google.devtools.artifactregistry.v1.CreateTagRequest - * @instance - */ - CreateTagRequest.prototype.tagId = ""; - - /** - * CreateTagRequest tag. - * @member {google.devtools.artifactregistry.v1.ITag|null|undefined} tag - * @memberof google.devtools.artifactregistry.v1.CreateTagRequest - * @instance - */ - CreateTagRequest.prototype.tag = null; - - /** - * Creates a new CreateTagRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.CreateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.ICreateTagRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.CreateTagRequest} CreateTagRequest instance - */ - CreateTagRequest.create = function create(properties) { - return new CreateTagRequest(properties); - }; - - /** - * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateTagRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.CreateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.ICreateTagRequest} message CreateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTagRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.tagId != null && Object.hasOwnProperty.call(message, "tagId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tagId); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - $root.google.devtools.artifactregistry.v1.Tag.encode(message.tag, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.CreateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.ICreateTagRequest} message CreateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.CreateTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.CreateTagRequest} CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTagRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.CreateTagRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.tagId = reader.string(); - break; - } - case 3: { - message.tag = $root.google.devtools.artifactregistry.v1.Tag.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.CreateTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.CreateTagRequest} CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateTagRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.CreateTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateTagRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.tagId != null && message.hasOwnProperty("tagId")) - if (!$util.isString(message.tagId)) - return "tagId: string expected"; - if (message.tag != null && message.hasOwnProperty("tag")) { - var error = $root.google.devtools.artifactregistry.v1.Tag.verify(message.tag); - if (error) - return "tag." + error; - } - return null; - }; - - /** - * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.CreateTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.CreateTagRequest} CreateTagRequest - */ - CreateTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.CreateTagRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.CreateTagRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.tagId != null) - message.tagId = String(object.tagId); - if (object.tag != null) { - if (typeof object.tag !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.CreateTagRequest.tag: object expected"); - message.tag = $root.google.devtools.artifactregistry.v1.Tag.fromObject(object.tag); - } - return message; - }; - - /** - * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.CreateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.CreateTagRequest} message CreateTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateTagRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.tagId = ""; - object.tag = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.tagId != null && message.hasOwnProperty("tagId")) - object.tagId = message.tagId; - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = $root.google.devtools.artifactregistry.v1.Tag.toObject(message.tag, options); - return object; - }; - - /** - * Converts this CreateTagRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.CreateTagRequest - * @instance - * @returns {Object.} JSON object - */ - CreateTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateTagRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.CreateTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.CreateTagRequest"; - }; - - return CreateTagRequest; - })(); - - v1.UpdateTagRequest = (function() { - - /** - * Properties of an UpdateTagRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IUpdateTagRequest - * @property {google.devtools.artifactregistry.v1.ITag|null} [tag] UpdateTagRequest tag - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagRequest updateMask - */ - - /** - * Constructs a new UpdateTagRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an UpdateTagRequest. - * @implements IUpdateTagRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest=} [properties] Properties to set - */ - function UpdateTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateTagRequest tag. - * @member {google.devtools.artifactregistry.v1.ITag|null|undefined} tag - * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest - * @instance - */ - UpdateTagRequest.prototype.tag = null; - - /** - * UpdateTagRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest - * @instance - */ - UpdateTagRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateTagRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.UpdateTagRequest} UpdateTagRequest instance - */ - UpdateTagRequest.create = function create(properties) { - return new UpdateTagRequest(properties); - }; - - /** - * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateTagRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTagRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - $root.google.devtools.artifactregistry.v1.Tag.encode(message.tag, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.UpdateTagRequest} UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTagRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdateTagRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.tag = $root.google.devtools.artifactregistry.v1.Tag.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.UpdateTagRequest} UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateTagRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateTagRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tag != null && message.hasOwnProperty("tag")) { - var error = $root.google.devtools.artifactregistry.v1.Tag.verify(message.tag); - if (error) - return "tag." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates an UpdateTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.UpdateTagRequest} UpdateTagRequest - */ - UpdateTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateTagRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.UpdateTagRequest(); - if (object.tag != null) { - if (typeof object.tag !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdateTagRequest.tag: object expected"); - message.tag = $root.google.devtools.artifactregistry.v1.Tag.fromObject(object.tag); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdateTagRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.UpdateTagRequest} message UpdateTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateTagRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tag = null; - object.updateMask = null; - } - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = $root.google.devtools.artifactregistry.v1.Tag.toObject(message.tag, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateTagRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateTagRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdateTagRequest"; - }; - - return UpdateTagRequest; - })(); - - v1.DeleteTagRequest = (function() { - - /** - * Properties of a DeleteTagRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IDeleteTagRequest - * @property {string|null} [name] DeleteTagRequest name - */ - - /** - * Constructs a new DeleteTagRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a DeleteTagRequest. - * @implements IDeleteTagRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest=} [properties] Properties to set - */ - function DeleteTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteTagRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest - * @instance - */ - DeleteTagRequest.prototype.name = ""; - - /** - * Creates a new DeleteTagRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.DeleteTagRequest} DeleteTagRequest instance - */ - DeleteTagRequest.create = function create(properties) { - return new DeleteTagRequest(properties); - }; - - /** - * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteTagRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTagRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.DeleteTagRequest} DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTagRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DeleteTagRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.DeleteTagRequest} DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteTagRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteTagRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.DeleteTagRequest} DeleteTagRequest - */ - DeleteTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteTagRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.DeleteTagRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest - * @static - * @param {google.devtools.artifactregistry.v1.DeleteTagRequest} message DeleteTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteTagRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteTagRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteTagRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DeleteTagRequest"; - }; - - return DeleteTagRequest; - })(); - - v1.GenericArtifact = (function() { - - /** - * Properties of a GenericArtifact. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGenericArtifact - * @property {string|null} [name] GenericArtifact name - * @property {string|null} [version] GenericArtifact version - * @property {google.protobuf.ITimestamp|null} [createTime] GenericArtifact createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] GenericArtifact updateTime - */ - - /** - * Constructs a new GenericArtifact. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GenericArtifact. - * @implements IGenericArtifact - * @constructor - * @param {google.devtools.artifactregistry.v1.IGenericArtifact=} [properties] Properties to set - */ - function GenericArtifact(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]]; - } - - /** - * GenericArtifact name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GenericArtifact - * @instance - */ - GenericArtifact.prototype.name = ""; - - /** - * GenericArtifact version. - * @member {string} version - * @memberof google.devtools.artifactregistry.v1.GenericArtifact - * @instance - */ - GenericArtifact.prototype.version = ""; - - /** - * GenericArtifact createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1.GenericArtifact - * @instance - */ - GenericArtifact.prototype.createTime = null; - - /** - * GenericArtifact updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1.GenericArtifact - * @instance - */ - GenericArtifact.prototype.updateTime = null; - - /** - * Creates a new GenericArtifact instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GenericArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IGenericArtifact=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GenericArtifact} GenericArtifact instance - */ - GenericArtifact.create = function create(properties) { - return new GenericArtifact(properties); - }; - - /** - * Encodes the specified GenericArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.GenericArtifact.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GenericArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IGenericArtifact} message GenericArtifact message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenericArtifact.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenericArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GenericArtifact.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GenericArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IGenericArtifact} message GenericArtifact message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenericArtifact.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenericArtifact message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GenericArtifact - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GenericArtifact} GenericArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenericArtifact.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GenericArtifact(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.version = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenericArtifact message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GenericArtifact - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GenericArtifact} GenericArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenericArtifact.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenericArtifact message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GenericArtifact - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenericArtifact.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.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 GenericArtifact message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GenericArtifact - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GenericArtifact} GenericArtifact - */ - GenericArtifact.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GenericArtifact) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GenericArtifact(); - if (object.name != null) - message.name = String(object.name); - if (object.version != null) - message.version = String(object.version); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.GenericArtifact.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.GenericArtifact.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from a GenericArtifact message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GenericArtifact - * @static - * @param {google.devtools.artifactregistry.v1.GenericArtifact} message GenericArtifact - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenericArtifact.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.version = ""; - object.createTime = null; - object.updateTime = 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.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 GenericArtifact to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GenericArtifact - * @instance - * @returns {Object.} JSON object - */ - GenericArtifact.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GenericArtifact - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GenericArtifact - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GenericArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GenericArtifact"; - }; - - return GenericArtifact; - })(); - - v1.GoModule = (function() { - - /** - * Properties of a GoModule. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGoModule - * @property {string|null} [name] GoModule name - * @property {string|null} [version] GoModule version - * @property {google.protobuf.ITimestamp|null} [createTime] GoModule createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] GoModule updateTime - */ - - /** - * Constructs a new GoModule. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GoModule. - * @implements IGoModule - * @constructor - * @param {google.devtools.artifactregistry.v1.IGoModule=} [properties] Properties to set - */ - function GoModule(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]]; - } - - /** - * GoModule name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GoModule - * @instance - */ - GoModule.prototype.name = ""; - - /** - * GoModule version. - * @member {string} version - * @memberof google.devtools.artifactregistry.v1.GoModule - * @instance - */ - GoModule.prototype.version = ""; - - /** - * GoModule createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1.GoModule - * @instance - */ - GoModule.prototype.createTime = null; - - /** - * GoModule updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1.GoModule - * @instance - */ - GoModule.prototype.updateTime = null; - - /** - * Creates a new GoModule instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GoModule - * @static - * @param {google.devtools.artifactregistry.v1.IGoModule=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GoModule} GoModule instance - */ - GoModule.create = function create(properties) { - return new GoModule(properties); - }; - - /** - * Encodes the specified GoModule message. Does not implicitly {@link google.devtools.artifactregistry.v1.GoModule.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GoModule - * @static - * @param {google.devtools.artifactregistry.v1.IGoModule} message GoModule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoModule.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoModule message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GoModule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GoModule - * @static - * @param {google.devtools.artifactregistry.v1.IGoModule} message GoModule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoModule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoModule message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GoModule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GoModule} GoModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoModule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GoModule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.version = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoModule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GoModule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GoModule} GoModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoModule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoModule message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GoModule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoModule.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.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 GoModule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GoModule - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GoModule} GoModule - */ - GoModule.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GoModule) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GoModule(); - if (object.name != null) - message.name = String(object.name); - if (object.version != null) - message.version = String(object.version); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.GoModule.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.GoModule.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from a GoModule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GoModule - * @static - * @param {google.devtools.artifactregistry.v1.GoModule} message GoModule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoModule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.version = ""; - object.createTime = null; - object.updateTime = 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.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 GoModule to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GoModule - * @instance - * @returns {Object.} JSON object - */ - GoModule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoModule - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GoModule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GoModule"; - }; - - return GoModule; - })(); - - v1.KfpArtifact = (function() { - - /** - * Properties of a KfpArtifact. - * @memberof google.devtools.artifactregistry.v1 - * @interface IKfpArtifact - * @property {string|null} [name] KfpArtifact name - * @property {string|null} [version] KfpArtifact version - */ - - /** - * Constructs a new KfpArtifact. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a KfpArtifact. - * @implements IKfpArtifact - * @constructor - * @param {google.devtools.artifactregistry.v1.IKfpArtifact=} [properties] Properties to set - */ - function KfpArtifact(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]]; - } - - /** - * KfpArtifact name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.KfpArtifact - * @instance - */ - KfpArtifact.prototype.name = ""; - - /** - * KfpArtifact version. - * @member {string} version - * @memberof google.devtools.artifactregistry.v1.KfpArtifact - * @instance - */ - KfpArtifact.prototype.version = ""; - - /** - * Creates a new KfpArtifact instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.KfpArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IKfpArtifact=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.KfpArtifact} KfpArtifact instance - */ - KfpArtifact.create = function create(properties) { - return new KfpArtifact(properties); - }; - - /** - * Encodes the specified KfpArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.KfpArtifact.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.KfpArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IKfpArtifact} message KfpArtifact message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KfpArtifact.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); - return writer; - }; - - /** - * Encodes the specified KfpArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.KfpArtifact.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.KfpArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IKfpArtifact} message KfpArtifact message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KfpArtifact.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KfpArtifact message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.KfpArtifact - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.KfpArtifact} KfpArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KfpArtifact.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.KfpArtifact(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.version = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KfpArtifact message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.KfpArtifact - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.KfpArtifact} KfpArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KfpArtifact.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KfpArtifact message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.KfpArtifact - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KfpArtifact.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; - - /** - * Creates a KfpArtifact message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.KfpArtifact - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.KfpArtifact} KfpArtifact - */ - KfpArtifact.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.KfpArtifact) - return object; - var message = new $root.google.devtools.artifactregistry.v1.KfpArtifact(); - if (object.name != null) - message.name = String(object.name); - if (object.version != null) - message.version = String(object.version); - return message; - }; - - /** - * Creates a plain object from a KfpArtifact message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.KfpArtifact - * @static - * @param {google.devtools.artifactregistry.v1.KfpArtifact} message KfpArtifact - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KfpArtifact.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.version = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this KfpArtifact to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.KfpArtifact - * @instance - * @returns {Object.} JSON object - */ - KfpArtifact.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for KfpArtifact - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.KfpArtifact - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - KfpArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.KfpArtifact"; - }; - - return KfpArtifact; - })(); - - v1.Package = (function() { - - /** - * Properties of a Package. - * @memberof google.devtools.artifactregistry.v1 - * @interface IPackage - * @property {string|null} [name] Package name - * @property {string|null} [displayName] Package displayName - * @property {google.protobuf.ITimestamp|null} [createTime] Package createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Package updateTime - * @property {Object.|null} [annotations] Package annotations - */ - - /** - * Constructs a new Package. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a Package. - * @implements IPackage - * @constructor - * @param {google.devtools.artifactregistry.v1.IPackage=} [properties] Properties to set - */ - function Package(properties) { - this.annotations = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Package name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.Package - * @instance - */ - Package.prototype.name = ""; - - /** - * Package displayName. - * @member {string} displayName - * @memberof google.devtools.artifactregistry.v1.Package - * @instance - */ - Package.prototype.displayName = ""; - - /** - * Package createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1.Package - * @instance - */ - Package.prototype.createTime = null; - - /** - * Package updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1.Package - * @instance - */ - Package.prototype.updateTime = null; - - /** - * Package annotations. - * @member {Object.} annotations - * @memberof google.devtools.artifactregistry.v1.Package - * @instance - */ - Package.prototype.annotations = $util.emptyObject; - - /** - * Creates a new Package instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.Package - * @static - * @param {google.devtools.artifactregistry.v1.IPackage=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.Package} Package instance - */ - Package.create = function create(properties) { - return new Package(properties); - }; - - /** - * Encodes the specified Package message. Does not implicitly {@link google.devtools.artifactregistry.v1.Package.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.Package - * @static - * @param {google.devtools.artifactregistry.v1.IPackage} message Package message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Package.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) - for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified Package message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Package.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.Package - * @static - * @param {google.devtools.artifactregistry.v1.IPackage} message Package message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Package.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Package message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.Package - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.Package} Package - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Package.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Package(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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; - } - case 7: { - if (message.annotations === $util.emptyObject) - message.annotations = {}; - 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.annotations[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Package message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.Package - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.Package} Package - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Package.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Package message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.Package - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Package.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.annotations != null && message.hasOwnProperty("annotations")) { - if (!$util.isObject(message.annotations)) - return "annotations: object expected"; - var key = Object.keys(message.annotations); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.annotations[key[i]])) - return "annotations: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a Package message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.Package - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.Package} Package - */ - Package.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.Package) - return object; - var message = new $root.google.devtools.artifactregistry.v1.Package(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Package.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Package.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Package.annotations: object expected"); - message.annotations = {}; - for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) - message.annotations[keys[i]] = String(object.annotations[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a Package message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.Package - * @static - * @param {google.devtools.artifactregistry.v1.Package} message Package - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Package.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.annotations = {}; - 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); - var keys2; - if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { - object.annotations = {}; - for (var j = 0; j < keys2.length; ++j) - object.annotations[keys2[j]] = message.annotations[keys2[j]]; - } - return object; - }; - - /** - * Converts this Package to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.Package - * @instance - * @returns {Object.} JSON object - */ - Package.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Package - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.Package - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Package.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Package"; - }; - - return Package; - })(); - - v1.ListPackagesRequest = (function() { - - /** - * Properties of a ListPackagesRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListPackagesRequest - * @property {string|null} [parent] ListPackagesRequest parent - * @property {number|null} [pageSize] ListPackagesRequest pageSize - * @property {string|null} [pageToken] ListPackagesRequest pageToken - * @property {string|null} [filter] ListPackagesRequest filter - * @property {string|null} [orderBy] ListPackagesRequest orderBy - */ - - /** - * Constructs a new ListPackagesRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListPackagesRequest. - * @implements IListPackagesRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IListPackagesRequest=} [properties] Properties to set - */ - function ListPackagesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPackagesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @instance - */ - ListPackagesRequest.prototype.parent = ""; - - /** - * ListPackagesRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @instance - */ - ListPackagesRequest.prototype.pageSize = 0; - - /** - * ListPackagesRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @instance - */ - ListPackagesRequest.prototype.pageToken = ""; - - /** - * ListPackagesRequest filter. - * @member {string} filter - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @instance - */ - ListPackagesRequest.prototype.filter = ""; - - /** - * ListPackagesRequest orderBy. - * @member {string} orderBy - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @instance - */ - ListPackagesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListPackagesRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListPackagesRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListPackagesRequest} ListPackagesRequest instance - */ - ListPackagesRequest.create = function create(properties) { - return new ListPackagesRequest(properties); - }; - - /** - * Encodes the specified ListPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListPackagesRequest} message ListPackagesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPackagesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListPackagesRequest} message ListPackagesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPackagesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListPackagesRequest} ListPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPackagesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListPackagesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPackagesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListPackagesRequest} ListPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPackagesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPackagesRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPackagesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListPackagesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListPackagesRequest} ListPackagesRequest - */ - ListPackagesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListPackagesRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListPackagesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListPackagesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @static - * @param {google.devtools.artifactregistry.v1.ListPackagesRequest} message ListPackagesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPackagesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListPackagesRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @instance - * @returns {Object.} JSON object - */ - ListPackagesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPackagesRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPackagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListPackagesRequest"; - }; - - return ListPackagesRequest; - })(); - - v1.ListPackagesResponse = (function() { - - /** - * Properties of a ListPackagesResponse. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListPackagesResponse - * @property {Array.|null} [packages] ListPackagesResponse packages - * @property {string|null} [nextPageToken] ListPackagesResponse nextPageToken - */ - - /** - * Constructs a new ListPackagesResponse. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListPackagesResponse. - * @implements IListPackagesResponse - * @constructor - * @param {google.devtools.artifactregistry.v1.IListPackagesResponse=} [properties] Properties to set - */ - function ListPackagesResponse(properties) { - this.packages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPackagesResponse packages. - * @member {Array.} packages - * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse - * @instance - */ - ListPackagesResponse.prototype.packages = $util.emptyArray; - - /** - * ListPackagesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse - * @instance - */ - ListPackagesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListPackagesResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListPackagesResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListPackagesResponse} ListPackagesResponse instance - */ - ListPackagesResponse.create = function create(properties) { - return new ListPackagesResponse(properties); - }; - - /** - * Encodes the specified ListPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListPackagesResponse} message ListPackagesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPackagesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packages != null && message.packages.length) - for (var i = 0; i < message.packages.length; ++i) - $root.google.devtools.artifactregistry.v1.Package.encode(message.packages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListPackagesResponse} message ListPackagesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPackagesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListPackagesResponse} ListPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPackagesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListPackagesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.packages && message.packages.length)) - message.packages = []; - message.packages.push($root.google.devtools.artifactregistry.v1.Package.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPackagesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListPackagesResponse} ListPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPackagesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPackagesResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPackagesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packages != null && message.hasOwnProperty("packages")) { - if (!Array.isArray(message.packages)) - return "packages: array expected"; - for (var i = 0; i < message.packages.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.Package.verify(message.packages[i]); - if (error) - return "packages." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListPackagesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListPackagesResponse} ListPackagesResponse - */ - ListPackagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListPackagesResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListPackagesResponse(); - if (object.packages) { - if (!Array.isArray(object.packages)) - throw TypeError(".google.devtools.artifactregistry.v1.ListPackagesResponse.packages: array expected"); - message.packages = []; - for (var i = 0; i < object.packages.length; ++i) { - if (typeof object.packages[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ListPackagesResponse.packages: object expected"); - message.packages[i] = $root.google.devtools.artifactregistry.v1.Package.fromObject(object.packages[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListPackagesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse - * @static - * @param {google.devtools.artifactregistry.v1.ListPackagesResponse} message ListPackagesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPackagesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.packages = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.packages && message.packages.length) { - object.packages = []; - for (var j = 0; j < message.packages.length; ++j) - object.packages[j] = $root.google.devtools.artifactregistry.v1.Package.toObject(message.packages[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListPackagesResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse - * @instance - * @returns {Object.} JSON object - */ - ListPackagesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPackagesResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPackagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListPackagesResponse"; - }; - - return ListPackagesResponse; - })(); - - v1.GetPackageRequest = (function() { - - /** - * Properties of a GetPackageRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGetPackageRequest - * @property {string|null} [name] GetPackageRequest name - */ - - /** - * Constructs a new GetPackageRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GetPackageRequest. - * @implements IGetPackageRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IGetPackageRequest=} [properties] Properties to set - */ - function GetPackageRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetPackageRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GetPackageRequest - * @instance - */ - GetPackageRequest.prototype.name = ""; - - /** - * Creates a new GetPackageRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GetPackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetPackageRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GetPackageRequest} GetPackageRequest instance - */ - GetPackageRequest.create = function create(properties) { - return new GetPackageRequest(properties); - }; - - /** - * Encodes the specified GetPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPackageRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GetPackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetPackageRequest} message GetPackageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPackageRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPackageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetPackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetPackageRequest} message GetPackageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPackageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPackageRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GetPackageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GetPackageRequest} GetPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPackageRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetPackageRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPackageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetPackageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GetPackageRequest} GetPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPackageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPackageRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GetPackageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPackageRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetPackageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GetPackageRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GetPackageRequest} GetPackageRequest - */ - GetPackageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GetPackageRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GetPackageRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetPackageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GetPackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.GetPackageRequest} message GetPackageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPackageRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetPackageRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GetPackageRequest - * @instance - * @returns {Object.} JSON object - */ - GetPackageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPackageRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GetPackageRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPackageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetPackageRequest"; - }; - - return GetPackageRequest; - })(); - - v1.DeletePackageRequest = (function() { - - /** - * Properties of a DeletePackageRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IDeletePackageRequest - * @property {string|null} [name] DeletePackageRequest name - */ - - /** - * Constructs a new DeletePackageRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a DeletePackageRequest. - * @implements IDeletePackageRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest=} [properties] Properties to set - */ - function DeletePackageRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeletePackageRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest - * @instance - */ - DeletePackageRequest.prototype.name = ""; - - /** - * Creates a new DeletePackageRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.DeletePackageRequest} DeletePackageRequest instance - */ - DeletePackageRequest.create = function create(properties) { - return new DeletePackageRequest(properties); - }; - - /** - * Encodes the specified DeletePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeletePackageRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest} message DeletePackageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePackageRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeletePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeletePackageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest} message DeletePackageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePackageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeletePackageRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.DeletePackageRequest} DeletePackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePackageRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DeletePackageRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeletePackageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.DeletePackageRequest} DeletePackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePackageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeletePackageRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeletePackageRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeletePackageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.DeletePackageRequest} DeletePackageRequest - */ - DeletePackageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.DeletePackageRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.DeletePackageRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeletePackageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.DeletePackageRequest} message DeletePackageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeletePackageRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeletePackageRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest - * @instance - * @returns {Object.} JSON object - */ - DeletePackageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeletePackageRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeletePackageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DeletePackageRequest"; - }; - - return DeletePackageRequest; - })(); - - v1.UpdatePackageRequest = (function() { - - /** - * Properties of an UpdatePackageRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IUpdatePackageRequest - * @property {google.devtools.artifactregistry.v1.IPackage|null} ["package"] UpdatePackageRequest package - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePackageRequest updateMask - */ - - /** - * Constructs a new UpdatePackageRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an UpdatePackageRequest. - * @implements IUpdatePackageRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IUpdatePackageRequest=} [properties] Properties to set - */ - function UpdatePackageRequest(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]]; - } - - /** - * UpdatePackageRequest package. - * @member {google.devtools.artifactregistry.v1.IPackage|null|undefined} package - * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest - * @instance - */ - UpdatePackageRequest.prototype["package"] = null; - - /** - * UpdatePackageRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest - * @instance - */ - UpdatePackageRequest.prototype.updateMask = null; - - /** - * Creates a new UpdatePackageRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdatePackageRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.UpdatePackageRequest} UpdatePackageRequest instance - */ - UpdatePackageRequest.create = function create(properties) { - return new UpdatePackageRequest(properties); - }; - - /** - * Encodes the specified UpdatePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdatePackageRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdatePackageRequest} message UpdatePackageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePackageRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - $root.google.devtools.artifactregistry.v1.Package.encode(message["package"], 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 UpdatePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdatePackageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdatePackageRequest} message UpdatePackageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePackageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdatePackageRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.UpdatePackageRequest} UpdatePackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePackageRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdatePackageRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message["package"] = $root.google.devtools.artifactregistry.v1.Package.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 UpdatePackageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.UpdatePackageRequest} UpdatePackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePackageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdatePackageRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdatePackageRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message["package"] != null && message.hasOwnProperty("package")) { - var error = $root.google.devtools.artifactregistry.v1.Package.verify(message["package"]); - if (error) - return "package." + 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 UpdatePackageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.UpdatePackageRequest} UpdatePackageRequest - */ - UpdatePackageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.UpdatePackageRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.UpdatePackageRequest(); - if (object["package"] != null) { - if (typeof object["package"] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdatePackageRequest.package: object expected"); - message["package"] = $root.google.devtools.artifactregistry.v1.Package.fromObject(object["package"]); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdatePackageRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdatePackageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest - * @static - * @param {google.devtools.artifactregistry.v1.UpdatePackageRequest} message UpdatePackageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdatePackageRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object["package"] = null; - object.updateMask = null; - } - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = $root.google.devtools.artifactregistry.v1.Package.toObject(message["package"], options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdatePackageRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest - * @instance - * @returns {Object.} JSON object - */ - UpdatePackageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdatePackageRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.UpdatePackageRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdatePackageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdatePackageRequest"; - }; - - return UpdatePackageRequest; - })(); - - v1.UpstreamPolicy = (function() { - - /** - * Properties of an UpstreamPolicy. - * @memberof google.devtools.artifactregistry.v1 - * @interface IUpstreamPolicy - * @property {string|null} [id] UpstreamPolicy id - * @property {string|null} [repository] UpstreamPolicy repository - * @property {number|null} [priority] UpstreamPolicy priority - */ - - /** - * Constructs a new UpstreamPolicy. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an UpstreamPolicy. - * @implements IUpstreamPolicy - * @constructor - * @param {google.devtools.artifactregistry.v1.IUpstreamPolicy=} [properties] Properties to set - */ - function UpstreamPolicy(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]]; - } - - /** - * UpstreamPolicy id. - * @member {string} id - * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy - * @instance - */ - UpstreamPolicy.prototype.id = ""; - - /** - * UpstreamPolicy repository. - * @member {string} repository - * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy - * @instance - */ - UpstreamPolicy.prototype.repository = ""; - - /** - * UpstreamPolicy priority. - * @member {number} priority - * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy - * @instance - */ - UpstreamPolicy.prototype.priority = 0; - - /** - * Creates a new UpstreamPolicy instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy - * @static - * @param {google.devtools.artifactregistry.v1.IUpstreamPolicy=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.UpstreamPolicy} UpstreamPolicy instance - */ - UpstreamPolicy.create = function create(properties) { - return new UpstreamPolicy(properties); - }; - - /** - * Encodes the specified UpstreamPolicy message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpstreamPolicy.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy - * @static - * @param {google.devtools.artifactregistry.v1.IUpstreamPolicy} message UpstreamPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpstreamPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.repository); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.priority); - return writer; - }; - - /** - * Encodes the specified UpstreamPolicy message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpstreamPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy - * @static - * @param {google.devtools.artifactregistry.v1.IUpstreamPolicy} message UpstreamPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpstreamPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpstreamPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.UpstreamPolicy} UpstreamPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpstreamPolicy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpstreamPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.id = reader.string(); - break; - } - case 2: { - message.repository = reader.string(); - break; - } - case 3: { - message.priority = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpstreamPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.UpstreamPolicy} UpstreamPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpstreamPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpstreamPolicy message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpstreamPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.repository != null && message.hasOwnProperty("repository")) - if (!$util.isString(message.repository)) - return "repository: string expected"; - if (message.priority != null && message.hasOwnProperty("priority")) - if (!$util.isInteger(message.priority)) - return "priority: integer expected"; - return null; - }; - - /** - * Creates an UpstreamPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.UpstreamPolicy} UpstreamPolicy - */ - UpstreamPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.UpstreamPolicy) - return object; - var message = new $root.google.devtools.artifactregistry.v1.UpstreamPolicy(); - if (object.id != null) - message.id = String(object.id); - if (object.repository != null) - message.repository = String(object.repository); - if (object.priority != null) - message.priority = object.priority | 0; - return message; - }; - - /** - * Creates a plain object from an UpstreamPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy - * @static - * @param {google.devtools.artifactregistry.v1.UpstreamPolicy} message UpstreamPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpstreamPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.repository = ""; - object.priority = 0; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.repository != null && message.hasOwnProperty("repository")) - object.repository = message.repository; - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = message.priority; - return object; - }; - - /** - * Converts this UpstreamPolicy to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy - * @instance - * @returns {Object.} JSON object - */ - UpstreamPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpstreamPolicy - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.UpstreamPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpstreamPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpstreamPolicy"; - }; - - return UpstreamPolicy; - })(); - - v1.CleanupPolicyCondition = (function() { - - /** - * Properties of a CleanupPolicyCondition. - * @memberof google.devtools.artifactregistry.v1 - * @interface ICleanupPolicyCondition - * @property {google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState|null} [tagState] CleanupPolicyCondition tagState - * @property {Array.|null} [tagPrefixes] CleanupPolicyCondition tagPrefixes - * @property {Array.|null} [versionNamePrefixes] CleanupPolicyCondition versionNamePrefixes - * @property {Array.|null} [packageNamePrefixes] CleanupPolicyCondition packageNamePrefixes - * @property {google.protobuf.IDuration|null} [olderThan] CleanupPolicyCondition olderThan - * @property {google.protobuf.IDuration|null} [newerThan] CleanupPolicyCondition newerThan - */ - - /** - * Constructs a new CleanupPolicyCondition. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a CleanupPolicyCondition. - * @implements ICleanupPolicyCondition - * @constructor - * @param {google.devtools.artifactregistry.v1.ICleanupPolicyCondition=} [properties] Properties to set - */ - function CleanupPolicyCondition(properties) { - this.tagPrefixes = []; - this.versionNamePrefixes = []; - this.packageNamePrefixes = []; - 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]]; - } - - /** - * CleanupPolicyCondition tagState. - * @member {google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState|null|undefined} tagState - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @instance - */ - CleanupPolicyCondition.prototype.tagState = null; - - /** - * CleanupPolicyCondition tagPrefixes. - * @member {Array.} tagPrefixes - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @instance - */ - CleanupPolicyCondition.prototype.tagPrefixes = $util.emptyArray; - - /** - * CleanupPolicyCondition versionNamePrefixes. - * @member {Array.} versionNamePrefixes - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @instance - */ - CleanupPolicyCondition.prototype.versionNamePrefixes = $util.emptyArray; - - /** - * CleanupPolicyCondition packageNamePrefixes. - * @member {Array.} packageNamePrefixes - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @instance - */ - CleanupPolicyCondition.prototype.packageNamePrefixes = $util.emptyArray; - - /** - * CleanupPolicyCondition olderThan. - * @member {google.protobuf.IDuration|null|undefined} olderThan - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @instance - */ - CleanupPolicyCondition.prototype.olderThan = null; - - /** - * CleanupPolicyCondition newerThan. - * @member {google.protobuf.IDuration|null|undefined} newerThan - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @instance - */ - CleanupPolicyCondition.prototype.newerThan = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CleanupPolicyCondition.prototype, "_tagState", { - get: $util.oneOfGetter($oneOfFields = ["tagState"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CleanupPolicyCondition.prototype, "_olderThan", { - get: $util.oneOfGetter($oneOfFields = ["olderThan"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CleanupPolicyCondition.prototype, "_newerThan", { - get: $util.oneOfGetter($oneOfFields = ["newerThan"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CleanupPolicyCondition instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @static - * @param {google.devtools.artifactregistry.v1.ICleanupPolicyCondition=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.CleanupPolicyCondition} CleanupPolicyCondition instance - */ - CleanupPolicyCondition.create = function create(properties) { - return new CleanupPolicyCondition(properties); - }; - - /** - * Encodes the specified CleanupPolicyCondition message. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyCondition.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @static - * @param {google.devtools.artifactregistry.v1.ICleanupPolicyCondition} message CleanupPolicyCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CleanupPolicyCondition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tagState != null && Object.hasOwnProperty.call(message, "tagState")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.tagState); - if (message.tagPrefixes != null && message.tagPrefixes.length) - for (var i = 0; i < message.tagPrefixes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tagPrefixes[i]); - if (message.versionNamePrefixes != null && message.versionNamePrefixes.length) - for (var i = 0; i < message.versionNamePrefixes.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.versionNamePrefixes[i]); - if (message.packageNamePrefixes != null && message.packageNamePrefixes.length) - for (var i = 0; i < message.packageNamePrefixes.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.packageNamePrefixes[i]); - if (message.olderThan != null && Object.hasOwnProperty.call(message, "olderThan")) - $root.google.protobuf.Duration.encode(message.olderThan, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.newerThan != null && Object.hasOwnProperty.call(message, "newerThan")) - $root.google.protobuf.Duration.encode(message.newerThan, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CleanupPolicyCondition message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyCondition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @static - * @param {google.devtools.artifactregistry.v1.ICleanupPolicyCondition} message CleanupPolicyCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CleanupPolicyCondition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CleanupPolicyCondition message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.CleanupPolicyCondition} CleanupPolicyCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CleanupPolicyCondition.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.tagState = reader.int32(); - break; - } - case 3: { - if (!(message.tagPrefixes && message.tagPrefixes.length)) - message.tagPrefixes = []; - message.tagPrefixes.push(reader.string()); - break; - } - case 4: { - if (!(message.versionNamePrefixes && message.versionNamePrefixes.length)) - message.versionNamePrefixes = []; - message.versionNamePrefixes.push(reader.string()); - break; - } - case 5: { - if (!(message.packageNamePrefixes && message.packageNamePrefixes.length)) - message.packageNamePrefixes = []; - message.packageNamePrefixes.push(reader.string()); - break; - } - case 6: { - message.olderThan = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 7: { - message.newerThan = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CleanupPolicyCondition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.CleanupPolicyCondition} CleanupPolicyCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CleanupPolicyCondition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CleanupPolicyCondition message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CleanupPolicyCondition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.tagState != null && message.hasOwnProperty("tagState")) { - properties._tagState = 1; - switch (message.tagState) { - default: - return "tagState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.tagPrefixes != null && message.hasOwnProperty("tagPrefixes")) { - if (!Array.isArray(message.tagPrefixes)) - return "tagPrefixes: array expected"; - for (var i = 0; i < message.tagPrefixes.length; ++i) - if (!$util.isString(message.tagPrefixes[i])) - return "tagPrefixes: string[] expected"; - } - if (message.versionNamePrefixes != null && message.hasOwnProperty("versionNamePrefixes")) { - if (!Array.isArray(message.versionNamePrefixes)) - return "versionNamePrefixes: array expected"; - for (var i = 0; i < message.versionNamePrefixes.length; ++i) - if (!$util.isString(message.versionNamePrefixes[i])) - return "versionNamePrefixes: string[] expected"; - } - if (message.packageNamePrefixes != null && message.hasOwnProperty("packageNamePrefixes")) { - if (!Array.isArray(message.packageNamePrefixes)) - return "packageNamePrefixes: array expected"; - for (var i = 0; i < message.packageNamePrefixes.length; ++i) - if (!$util.isString(message.packageNamePrefixes[i])) - return "packageNamePrefixes: string[] expected"; - } - if (message.olderThan != null && message.hasOwnProperty("olderThan")) { - properties._olderThan = 1; - { - var error = $root.google.protobuf.Duration.verify(message.olderThan); - if (error) - return "olderThan." + error; - } - } - if (message.newerThan != null && message.hasOwnProperty("newerThan")) { - properties._newerThan = 1; - { - var error = $root.google.protobuf.Duration.verify(message.newerThan); - if (error) - return "newerThan." + error; - } - } - return null; - }; - - /** - * Creates a CleanupPolicyCondition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.CleanupPolicyCondition} CleanupPolicyCondition - */ - CleanupPolicyCondition.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition) - return object; - var message = new $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition(); - switch (object.tagState) { - default: - if (typeof object.tagState === "number") { - message.tagState = object.tagState; - break; - } - break; - case "TAG_STATE_UNSPECIFIED": - case 0: - message.tagState = 0; - break; - case "TAGGED": - case 1: - message.tagState = 1; - break; - case "UNTAGGED": - case 2: - message.tagState = 2; - break; - case "ANY": - case 3: - message.tagState = 3; - break; - } - if (object.tagPrefixes) { - if (!Array.isArray(object.tagPrefixes)) - throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicyCondition.tagPrefixes: array expected"); - message.tagPrefixes = []; - for (var i = 0; i < object.tagPrefixes.length; ++i) - message.tagPrefixes[i] = String(object.tagPrefixes[i]); - } - if (object.versionNamePrefixes) { - if (!Array.isArray(object.versionNamePrefixes)) - throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicyCondition.versionNamePrefixes: array expected"); - message.versionNamePrefixes = []; - for (var i = 0; i < object.versionNamePrefixes.length; ++i) - message.versionNamePrefixes[i] = String(object.versionNamePrefixes[i]); - } - if (object.packageNamePrefixes) { - if (!Array.isArray(object.packageNamePrefixes)) - throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicyCondition.packageNamePrefixes: array expected"); - message.packageNamePrefixes = []; - for (var i = 0; i < object.packageNamePrefixes.length; ++i) - message.packageNamePrefixes[i] = String(object.packageNamePrefixes[i]); - } - if (object.olderThan != null) { - if (typeof object.olderThan !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicyCondition.olderThan: object expected"); - message.olderThan = $root.google.protobuf.Duration.fromObject(object.olderThan); - } - if (object.newerThan != null) { - if (typeof object.newerThan !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicyCondition.newerThan: object expected"); - message.newerThan = $root.google.protobuf.Duration.fromObject(object.newerThan); - } - return message; - }; - - /** - * Creates a plain object from a CleanupPolicyCondition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @static - * @param {google.devtools.artifactregistry.v1.CleanupPolicyCondition} message CleanupPolicyCondition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CleanupPolicyCondition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.tagPrefixes = []; - object.versionNamePrefixes = []; - object.packageNamePrefixes = []; - } - if (message.tagState != null && message.hasOwnProperty("tagState")) { - object.tagState = options.enums === String ? $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState[message.tagState] === undefined ? message.tagState : $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState[message.tagState] : message.tagState; - if (options.oneofs) - object._tagState = "tagState"; - } - if (message.tagPrefixes && message.tagPrefixes.length) { - object.tagPrefixes = []; - for (var j = 0; j < message.tagPrefixes.length; ++j) - object.tagPrefixes[j] = message.tagPrefixes[j]; - } - if (message.versionNamePrefixes && message.versionNamePrefixes.length) { - object.versionNamePrefixes = []; - for (var j = 0; j < message.versionNamePrefixes.length; ++j) - object.versionNamePrefixes[j] = message.versionNamePrefixes[j]; - } - if (message.packageNamePrefixes && message.packageNamePrefixes.length) { - object.packageNamePrefixes = []; - for (var j = 0; j < message.packageNamePrefixes.length; ++j) - object.packageNamePrefixes[j] = message.packageNamePrefixes[j]; - } - if (message.olderThan != null && message.hasOwnProperty("olderThan")) { - object.olderThan = $root.google.protobuf.Duration.toObject(message.olderThan, options); - if (options.oneofs) - object._olderThan = "olderThan"; - } - if (message.newerThan != null && message.hasOwnProperty("newerThan")) { - object.newerThan = $root.google.protobuf.Duration.toObject(message.newerThan, options); - if (options.oneofs) - object._newerThan = "newerThan"; - } - return object; - }; - - /** - * Converts this CleanupPolicyCondition to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @instance - * @returns {Object.} JSON object - */ - CleanupPolicyCondition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CleanupPolicyCondition - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyCondition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CleanupPolicyCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.CleanupPolicyCondition"; - }; - - /** - * TagState enum. - * @name google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState - * @enum {number} - * @property {number} TAG_STATE_UNSPECIFIED=0 TAG_STATE_UNSPECIFIED value - * @property {number} TAGGED=1 TAGGED value - * @property {number} UNTAGGED=2 UNTAGGED value - * @property {number} ANY=3 ANY value - */ - CleanupPolicyCondition.TagState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TAG_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TAGGED"] = 1; - values[valuesById[2] = "UNTAGGED"] = 2; - values[valuesById[3] = "ANY"] = 3; - return values; - })(); - - return CleanupPolicyCondition; - })(); - - v1.CleanupPolicyMostRecentVersions = (function() { - - /** - * Properties of a CleanupPolicyMostRecentVersions. - * @memberof google.devtools.artifactregistry.v1 - * @interface ICleanupPolicyMostRecentVersions - * @property {Array.|null} [packageNamePrefixes] CleanupPolicyMostRecentVersions packageNamePrefixes - * @property {number|null} [keepCount] CleanupPolicyMostRecentVersions keepCount - */ - - /** - * Constructs a new CleanupPolicyMostRecentVersions. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a CleanupPolicyMostRecentVersions. - * @implements ICleanupPolicyMostRecentVersions - * @constructor - * @param {google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions=} [properties] Properties to set - */ - function CleanupPolicyMostRecentVersions(properties) { - this.packageNamePrefixes = []; - 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]]; - } - - /** - * CleanupPolicyMostRecentVersions packageNamePrefixes. - * @member {Array.} packageNamePrefixes - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions - * @instance - */ - CleanupPolicyMostRecentVersions.prototype.packageNamePrefixes = $util.emptyArray; - - /** - * CleanupPolicyMostRecentVersions keepCount. - * @member {number|null|undefined} keepCount - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions - * @instance - */ - CleanupPolicyMostRecentVersions.prototype.keepCount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CleanupPolicyMostRecentVersions.prototype, "_keepCount", { - get: $util.oneOfGetter($oneOfFields = ["keepCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CleanupPolicyMostRecentVersions instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions - * @static - * @param {google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions} CleanupPolicyMostRecentVersions instance - */ - CleanupPolicyMostRecentVersions.create = function create(properties) { - return new CleanupPolicyMostRecentVersions(properties); - }; - - /** - * Encodes the specified CleanupPolicyMostRecentVersions message. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions - * @static - * @param {google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions} message CleanupPolicyMostRecentVersions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CleanupPolicyMostRecentVersions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packageNamePrefixes != null && message.packageNamePrefixes.length) - for (var i = 0; i < message.packageNamePrefixes.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.packageNamePrefixes[i]); - if (message.keepCount != null && Object.hasOwnProperty.call(message, "keepCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.keepCount); - return writer; - }; - - /** - * Encodes the specified CleanupPolicyMostRecentVersions message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions - * @static - * @param {google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions} message CleanupPolicyMostRecentVersions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CleanupPolicyMostRecentVersions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CleanupPolicyMostRecentVersions message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions} CleanupPolicyMostRecentVersions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CleanupPolicyMostRecentVersions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.packageNamePrefixes && message.packageNamePrefixes.length)) - message.packageNamePrefixes = []; - message.packageNamePrefixes.push(reader.string()); - break; - } - case 2: { - message.keepCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CleanupPolicyMostRecentVersions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions} CleanupPolicyMostRecentVersions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CleanupPolicyMostRecentVersions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CleanupPolicyMostRecentVersions message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CleanupPolicyMostRecentVersions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.packageNamePrefixes != null && message.hasOwnProperty("packageNamePrefixes")) { - if (!Array.isArray(message.packageNamePrefixes)) - return "packageNamePrefixes: array expected"; - for (var i = 0; i < message.packageNamePrefixes.length; ++i) - if (!$util.isString(message.packageNamePrefixes[i])) - return "packageNamePrefixes: string[] expected"; - } - if (message.keepCount != null && message.hasOwnProperty("keepCount")) { - properties._keepCount = 1; - if (!$util.isInteger(message.keepCount)) - return "keepCount: integer expected"; - } - return null; - }; - - /** - * Creates a CleanupPolicyMostRecentVersions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions} CleanupPolicyMostRecentVersions - */ - CleanupPolicyMostRecentVersions.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) - return object; - var message = new $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions(); - if (object.packageNamePrefixes) { - if (!Array.isArray(object.packageNamePrefixes)) - throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.packageNamePrefixes: array expected"); - message.packageNamePrefixes = []; - for (var i = 0; i < object.packageNamePrefixes.length; ++i) - message.packageNamePrefixes[i] = String(object.packageNamePrefixes[i]); - } - if (object.keepCount != null) - message.keepCount = object.keepCount | 0; - return message; - }; - - /** - * Creates a plain object from a CleanupPolicyMostRecentVersions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions - * @static - * @param {google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions} message CleanupPolicyMostRecentVersions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CleanupPolicyMostRecentVersions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.packageNamePrefixes = []; - if (message.packageNamePrefixes && message.packageNamePrefixes.length) { - object.packageNamePrefixes = []; - for (var j = 0; j < message.packageNamePrefixes.length; ++j) - object.packageNamePrefixes[j] = message.packageNamePrefixes[j]; - } - if (message.keepCount != null && message.hasOwnProperty("keepCount")) { - object.keepCount = message.keepCount; - if (options.oneofs) - object._keepCount = "keepCount"; - } - return object; - }; - - /** - * Converts this CleanupPolicyMostRecentVersions to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions - * @instance - * @returns {Object.} JSON object - */ - CleanupPolicyMostRecentVersions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CleanupPolicyMostRecentVersions - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CleanupPolicyMostRecentVersions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions"; - }; - - return CleanupPolicyMostRecentVersions; - })(); - - v1.CleanupPolicy = (function() { - - /** - * Properties of a CleanupPolicy. - * @memberof google.devtools.artifactregistry.v1 - * @interface ICleanupPolicy - * @property {google.devtools.artifactregistry.v1.ICleanupPolicyCondition|null} [condition] CleanupPolicy condition - * @property {google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions|null} [mostRecentVersions] CleanupPolicy mostRecentVersions - * @property {string|null} [id] CleanupPolicy id - * @property {google.devtools.artifactregistry.v1.CleanupPolicy.Action|null} [action] CleanupPolicy action - */ - - /** - * Constructs a new CleanupPolicy. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a CleanupPolicy. - * @implements ICleanupPolicy - * @constructor - * @param {google.devtools.artifactregistry.v1.ICleanupPolicy=} [properties] Properties to set - */ - function CleanupPolicy(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]]; - } - - /** - * CleanupPolicy condition. - * @member {google.devtools.artifactregistry.v1.ICleanupPolicyCondition|null|undefined} condition - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @instance - */ - CleanupPolicy.prototype.condition = null; - - /** - * CleanupPolicy mostRecentVersions. - * @member {google.devtools.artifactregistry.v1.ICleanupPolicyMostRecentVersions|null|undefined} mostRecentVersions - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @instance - */ - CleanupPolicy.prototype.mostRecentVersions = null; - - /** - * CleanupPolicy id. - * @member {string} id - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @instance - */ - CleanupPolicy.prototype.id = ""; - - /** - * CleanupPolicy action. - * @member {google.devtools.artifactregistry.v1.CleanupPolicy.Action} action - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @instance - */ - CleanupPolicy.prototype.action = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CleanupPolicy conditionType. - * @member {"condition"|"mostRecentVersions"|undefined} conditionType - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @instance - */ - Object.defineProperty(CleanupPolicy.prototype, "conditionType", { - get: $util.oneOfGetter($oneOfFields = ["condition", "mostRecentVersions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CleanupPolicy instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @static - * @param {google.devtools.artifactregistry.v1.ICleanupPolicy=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.CleanupPolicy} CleanupPolicy instance - */ - CleanupPolicy.create = function create(properties) { - return new CleanupPolicy(properties); - }; - - /** - * Encodes the specified CleanupPolicy message. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicy.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @static - * @param {google.devtools.artifactregistry.v1.ICleanupPolicy} message CleanupPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CleanupPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition.encode(message.condition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.action); - if (message.mostRecentVersions != null && Object.hasOwnProperty.call(message, "mostRecentVersions")) - $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.encode(message.mostRecentVersions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CleanupPolicy message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CleanupPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @static - * @param {google.devtools.artifactregistry.v1.ICleanupPolicy} message CleanupPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CleanupPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CleanupPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.CleanupPolicy} CleanupPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CleanupPolicy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.CleanupPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.condition = $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition.decode(reader, reader.uint32()); - break; - } - case 4: { - message.mostRecentVersions = $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.decode(reader, reader.uint32()); - break; - } - case 1: { - message.id = reader.string(); - break; - } - case 3: { - message.action = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CleanupPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.CleanupPolicy} CleanupPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CleanupPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CleanupPolicy message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CleanupPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.condition != null && message.hasOwnProperty("condition")) { - properties.conditionType = 1; - { - var error = $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition.verify(message.condition); - if (error) - return "condition." + error; - } - } - if (message.mostRecentVersions != null && message.hasOwnProperty("mostRecentVersions")) { - if (properties.conditionType === 1) - return "conditionType: multiple values"; - properties.conditionType = 1; - { - var error = $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.verify(message.mostRecentVersions); - if (error) - return "mostRecentVersions." + error; - } - } - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a CleanupPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.CleanupPolicy} CleanupPolicy - */ - CleanupPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.CleanupPolicy) - return object; - var message = new $root.google.devtools.artifactregistry.v1.CleanupPolicy(); - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicy.condition: object expected"); - message.condition = $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition.fromObject(object.condition); - } - if (object.mostRecentVersions != null) { - if (typeof object.mostRecentVersions !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.CleanupPolicy.mostRecentVersions: object expected"); - message.mostRecentVersions = $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.fromObject(object.mostRecentVersions); - } - if (object.id != null) - message.id = String(object.id); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "DELETE": - case 1: - message.action = 1; - break; - case "KEEP": - case 2: - message.action = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a CleanupPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @static - * @param {google.devtools.artifactregistry.v1.CleanupPolicy} message CleanupPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CleanupPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.condition != null && message.hasOwnProperty("condition")) { - object.condition = $root.google.devtools.artifactregistry.v1.CleanupPolicyCondition.toObject(message.condition, options); - if (options.oneofs) - object.conditionType = "condition"; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.devtools.artifactregistry.v1.CleanupPolicy.Action[message.action] === undefined ? message.action : $root.google.devtools.artifactregistry.v1.CleanupPolicy.Action[message.action] : message.action; - if (message.mostRecentVersions != null && message.hasOwnProperty("mostRecentVersions")) { - object.mostRecentVersions = $root.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.toObject(message.mostRecentVersions, options); - if (options.oneofs) - object.conditionType = "mostRecentVersions"; - } - return object; - }; - - /** - * Converts this CleanupPolicy to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @instance - * @returns {Object.} JSON object - */ - CleanupPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CleanupPolicy - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.CleanupPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CleanupPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.CleanupPolicy"; - }; - - /** - * Action enum. - * @name google.devtools.artifactregistry.v1.CleanupPolicy.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} DELETE=1 DELETE value - * @property {number} KEEP=2 KEEP value - */ - CleanupPolicy.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "DELETE"] = 1; - values[valuesById[2] = "KEEP"] = 2; - return values; - })(); - - return CleanupPolicy; - })(); - - v1.VirtualRepositoryConfig = (function() { - - /** - * Properties of a VirtualRepositoryConfig. - * @memberof google.devtools.artifactregistry.v1 - * @interface IVirtualRepositoryConfig - * @property {Array.|null} [upstreamPolicies] VirtualRepositoryConfig upstreamPolicies - */ - - /** - * Constructs a new VirtualRepositoryConfig. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a VirtualRepositoryConfig. - * @implements IVirtualRepositoryConfig - * @constructor - * @param {google.devtools.artifactregistry.v1.IVirtualRepositoryConfig=} [properties] Properties to set - */ - function VirtualRepositoryConfig(properties) { - this.upstreamPolicies = []; - 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]]; - } - - /** - * VirtualRepositoryConfig upstreamPolicies. - * @member {Array.} upstreamPolicies - * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig - * @instance - */ - VirtualRepositoryConfig.prototype.upstreamPolicies = $util.emptyArray; - - /** - * Creates a new VirtualRepositoryConfig instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.IVirtualRepositoryConfig=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.VirtualRepositoryConfig} VirtualRepositoryConfig instance - */ - VirtualRepositoryConfig.create = function create(properties) { - return new VirtualRepositoryConfig(properties); - }; - - /** - * Encodes the specified VirtualRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.VirtualRepositoryConfig.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.IVirtualRepositoryConfig} message VirtualRepositoryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VirtualRepositoryConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.upstreamPolicies != null && message.upstreamPolicies.length) - for (var i = 0; i < message.upstreamPolicies.length; ++i) - $root.google.devtools.artifactregistry.v1.UpstreamPolicy.encode(message.upstreamPolicies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VirtualRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.VirtualRepositoryConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.IVirtualRepositoryConfig} message VirtualRepositoryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VirtualRepositoryConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VirtualRepositoryConfig message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.VirtualRepositoryConfig} VirtualRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VirtualRepositoryConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.upstreamPolicies && message.upstreamPolicies.length)) - message.upstreamPolicies = []; - message.upstreamPolicies.push($root.google.devtools.artifactregistry.v1.UpstreamPolicy.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VirtualRepositoryConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.VirtualRepositoryConfig} VirtualRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VirtualRepositoryConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VirtualRepositoryConfig message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VirtualRepositoryConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.upstreamPolicies != null && message.hasOwnProperty("upstreamPolicies")) { - if (!Array.isArray(message.upstreamPolicies)) - return "upstreamPolicies: array expected"; - for (var i = 0; i < message.upstreamPolicies.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.UpstreamPolicy.verify(message.upstreamPolicies[i]); - if (error) - return "upstreamPolicies." + error; - } - } - return null; - }; - - /** - * Creates a VirtualRepositoryConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.VirtualRepositoryConfig} VirtualRepositoryConfig - */ - VirtualRepositoryConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig) - return object; - var message = new $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig(); - if (object.upstreamPolicies) { - if (!Array.isArray(object.upstreamPolicies)) - throw TypeError(".google.devtools.artifactregistry.v1.VirtualRepositoryConfig.upstreamPolicies: array expected"); - message.upstreamPolicies = []; - for (var i = 0; i < object.upstreamPolicies.length; ++i) { - if (typeof object.upstreamPolicies[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.VirtualRepositoryConfig.upstreamPolicies: object expected"); - message.upstreamPolicies[i] = $root.google.devtools.artifactregistry.v1.UpstreamPolicy.fromObject(object.upstreamPolicies[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a VirtualRepositoryConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.VirtualRepositoryConfig} message VirtualRepositoryConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VirtualRepositoryConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.upstreamPolicies = []; - if (message.upstreamPolicies && message.upstreamPolicies.length) { - object.upstreamPolicies = []; - for (var j = 0; j < message.upstreamPolicies.length; ++j) - object.upstreamPolicies[j] = $root.google.devtools.artifactregistry.v1.UpstreamPolicy.toObject(message.upstreamPolicies[j], options); - } - return object; - }; - - /** - * Converts this VirtualRepositoryConfig to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig - * @instance - * @returns {Object.} JSON object - */ - VirtualRepositoryConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VirtualRepositoryConfig - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.VirtualRepositoryConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VirtualRepositoryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.VirtualRepositoryConfig"; - }; - - return VirtualRepositoryConfig; - })(); - - v1.RemoteRepositoryConfig = (function() { - - /** - * Properties of a RemoteRepositoryConfig. - * @memberof google.devtools.artifactregistry.v1 - * @interface IRemoteRepositoryConfig - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository|null} [dockerRepository] RemoteRepositoryConfig dockerRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository|null} [mavenRepository] RemoteRepositoryConfig mavenRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository|null} [npmRepository] RemoteRepositoryConfig npmRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository|null} [pythonRepository] RemoteRepositoryConfig pythonRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository|null} [aptRepository] RemoteRepositoryConfig aptRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository|null} [yumRepository] RemoteRepositoryConfig yumRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository|null} [commonRepository] RemoteRepositoryConfig commonRepository - * @property {string|null} [description] RemoteRepositoryConfig description - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials|null} [upstreamCredentials] RemoteRepositoryConfig upstreamCredentials - * @property {boolean|null} [disableUpstreamValidation] RemoteRepositoryConfig disableUpstreamValidation - */ - - /** - * Constructs a new RemoteRepositoryConfig. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a RemoteRepositoryConfig. - * @implements IRemoteRepositoryConfig - * @constructor - * @param {google.devtools.artifactregistry.v1.IRemoteRepositoryConfig=} [properties] Properties to set - */ - function RemoteRepositoryConfig(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]]; - } - - /** - * RemoteRepositoryConfig dockerRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository|null|undefined} dockerRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @instance - */ - RemoteRepositoryConfig.prototype.dockerRepository = null; - - /** - * RemoteRepositoryConfig mavenRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository|null|undefined} mavenRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @instance - */ - RemoteRepositoryConfig.prototype.mavenRepository = null; - - /** - * RemoteRepositoryConfig npmRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository|null|undefined} npmRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @instance - */ - RemoteRepositoryConfig.prototype.npmRepository = null; - - /** - * RemoteRepositoryConfig pythonRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository|null|undefined} pythonRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @instance - */ - RemoteRepositoryConfig.prototype.pythonRepository = null; - - /** - * RemoteRepositoryConfig aptRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository|null|undefined} aptRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @instance - */ - RemoteRepositoryConfig.prototype.aptRepository = null; - - /** - * RemoteRepositoryConfig yumRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository|null|undefined} yumRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @instance - */ - RemoteRepositoryConfig.prototype.yumRepository = null; - - /** - * RemoteRepositoryConfig commonRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository|null|undefined} commonRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @instance - */ - RemoteRepositoryConfig.prototype.commonRepository = null; - - /** - * RemoteRepositoryConfig description. - * @member {string} description - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @instance - */ - RemoteRepositoryConfig.prototype.description = ""; - - /** - * RemoteRepositoryConfig upstreamCredentials. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials|null|undefined} upstreamCredentials - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @instance - */ - RemoteRepositoryConfig.prototype.upstreamCredentials = null; - - /** - * RemoteRepositoryConfig disableUpstreamValidation. - * @member {boolean} disableUpstreamValidation - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @instance - */ - RemoteRepositoryConfig.prototype.disableUpstreamValidation = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RemoteRepositoryConfig remoteSource. - * @member {"dockerRepository"|"mavenRepository"|"npmRepository"|"pythonRepository"|"aptRepository"|"yumRepository"|"commonRepository"|undefined} remoteSource - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @instance - */ - Object.defineProperty(RemoteRepositoryConfig.prototype, "remoteSource", { - get: $util.oneOfGetter($oneOfFields = ["dockerRepository", "mavenRepository", "npmRepository", "pythonRepository", "aptRepository", "yumRepository", "commonRepository"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new RemoteRepositoryConfig instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.IRemoteRepositoryConfig=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig} RemoteRepositoryConfig instance - */ - RemoteRepositoryConfig.create = function create(properties) { - return new RemoteRepositoryConfig(properties); - }; - - /** - * Encodes the specified RemoteRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.IRemoteRepositoryConfig} message RemoteRepositoryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoteRepositoryConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); - if (message.dockerRepository != null && Object.hasOwnProperty.call(message, "dockerRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.encode(message.dockerRepository, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.mavenRepository != null && Object.hasOwnProperty.call(message, "mavenRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.encode(message.mavenRepository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.npmRepository != null && Object.hasOwnProperty.call(message, "npmRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.encode(message.npmRepository, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.pythonRepository != null && Object.hasOwnProperty.call(message, "pythonRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.encode(message.pythonRepository, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.aptRepository != null && Object.hasOwnProperty.call(message, "aptRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.encode(message.aptRepository, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.yumRepository != null && Object.hasOwnProperty.call(message, "yumRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.encode(message.yumRepository, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.upstreamCredentials != null && Object.hasOwnProperty.call(message, "upstreamCredentials")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.encode(message.upstreamCredentials, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.disableUpstreamValidation != null && Object.hasOwnProperty.call(message, "disableUpstreamValidation")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.disableUpstreamValidation); - if (message.commonRepository != null && Object.hasOwnProperty.call(message, "commonRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.encode(message.commonRepository, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RemoteRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.IRemoteRepositoryConfig} message RemoteRepositoryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoteRepositoryConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RemoteRepositoryConfig message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig} RemoteRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoteRepositoryConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.dockerRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.decode(reader, reader.uint32()); - break; - } - case 3: { - message.mavenRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.decode(reader, reader.uint32()); - break; - } - case 4: { - message.npmRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.decode(reader, reader.uint32()); - break; - } - case 5: { - message.pythonRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.decode(reader, reader.uint32()); - break; - } - case 6: { - message.aptRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.decode(reader, reader.uint32()); - break; - } - case 7: { - message.yumRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.decode(reader, reader.uint32()); - break; - } - case 14: { - message.commonRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.decode(reader, reader.uint32()); - break; - } - case 1: { - message.description = reader.string(); - break; - } - case 9: { - message.upstreamCredentials = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.decode(reader, reader.uint32()); - break; - } - case 12: { - message.disableUpstreamValidation = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RemoteRepositoryConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig} RemoteRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoteRepositoryConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RemoteRepositoryConfig message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RemoteRepositoryConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dockerRepository != null && message.hasOwnProperty("dockerRepository")) { - properties.remoteSource = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.verify(message.dockerRepository); - if (error) - return "dockerRepository." + error; - } - } - if (message.mavenRepository != null && message.hasOwnProperty("mavenRepository")) { - if (properties.remoteSource === 1) - return "remoteSource: multiple values"; - properties.remoteSource = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.verify(message.mavenRepository); - if (error) - return "mavenRepository." + error; - } - } - if (message.npmRepository != null && message.hasOwnProperty("npmRepository")) { - if (properties.remoteSource === 1) - return "remoteSource: multiple values"; - properties.remoteSource = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.verify(message.npmRepository); - if (error) - return "npmRepository." + error; - } - } - if (message.pythonRepository != null && message.hasOwnProperty("pythonRepository")) { - if (properties.remoteSource === 1) - return "remoteSource: multiple values"; - properties.remoteSource = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.verify(message.pythonRepository); - if (error) - return "pythonRepository." + error; - } - } - if (message.aptRepository != null && message.hasOwnProperty("aptRepository")) { - if (properties.remoteSource === 1) - return "remoteSource: multiple values"; - properties.remoteSource = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.verify(message.aptRepository); - if (error) - return "aptRepository." + error; - } - } - if (message.yumRepository != null && message.hasOwnProperty("yumRepository")) { - if (properties.remoteSource === 1) - return "remoteSource: multiple values"; - properties.remoteSource = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.verify(message.yumRepository); - if (error) - return "yumRepository." + error; - } - } - if (message.commonRepository != null && message.hasOwnProperty("commonRepository")) { - if (properties.remoteSource === 1) - return "remoteSource: multiple values"; - properties.remoteSource = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.verify(message.commonRepository); - if (error) - return "commonRepository." + error; - } - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.upstreamCredentials != null && message.hasOwnProperty("upstreamCredentials")) { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.verify(message.upstreamCredentials); - if (error) - return "upstreamCredentials." + error; - } - if (message.disableUpstreamValidation != null && message.hasOwnProperty("disableUpstreamValidation")) - if (typeof message.disableUpstreamValidation !== "boolean") - return "disableUpstreamValidation: boolean expected"; - return null; - }; - - /** - * Creates a RemoteRepositoryConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig} RemoteRepositoryConfig - */ - RemoteRepositoryConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig(); - if (object.dockerRepository != null) { - if (typeof object.dockerRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.dockerRepository: object expected"); - message.dockerRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.fromObject(object.dockerRepository); - } - if (object.mavenRepository != null) { - if (typeof object.mavenRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.mavenRepository: object expected"); - message.mavenRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.fromObject(object.mavenRepository); - } - if (object.npmRepository != null) { - if (typeof object.npmRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.npmRepository: object expected"); - message.npmRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.fromObject(object.npmRepository); - } - if (object.pythonRepository != null) { - if (typeof object.pythonRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.pythonRepository: object expected"); - message.pythonRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.fromObject(object.pythonRepository); - } - if (object.aptRepository != null) { - if (typeof object.aptRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.aptRepository: object expected"); - message.aptRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.fromObject(object.aptRepository); - } - if (object.yumRepository != null) { - if (typeof object.yumRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.yumRepository: object expected"); - message.yumRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.fromObject(object.yumRepository); - } - if (object.commonRepository != null) { - if (typeof object.commonRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.commonRepository: object expected"); - message.commonRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.fromObject(object.commonRepository); - } - if (object.description != null) - message.description = String(object.description); - if (object.upstreamCredentials != null) { - if (typeof object.upstreamCredentials !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.upstreamCredentials: object expected"); - message.upstreamCredentials = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.fromObject(object.upstreamCredentials); - } - if (object.disableUpstreamValidation != null) - message.disableUpstreamValidation = Boolean(object.disableUpstreamValidation); - return message; - }; - - /** - * Creates a plain object from a RemoteRepositoryConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig} message RemoteRepositoryConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RemoteRepositoryConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.description = ""; - object.upstreamCredentials = null; - object.disableUpstreamValidation = false; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.dockerRepository != null && message.hasOwnProperty("dockerRepository")) { - object.dockerRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.toObject(message.dockerRepository, options); - if (options.oneofs) - object.remoteSource = "dockerRepository"; - } - if (message.mavenRepository != null && message.hasOwnProperty("mavenRepository")) { - object.mavenRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.toObject(message.mavenRepository, options); - if (options.oneofs) - object.remoteSource = "mavenRepository"; - } - if (message.npmRepository != null && message.hasOwnProperty("npmRepository")) { - object.npmRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.toObject(message.npmRepository, options); - if (options.oneofs) - object.remoteSource = "npmRepository"; - } - if (message.pythonRepository != null && message.hasOwnProperty("pythonRepository")) { - object.pythonRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.toObject(message.pythonRepository, options); - if (options.oneofs) - object.remoteSource = "pythonRepository"; - } - if (message.aptRepository != null && message.hasOwnProperty("aptRepository")) { - object.aptRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.toObject(message.aptRepository, options); - if (options.oneofs) - object.remoteSource = "aptRepository"; - } - if (message.yumRepository != null && message.hasOwnProperty("yumRepository")) { - object.yumRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.toObject(message.yumRepository, options); - if (options.oneofs) - object.remoteSource = "yumRepository"; - } - if (message.upstreamCredentials != null && message.hasOwnProperty("upstreamCredentials")) - object.upstreamCredentials = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.toObject(message.upstreamCredentials, options); - if (message.disableUpstreamValidation != null && message.hasOwnProperty("disableUpstreamValidation")) - object.disableUpstreamValidation = message.disableUpstreamValidation; - if (message.commonRepository != null && message.hasOwnProperty("commonRepository")) { - object.commonRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.toObject(message.commonRepository, options); - if (options.oneofs) - object.remoteSource = "commonRepository"; - } - return object; - }; - - /** - * Converts this RemoteRepositoryConfig to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @instance - * @returns {Object.} JSON object - */ - RemoteRepositoryConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RemoteRepositoryConfig - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RemoteRepositoryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig"; - }; - - RemoteRepositoryConfig.UpstreamCredentials = (function() { - - /** - * Properties of an UpstreamCredentials. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @interface IUpstreamCredentials - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials|null} [usernamePasswordCredentials] UpstreamCredentials usernamePasswordCredentials - */ - - /** - * Constructs a new UpstreamCredentials. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @classdesc Represents an UpstreamCredentials. - * @implements IUpstreamCredentials - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials=} [properties] Properties to set - */ - function UpstreamCredentials(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]]; - } - - /** - * UpstreamCredentials usernamePasswordCredentials. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials|null|undefined} usernamePasswordCredentials - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials - * @instance - */ - UpstreamCredentials.prototype.usernamePasswordCredentials = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * UpstreamCredentials credentials. - * @member {"usernamePasswordCredentials"|undefined} credentials - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials - * @instance - */ - Object.defineProperty(UpstreamCredentials.prototype, "credentials", { - get: $util.oneOfGetter($oneOfFields = ["usernamePasswordCredentials"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UpstreamCredentials instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials} UpstreamCredentials instance - */ - UpstreamCredentials.create = function create(properties) { - return new UpstreamCredentials(properties); - }; - - /** - * Encodes the specified UpstreamCredentials message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials} message UpstreamCredentials message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpstreamCredentials.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.usernamePasswordCredentials != null && Object.hasOwnProperty.call(message, "usernamePasswordCredentials")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.encode(message.usernamePasswordCredentials, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpstreamCredentials message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IUpstreamCredentials} message UpstreamCredentials message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpstreamCredentials.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpstreamCredentials message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials} UpstreamCredentials - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpstreamCredentials.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.usernamePasswordCredentials = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpstreamCredentials message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials} UpstreamCredentials - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpstreamCredentials.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpstreamCredentials message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpstreamCredentials.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.usernamePasswordCredentials != null && message.hasOwnProperty("usernamePasswordCredentials")) { - properties.credentials = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.verify(message.usernamePasswordCredentials); - if (error) - return "usernamePasswordCredentials." + error; - } - } - return null; - }; - - /** - * Creates an UpstreamCredentials message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials} UpstreamCredentials - */ - UpstreamCredentials.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials(); - if (object.usernamePasswordCredentials != null) { - if (typeof object.usernamePasswordCredentials !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.usernamePasswordCredentials: object expected"); - message.usernamePasswordCredentials = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.fromObject(object.usernamePasswordCredentials); - } - return message; - }; - - /** - * Creates a plain object from an UpstreamCredentials message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials} message UpstreamCredentials - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpstreamCredentials.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.usernamePasswordCredentials != null && message.hasOwnProperty("usernamePasswordCredentials")) { - object.usernamePasswordCredentials = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.toObject(message.usernamePasswordCredentials, options); - if (options.oneofs) - object.credentials = "usernamePasswordCredentials"; - } - return object; - }; - - /** - * Converts this UpstreamCredentials to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials - * @instance - * @returns {Object.} JSON object - */ - UpstreamCredentials.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpstreamCredentials - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpstreamCredentials.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials"; - }; - - UpstreamCredentials.UsernamePasswordCredentials = (function() { - - /** - * Properties of a UsernamePasswordCredentials. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials - * @interface IUsernamePasswordCredentials - * @property {string|null} [username] UsernamePasswordCredentials username - * @property {string|null} [passwordSecretVersion] UsernamePasswordCredentials passwordSecretVersion - */ - - /** - * Constructs a new UsernamePasswordCredentials. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials - * @classdesc Represents a UsernamePasswordCredentials. - * @implements IUsernamePasswordCredentials - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials=} [properties] Properties to set - */ - function UsernamePasswordCredentials(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]]; - } - - /** - * UsernamePasswordCredentials username. - * @member {string} username - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials - * @instance - */ - UsernamePasswordCredentials.prototype.username = ""; - - /** - * UsernamePasswordCredentials passwordSecretVersion. - * @member {string} passwordSecretVersion - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials - * @instance - */ - UsernamePasswordCredentials.prototype.passwordSecretVersion = ""; - - /** - * Creates a new UsernamePasswordCredentials instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials} UsernamePasswordCredentials instance - */ - UsernamePasswordCredentials.create = function create(properties) { - return new UsernamePasswordCredentials(properties); - }; - - /** - * Encodes the specified UsernamePasswordCredentials message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials} message UsernamePasswordCredentials message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UsernamePasswordCredentials.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); - if (message.passwordSecretVersion != null && Object.hasOwnProperty.call(message, "passwordSecretVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.passwordSecretVersion); - return writer; - }; - - /** - * Encodes the specified UsernamePasswordCredentials message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.IUsernamePasswordCredentials} message UsernamePasswordCredentials message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UsernamePasswordCredentials.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UsernamePasswordCredentials message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials} UsernamePasswordCredentials - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UsernamePasswordCredentials.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.username = reader.string(); - break; - } - case 2: { - message.passwordSecretVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UsernamePasswordCredentials message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials} UsernamePasswordCredentials - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UsernamePasswordCredentials.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UsernamePasswordCredentials message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UsernamePasswordCredentials.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.passwordSecretVersion != null && message.hasOwnProperty("passwordSecretVersion")) - if (!$util.isString(message.passwordSecretVersion)) - return "passwordSecretVersion: string expected"; - return null; - }; - - /** - * Creates a UsernamePasswordCredentials message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials} UsernamePasswordCredentials - */ - UsernamePasswordCredentials.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials(); - if (object.username != null) - message.username = String(object.username); - if (object.passwordSecretVersion != null) - message.passwordSecretVersion = String(object.passwordSecretVersion); - return message; - }; - - /** - * Creates a plain object from a UsernamePasswordCredentials message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials} message UsernamePasswordCredentials - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UsernamePasswordCredentials.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.username = ""; - object.passwordSecretVersion = ""; - } - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.passwordSecretVersion != null && message.hasOwnProperty("passwordSecretVersion")) - object.passwordSecretVersion = message.passwordSecretVersion; - return object; - }; - - /** - * Converts this UsernamePasswordCredentials to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials - * @instance - * @returns {Object.} JSON object - */ - UsernamePasswordCredentials.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UsernamePasswordCredentials - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UsernamePasswordCredentials.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials"; - }; - - return UsernamePasswordCredentials; - })(); - - return UpstreamCredentials; - })(); - - RemoteRepositoryConfig.DockerRepository = (function() { - - /** - * Properties of a DockerRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @interface IDockerRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository|null} [publicRepository] DockerRepository publicRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository|null} [customRepository] DockerRepository customRepository - */ - - /** - * Constructs a new DockerRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @classdesc Represents a DockerRepository. - * @implements IDockerRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository=} [properties] Properties to set - */ - function DockerRepository(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]]; - } - - /** - * DockerRepository publicRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository|null|undefined} publicRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @instance - */ - DockerRepository.prototype.publicRepository = null; - - /** - * DockerRepository customRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository|null|undefined} customRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @instance - */ - DockerRepository.prototype.customRepository = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DockerRepository upstream. - * @member {"publicRepository"|"customRepository"|undefined} upstream - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @instance - */ - Object.defineProperty(DockerRepository.prototype, "upstream", { - get: $util.oneOfGetter($oneOfFields = ["publicRepository", "customRepository"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DockerRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository} DockerRepository instance - */ - DockerRepository.create = function create(properties) { - return new DockerRepository(properties); - }; - - /** - * Encodes the specified DockerRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository} message DockerRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DockerRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicRepository != null && Object.hasOwnProperty.call(message, "publicRepository")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.publicRepository); - if (message.customRepository != null && Object.hasOwnProperty.call(message, "customRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.encode(message.customRepository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DockerRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IDockerRepository} message DockerRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DockerRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DockerRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository} DockerRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DockerRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publicRepository = reader.int32(); - break; - } - case 3: { - message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DockerRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository} DockerRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DockerRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DockerRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DockerRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { - properties.upstream = 1; - switch (message.publicRepository) { - default: - return "publicRepository: enum value expected"; - case 0: - case 1: - break; - } - } - if (message.customRepository != null && message.hasOwnProperty("customRepository")) { - if (properties.upstream === 1) - return "upstream: multiple values"; - properties.upstream = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.verify(message.customRepository); - if (error) - return "customRepository." + error; - } - } - return null; - }; - - /** - * Creates a DockerRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository} DockerRepository - */ - DockerRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository(); - switch (object.publicRepository) { - default: - if (typeof object.publicRepository === "number") { - message.publicRepository = object.publicRepository; - break; - } - break; - case "PUBLIC_REPOSITORY_UNSPECIFIED": - case 0: - message.publicRepository = 0; - break; - case "DOCKER_HUB": - case 1: - message.publicRepository = 1; - break; - } - if (object.customRepository != null) { - if (typeof object.customRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.customRepository: object expected"); - message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.fromObject(object.customRepository); - } - return message; - }; - - /** - * Creates a plain object from a DockerRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository} message DockerRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DockerRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { - object.publicRepository = options.enums === String ? $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository[message.publicRepository] === undefined ? message.publicRepository : $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository[message.publicRepository] : message.publicRepository; - if (options.oneofs) - object.upstream = "publicRepository"; - } - if (message.customRepository != null && message.hasOwnProperty("customRepository")) { - object.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.toObject(message.customRepository, options); - if (options.oneofs) - object.upstream = "customRepository"; - } - return object; - }; - - /** - * Converts this DockerRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @instance - * @returns {Object.} JSON object - */ - DockerRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DockerRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DockerRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository"; - }; - - DockerRepository.CustomRepository = (function() { - - /** - * Properties of a CustomRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @interface ICustomRepository - * @property {string|null} [uri] CustomRepository uri - */ - - /** - * Constructs a new CustomRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository - * @classdesc Represents a CustomRepository. - * @implements ICustomRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository=} [properties] Properties to set - */ - function CustomRepository(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]]; - } - - /** - * CustomRepository uri. - * @member {string} uri - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository - * @instance - */ - CustomRepository.prototype.uri = ""; - - /** - * Creates a new CustomRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository} CustomRepository instance - */ - CustomRepository.create = function create(properties) { - return new CustomRepository(properties); - }; - - /** - * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository} message CustomRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.ICustomRepository} message CustomRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository} CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository} CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CustomRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository} CustomRepository - */ - CustomRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository} message CustomRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CustomRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository - * @instance - * @returns {Object.} JSON object - */ - CustomRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository"; - }; - - return CustomRepository; - })(); - - /** - * PublicRepository enum. - * @name google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository - * @enum {number} - * @property {number} PUBLIC_REPOSITORY_UNSPECIFIED=0 PUBLIC_REPOSITORY_UNSPECIFIED value - * @property {number} DOCKER_HUB=1 DOCKER_HUB value - */ - DockerRepository.PublicRepository = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PUBLIC_REPOSITORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "DOCKER_HUB"] = 1; - return values; - })(); - - return DockerRepository; - })(); - - RemoteRepositoryConfig.MavenRepository = (function() { - - /** - * Properties of a MavenRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @interface IMavenRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository|null} [publicRepository] MavenRepository publicRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository|null} [customRepository] MavenRepository customRepository - */ - - /** - * Constructs a new MavenRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @classdesc Represents a MavenRepository. - * @implements IMavenRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository=} [properties] Properties to set - */ - function MavenRepository(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]]; - } - - /** - * MavenRepository publicRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository|null|undefined} publicRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @instance - */ - MavenRepository.prototype.publicRepository = null; - - /** - * MavenRepository customRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository|null|undefined} customRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @instance - */ - MavenRepository.prototype.customRepository = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MavenRepository upstream. - * @member {"publicRepository"|"customRepository"|undefined} upstream - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @instance - */ - Object.defineProperty(MavenRepository.prototype, "upstream", { - get: $util.oneOfGetter($oneOfFields = ["publicRepository", "customRepository"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MavenRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository} MavenRepository instance - */ - MavenRepository.create = function create(properties) { - return new MavenRepository(properties); - }; - - /** - * Encodes the specified MavenRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository} message MavenRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MavenRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicRepository != null && Object.hasOwnProperty.call(message, "publicRepository")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.publicRepository); - if (message.customRepository != null && Object.hasOwnProperty.call(message, "customRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.encode(message.customRepository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MavenRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IMavenRepository} message MavenRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MavenRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MavenRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository} MavenRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MavenRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publicRepository = reader.int32(); - break; - } - case 3: { - message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MavenRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository} MavenRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MavenRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MavenRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MavenRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { - properties.upstream = 1; - switch (message.publicRepository) { - default: - return "publicRepository: enum value expected"; - case 0: - case 1: - break; - } - } - if (message.customRepository != null && message.hasOwnProperty("customRepository")) { - if (properties.upstream === 1) - return "upstream: multiple values"; - properties.upstream = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.verify(message.customRepository); - if (error) - return "customRepository." + error; - } - } - return null; - }; - - /** - * Creates a MavenRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository} MavenRepository - */ - MavenRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository(); - switch (object.publicRepository) { - default: - if (typeof object.publicRepository === "number") { - message.publicRepository = object.publicRepository; - break; - } - break; - case "PUBLIC_REPOSITORY_UNSPECIFIED": - case 0: - message.publicRepository = 0; - break; - case "MAVEN_CENTRAL": - case 1: - message.publicRepository = 1; - break; - } - if (object.customRepository != null) { - if (typeof object.customRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.customRepository: object expected"); - message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.fromObject(object.customRepository); - } - return message; - }; - - /** - * Creates a plain object from a MavenRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository} message MavenRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MavenRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { - object.publicRepository = options.enums === String ? $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository[message.publicRepository] === undefined ? message.publicRepository : $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository[message.publicRepository] : message.publicRepository; - if (options.oneofs) - object.upstream = "publicRepository"; - } - if (message.customRepository != null && message.hasOwnProperty("customRepository")) { - object.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.toObject(message.customRepository, options); - if (options.oneofs) - object.upstream = "customRepository"; - } - return object; - }; - - /** - * Converts this MavenRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @instance - * @returns {Object.} JSON object - */ - MavenRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MavenRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MavenRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository"; - }; - - MavenRepository.CustomRepository = (function() { - - /** - * Properties of a CustomRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @interface ICustomRepository - * @property {string|null} [uri] CustomRepository uri - */ - - /** - * Constructs a new CustomRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository - * @classdesc Represents a CustomRepository. - * @implements ICustomRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository=} [properties] Properties to set - */ - function CustomRepository(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]]; - } - - /** - * CustomRepository uri. - * @member {string} uri - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository - * @instance - */ - CustomRepository.prototype.uri = ""; - - /** - * Creates a new CustomRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository} CustomRepository instance - */ - CustomRepository.create = function create(properties) { - return new CustomRepository(properties); - }; - - /** - * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository} message CustomRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.ICustomRepository} message CustomRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository} CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository} CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CustomRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository} CustomRepository - */ - CustomRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository} message CustomRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CustomRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository - * @instance - * @returns {Object.} JSON object - */ - CustomRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository"; - }; - - return CustomRepository; - })(); - - /** - * PublicRepository enum. - * @name google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository - * @enum {number} - * @property {number} PUBLIC_REPOSITORY_UNSPECIFIED=0 PUBLIC_REPOSITORY_UNSPECIFIED value - * @property {number} MAVEN_CENTRAL=1 MAVEN_CENTRAL value - */ - MavenRepository.PublicRepository = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PUBLIC_REPOSITORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "MAVEN_CENTRAL"] = 1; - return values; - })(); - - return MavenRepository; - })(); - - RemoteRepositoryConfig.NpmRepository = (function() { - - /** - * Properties of a NpmRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @interface INpmRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository|null} [publicRepository] NpmRepository publicRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository|null} [customRepository] NpmRepository customRepository - */ - - /** - * Constructs a new NpmRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @classdesc Represents a NpmRepository. - * @implements INpmRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository=} [properties] Properties to set - */ - function NpmRepository(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]]; - } - - /** - * NpmRepository publicRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository|null|undefined} publicRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @instance - */ - NpmRepository.prototype.publicRepository = null; - - /** - * NpmRepository customRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository|null|undefined} customRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @instance - */ - NpmRepository.prototype.customRepository = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NpmRepository upstream. - * @member {"publicRepository"|"customRepository"|undefined} upstream - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @instance - */ - Object.defineProperty(NpmRepository.prototype, "upstream", { - get: $util.oneOfGetter($oneOfFields = ["publicRepository", "customRepository"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NpmRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository} NpmRepository instance - */ - NpmRepository.create = function create(properties) { - return new NpmRepository(properties); - }; - - /** - * Encodes the specified NpmRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository} message NpmRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NpmRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicRepository != null && Object.hasOwnProperty.call(message, "publicRepository")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.publicRepository); - if (message.customRepository != null && Object.hasOwnProperty.call(message, "customRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.encode(message.customRepository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NpmRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.INpmRepository} message NpmRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NpmRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NpmRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository} NpmRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NpmRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publicRepository = reader.int32(); - break; - } - case 3: { - message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NpmRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository} NpmRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NpmRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NpmRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NpmRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { - properties.upstream = 1; - switch (message.publicRepository) { - default: - return "publicRepository: enum value expected"; - case 0: - case 1: - break; - } - } - if (message.customRepository != null && message.hasOwnProperty("customRepository")) { - if (properties.upstream === 1) - return "upstream: multiple values"; - properties.upstream = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.verify(message.customRepository); - if (error) - return "customRepository." + error; - } - } - return null; - }; - - /** - * Creates a NpmRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository} NpmRepository - */ - NpmRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository(); - switch (object.publicRepository) { - default: - if (typeof object.publicRepository === "number") { - message.publicRepository = object.publicRepository; - break; - } - break; - case "PUBLIC_REPOSITORY_UNSPECIFIED": - case 0: - message.publicRepository = 0; - break; - case "NPMJS": - case 1: - message.publicRepository = 1; - break; - } - if (object.customRepository != null) { - if (typeof object.customRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.customRepository: object expected"); - message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.fromObject(object.customRepository); - } - return message; - }; - - /** - * Creates a plain object from a NpmRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository} message NpmRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NpmRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { - object.publicRepository = options.enums === String ? $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository[message.publicRepository] === undefined ? message.publicRepository : $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository[message.publicRepository] : message.publicRepository; - if (options.oneofs) - object.upstream = "publicRepository"; - } - if (message.customRepository != null && message.hasOwnProperty("customRepository")) { - object.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.toObject(message.customRepository, options); - if (options.oneofs) - object.upstream = "customRepository"; - } - return object; - }; - - /** - * Converts this NpmRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @instance - * @returns {Object.} JSON object - */ - NpmRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NpmRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NpmRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository"; - }; - - NpmRepository.CustomRepository = (function() { - - /** - * Properties of a CustomRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @interface ICustomRepository - * @property {string|null} [uri] CustomRepository uri - */ - - /** - * Constructs a new CustomRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository - * @classdesc Represents a CustomRepository. - * @implements ICustomRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository=} [properties] Properties to set - */ - function CustomRepository(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]]; - } - - /** - * CustomRepository uri. - * @member {string} uri - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository - * @instance - */ - CustomRepository.prototype.uri = ""; - - /** - * Creates a new CustomRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository} CustomRepository instance - */ - CustomRepository.create = function create(properties) { - return new CustomRepository(properties); - }; - - /** - * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository} message CustomRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.ICustomRepository} message CustomRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository} CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository} CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CustomRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository} CustomRepository - */ - CustomRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository} message CustomRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CustomRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository - * @instance - * @returns {Object.} JSON object - */ - CustomRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository"; - }; - - return CustomRepository; - })(); - - /** - * PublicRepository enum. - * @name google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository - * @enum {number} - * @property {number} PUBLIC_REPOSITORY_UNSPECIFIED=0 PUBLIC_REPOSITORY_UNSPECIFIED value - * @property {number} NPMJS=1 NPMJS value - */ - NpmRepository.PublicRepository = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PUBLIC_REPOSITORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "NPMJS"] = 1; - return values; - })(); - - return NpmRepository; - })(); - - RemoteRepositoryConfig.PythonRepository = (function() { - - /** - * Properties of a PythonRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @interface IPythonRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository|null} [publicRepository] PythonRepository publicRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository|null} [customRepository] PythonRepository customRepository - */ - - /** - * Constructs a new PythonRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @classdesc Represents a PythonRepository. - * @implements IPythonRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository=} [properties] Properties to set - */ - function PythonRepository(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]]; - } - - /** - * PythonRepository publicRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository|null|undefined} publicRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @instance - */ - PythonRepository.prototype.publicRepository = null; - - /** - * PythonRepository customRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository|null|undefined} customRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @instance - */ - PythonRepository.prototype.customRepository = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PythonRepository upstream. - * @member {"publicRepository"|"customRepository"|undefined} upstream - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @instance - */ - Object.defineProperty(PythonRepository.prototype, "upstream", { - get: $util.oneOfGetter($oneOfFields = ["publicRepository", "customRepository"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PythonRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository} PythonRepository instance - */ - PythonRepository.create = function create(properties) { - return new PythonRepository(properties); - }; - - /** - * Encodes the specified PythonRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository} message PythonRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicRepository != null && Object.hasOwnProperty.call(message, "publicRepository")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.publicRepository); - if (message.customRepository != null && Object.hasOwnProperty.call(message, "customRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.encode(message.customRepository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IPythonRepository} message PythonRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository} PythonRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publicRepository = reader.int32(); - break; - } - case 3: { - message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository} PythonRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { - properties.upstream = 1; - switch (message.publicRepository) { - default: - return "publicRepository: enum value expected"; - case 0: - case 1: - break; - } - } - if (message.customRepository != null && message.hasOwnProperty("customRepository")) { - if (properties.upstream === 1) - return "upstream: multiple values"; - properties.upstream = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.verify(message.customRepository); - if (error) - return "customRepository." + error; - } - } - return null; - }; - - /** - * Creates a PythonRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository} PythonRepository - */ - PythonRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository(); - switch (object.publicRepository) { - default: - if (typeof object.publicRepository === "number") { - message.publicRepository = object.publicRepository; - break; - } - break; - case "PUBLIC_REPOSITORY_UNSPECIFIED": - case 0: - message.publicRepository = 0; - break; - case "PYPI": - case 1: - message.publicRepository = 1; - break; - } - if (object.customRepository != null) { - if (typeof object.customRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.customRepository: object expected"); - message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.fromObject(object.customRepository); - } - return message; - }; - - /** - * Creates a plain object from a PythonRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository} message PythonRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { - object.publicRepository = options.enums === String ? $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository[message.publicRepository] === undefined ? message.publicRepository : $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository[message.publicRepository] : message.publicRepository; - if (options.oneofs) - object.upstream = "publicRepository"; - } - if (message.customRepository != null && message.hasOwnProperty("customRepository")) { - object.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.toObject(message.customRepository, options); - if (options.oneofs) - object.upstream = "customRepository"; - } - return object; - }; - - /** - * Converts this PythonRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @instance - * @returns {Object.} JSON object - */ - PythonRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository"; - }; - - PythonRepository.CustomRepository = (function() { - - /** - * Properties of a CustomRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @interface ICustomRepository - * @property {string|null} [uri] CustomRepository uri - */ - - /** - * Constructs a new CustomRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository - * @classdesc Represents a CustomRepository. - * @implements ICustomRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository=} [properties] Properties to set - */ - function CustomRepository(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]]; - } - - /** - * CustomRepository uri. - * @member {string} uri - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository - * @instance - */ - CustomRepository.prototype.uri = ""; - - /** - * Creates a new CustomRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository} CustomRepository instance - */ - CustomRepository.create = function create(properties) { - return new CustomRepository(properties); - }; - - /** - * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository} message CustomRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.ICustomRepository} message CustomRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository} CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository} CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CustomRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository} CustomRepository - */ - CustomRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository} message CustomRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CustomRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository - * @instance - * @returns {Object.} JSON object - */ - CustomRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository"; - }; - - return CustomRepository; - })(); - - /** - * PublicRepository enum. - * @name google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository - * @enum {number} - * @property {number} PUBLIC_REPOSITORY_UNSPECIFIED=0 PUBLIC_REPOSITORY_UNSPECIFIED value - * @property {number} PYPI=1 PYPI value - */ - PythonRepository.PublicRepository = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PUBLIC_REPOSITORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "PYPI"] = 1; - return values; - })(); - - return PythonRepository; - })(); - - RemoteRepositoryConfig.AptRepository = (function() { - - /** - * Properties of an AptRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @interface IAptRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository|null} [publicRepository] AptRepository publicRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository|null} [customRepository] AptRepository customRepository - */ - - /** - * Constructs a new AptRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @classdesc Represents an AptRepository. - * @implements IAptRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository=} [properties] Properties to set - */ - function AptRepository(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]]; - } - - /** - * AptRepository publicRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository|null|undefined} publicRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @instance - */ - AptRepository.prototype.publicRepository = null; - - /** - * AptRepository customRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository|null|undefined} customRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @instance - */ - AptRepository.prototype.customRepository = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AptRepository upstream. - * @member {"publicRepository"|"customRepository"|undefined} upstream - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @instance - */ - Object.defineProperty(AptRepository.prototype, "upstream", { - get: $util.oneOfGetter($oneOfFields = ["publicRepository", "customRepository"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AptRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository} AptRepository instance - */ - AptRepository.create = function create(properties) { - return new AptRepository(properties); - }; - - /** - * Encodes the specified AptRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository} message AptRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AptRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicRepository != null && Object.hasOwnProperty.call(message, "publicRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.encode(message.publicRepository, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.customRepository != null && Object.hasOwnProperty.call(message, "customRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.encode(message.customRepository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AptRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IAptRepository} message AptRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AptRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AptRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository} AptRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AptRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publicRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.decode(reader, reader.uint32()); - break; - } - case 3: { - message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AptRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository} AptRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AptRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AptRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AptRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { - properties.upstream = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.verify(message.publicRepository); - if (error) - return "publicRepository." + error; - } - } - if (message.customRepository != null && message.hasOwnProperty("customRepository")) { - if (properties.upstream === 1) - return "upstream: multiple values"; - properties.upstream = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.verify(message.customRepository); - if (error) - return "customRepository." + error; - } - } - return null; - }; - - /** - * Creates an AptRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository} AptRepository - */ - AptRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository(); - if (object.publicRepository != null) { - if (typeof object.publicRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.publicRepository: object expected"); - message.publicRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.fromObject(object.publicRepository); - } - if (object.customRepository != null) { - if (typeof object.customRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.customRepository: object expected"); - message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.fromObject(object.customRepository); - } - return message; - }; - - /** - * Creates a plain object from an AptRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository} message AptRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AptRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { - object.publicRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.toObject(message.publicRepository, options); - if (options.oneofs) - object.upstream = "publicRepository"; - } - if (message.customRepository != null && message.hasOwnProperty("customRepository")) { - object.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.toObject(message.customRepository, options); - if (options.oneofs) - object.upstream = "customRepository"; - } - return object; - }; - - /** - * Converts this AptRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @instance - * @returns {Object.} JSON object - */ - AptRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AptRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AptRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository"; - }; - - AptRepository.PublicRepository = (function() { - - /** - * Properties of a PublicRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @interface IPublicRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase|null} [repositoryBase] PublicRepository repositoryBase - * @property {string|null} [repositoryPath] PublicRepository repositoryPath - */ - - /** - * Constructs a new PublicRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @classdesc Represents a PublicRepository. - * @implements IPublicRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository=} [properties] Properties to set - */ - function PublicRepository(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]]; - } - - /** - * PublicRepository repositoryBase. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase} repositoryBase - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository - * @instance - */ - PublicRepository.prototype.repositoryBase = 0; - - /** - * PublicRepository repositoryPath. - * @member {string} repositoryPath - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository - * @instance - */ - PublicRepository.prototype.repositoryPath = ""; - - /** - * Creates a new PublicRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository} PublicRepository instance - */ - PublicRepository.create = function create(properties) { - return new PublicRepository(properties); - }; - - /** - * Encodes the specified PublicRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository} message PublicRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublicRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.repositoryBase != null && Object.hasOwnProperty.call(message, "repositoryBase")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.repositoryBase); - if (message.repositoryPath != null && Object.hasOwnProperty.call(message, "repositoryPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.repositoryPath); - return writer; - }; - - /** - * Encodes the specified PublicRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.IPublicRepository} message PublicRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublicRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PublicRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository} PublicRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublicRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.repositoryBase = reader.int32(); - break; - } - case 2: { - message.repositoryPath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PublicRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository} PublicRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublicRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PublicRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PublicRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.repositoryBase != null && message.hasOwnProperty("repositoryBase")) - switch (message.repositoryBase) { - default: - return "repositoryBase: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.repositoryPath != null && message.hasOwnProperty("repositoryPath")) - if (!$util.isString(message.repositoryPath)) - return "repositoryPath: string expected"; - return null; - }; - - /** - * Creates a PublicRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository} PublicRepository - */ - PublicRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository(); - switch (object.repositoryBase) { - default: - if (typeof object.repositoryBase === "number") { - message.repositoryBase = object.repositoryBase; - break; - } - break; - case "REPOSITORY_BASE_UNSPECIFIED": - case 0: - message.repositoryBase = 0; - break; - case "DEBIAN": - case 1: - message.repositoryBase = 1; - break; - case "UBUNTU": - case 2: - message.repositoryBase = 2; - break; - case "DEBIAN_SNAPSHOT": - case 3: - message.repositoryBase = 3; - break; - } - if (object.repositoryPath != null) - message.repositoryPath = String(object.repositoryPath); - return message; - }; - - /** - * Creates a plain object from a PublicRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository} message PublicRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PublicRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.repositoryBase = options.enums === String ? "REPOSITORY_BASE_UNSPECIFIED" : 0; - object.repositoryPath = ""; - } - if (message.repositoryBase != null && message.hasOwnProperty("repositoryBase")) - object.repositoryBase = options.enums === String ? $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase[message.repositoryBase] === undefined ? message.repositoryBase : $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase[message.repositoryBase] : message.repositoryBase; - if (message.repositoryPath != null && message.hasOwnProperty("repositoryPath")) - object.repositoryPath = message.repositoryPath; - return object; - }; - - /** - * Converts this PublicRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository - * @instance - * @returns {Object.} JSON object - */ - PublicRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PublicRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PublicRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository"; - }; - - /** - * RepositoryBase enum. - * @name google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase - * @enum {number} - * @property {number} REPOSITORY_BASE_UNSPECIFIED=0 REPOSITORY_BASE_UNSPECIFIED value - * @property {number} DEBIAN=1 DEBIAN value - * @property {number} UBUNTU=2 UBUNTU value - * @property {number} DEBIAN_SNAPSHOT=3 DEBIAN_SNAPSHOT value - */ - PublicRepository.RepositoryBase = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPOSITORY_BASE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEBIAN"] = 1; - values[valuesById[2] = "UBUNTU"] = 2; - values[valuesById[3] = "DEBIAN_SNAPSHOT"] = 3; - return values; - })(); - - return PublicRepository; - })(); - - AptRepository.CustomRepository = (function() { - - /** - * Properties of a CustomRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @interface ICustomRepository - * @property {string|null} [uri] CustomRepository uri - */ - - /** - * Constructs a new CustomRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository - * @classdesc Represents a CustomRepository. - * @implements ICustomRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository=} [properties] Properties to set - */ - function CustomRepository(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]]; - } - - /** - * CustomRepository uri. - * @member {string} uri - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository - * @instance - */ - CustomRepository.prototype.uri = ""; - - /** - * Creates a new CustomRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository} CustomRepository instance - */ - CustomRepository.create = function create(properties) { - return new CustomRepository(properties); - }; - - /** - * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository} message CustomRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.ICustomRepository} message CustomRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository} CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository} CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CustomRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository} CustomRepository - */ - CustomRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository} message CustomRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CustomRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository - * @instance - * @returns {Object.} JSON object - */ - CustomRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository"; - }; - - return CustomRepository; - })(); - - return AptRepository; - })(); - - RemoteRepositoryConfig.YumRepository = (function() { - - /** - * Properties of a YumRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @interface IYumRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository|null} [publicRepository] YumRepository publicRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository|null} [customRepository] YumRepository customRepository - */ - - /** - * Constructs a new YumRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @classdesc Represents a YumRepository. - * @implements IYumRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository=} [properties] Properties to set - */ - function YumRepository(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]]; - } - - /** - * YumRepository publicRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository|null|undefined} publicRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @instance - */ - YumRepository.prototype.publicRepository = null; - - /** - * YumRepository customRepository. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository|null|undefined} customRepository - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @instance - */ - YumRepository.prototype.customRepository = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * YumRepository upstream. - * @member {"publicRepository"|"customRepository"|undefined} upstream - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @instance - */ - Object.defineProperty(YumRepository.prototype, "upstream", { - get: $util.oneOfGetter($oneOfFields = ["publicRepository", "customRepository"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new YumRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository} YumRepository instance - */ - YumRepository.create = function create(properties) { - return new YumRepository(properties); - }; - - /** - * Encodes the specified YumRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository} message YumRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - YumRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicRepository != null && Object.hasOwnProperty.call(message, "publicRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.encode(message.publicRepository, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.customRepository != null && Object.hasOwnProperty.call(message, "customRepository")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.encode(message.customRepository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified YumRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.IYumRepository} message YumRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - YumRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a YumRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository} YumRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - YumRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publicRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.decode(reader, reader.uint32()); - break; - } - case 3: { - message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a YumRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository} YumRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - YumRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a YumRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - YumRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { - properties.upstream = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.verify(message.publicRepository); - if (error) - return "publicRepository." + error; - } - } - if (message.customRepository != null && message.hasOwnProperty("customRepository")) { - if (properties.upstream === 1) - return "upstream: multiple values"; - properties.upstream = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.verify(message.customRepository); - if (error) - return "customRepository." + error; - } - } - return null; - }; - - /** - * Creates a YumRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository} YumRepository - */ - YumRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository(); - if (object.publicRepository != null) { - if (typeof object.publicRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.publicRepository: object expected"); - message.publicRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.fromObject(object.publicRepository); - } - if (object.customRepository != null) { - if (typeof object.customRepository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.customRepository: object expected"); - message.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.fromObject(object.customRepository); - } - return message; - }; - - /** - * Creates a plain object from a YumRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository} message YumRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - YumRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.publicRepository != null && message.hasOwnProperty("publicRepository")) { - object.publicRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.toObject(message.publicRepository, options); - if (options.oneofs) - object.upstream = "publicRepository"; - } - if (message.customRepository != null && message.hasOwnProperty("customRepository")) { - object.customRepository = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.toObject(message.customRepository, options); - if (options.oneofs) - object.upstream = "customRepository"; - } - return object; - }; - - /** - * Converts this YumRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @instance - * @returns {Object.} JSON object - */ - YumRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for YumRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - YumRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository"; - }; - - YumRepository.PublicRepository = (function() { - - /** - * Properties of a PublicRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @interface IPublicRepository - * @property {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase|null} [repositoryBase] PublicRepository repositoryBase - * @property {string|null} [repositoryPath] PublicRepository repositoryPath - */ - - /** - * Constructs a new PublicRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @classdesc Represents a PublicRepository. - * @implements IPublicRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository=} [properties] Properties to set - */ - function PublicRepository(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]]; - } - - /** - * PublicRepository repositoryBase. - * @member {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase} repositoryBase - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository - * @instance - */ - PublicRepository.prototype.repositoryBase = 0; - - /** - * PublicRepository repositoryPath. - * @member {string} repositoryPath - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository - * @instance - */ - PublicRepository.prototype.repositoryPath = ""; - - /** - * Creates a new PublicRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository} PublicRepository instance - */ - PublicRepository.create = function create(properties) { - return new PublicRepository(properties); - }; - - /** - * Encodes the specified PublicRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository} message PublicRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublicRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.repositoryBase != null && Object.hasOwnProperty.call(message, "repositoryBase")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.repositoryBase); - if (message.repositoryPath != null && Object.hasOwnProperty.call(message, "repositoryPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.repositoryPath); - return writer; - }; - - /** - * Encodes the specified PublicRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.IPublicRepository} message PublicRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublicRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PublicRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository} PublicRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublicRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.repositoryBase = reader.int32(); - break; - } - case 2: { - message.repositoryPath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PublicRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository} PublicRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublicRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PublicRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PublicRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.repositoryBase != null && message.hasOwnProperty("repositoryBase")) - switch (message.repositoryBase) { - default: - return "repositoryBase: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.repositoryPath != null && message.hasOwnProperty("repositoryPath")) - if (!$util.isString(message.repositoryPath)) - return "repositoryPath: string expected"; - return null; - }; - - /** - * Creates a PublicRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository} PublicRepository - */ - PublicRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository(); - switch (object.repositoryBase) { - default: - if (typeof object.repositoryBase === "number") { - message.repositoryBase = object.repositoryBase; - break; - } - break; - case "REPOSITORY_BASE_UNSPECIFIED": - case 0: - message.repositoryBase = 0; - break; - case "CENTOS": - case 1: - message.repositoryBase = 1; - break; - case "CENTOS_DEBUG": - case 2: - message.repositoryBase = 2; - break; - case "CENTOS_VAULT": - case 3: - message.repositoryBase = 3; - break; - case "CENTOS_STREAM": - case 4: - message.repositoryBase = 4; - break; - case "ROCKY": - case 5: - message.repositoryBase = 5; - break; - case "EPEL": - case 6: - message.repositoryBase = 6; - break; - } - if (object.repositoryPath != null) - message.repositoryPath = String(object.repositoryPath); - return message; - }; - - /** - * Creates a plain object from a PublicRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository} message PublicRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PublicRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.repositoryBase = options.enums === String ? "REPOSITORY_BASE_UNSPECIFIED" : 0; - object.repositoryPath = ""; - } - if (message.repositoryBase != null && message.hasOwnProperty("repositoryBase")) - object.repositoryBase = options.enums === String ? $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase[message.repositoryBase] === undefined ? message.repositoryBase : $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase[message.repositoryBase] : message.repositoryBase; - if (message.repositoryPath != null && message.hasOwnProperty("repositoryPath")) - object.repositoryPath = message.repositoryPath; - return object; - }; - - /** - * Converts this PublicRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository - * @instance - * @returns {Object.} JSON object - */ - PublicRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PublicRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PublicRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository"; - }; - - /** - * RepositoryBase enum. - * @name google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase - * @enum {number} - * @property {number} REPOSITORY_BASE_UNSPECIFIED=0 REPOSITORY_BASE_UNSPECIFIED value - * @property {number} CENTOS=1 CENTOS value - * @property {number} CENTOS_DEBUG=2 CENTOS_DEBUG value - * @property {number} CENTOS_VAULT=3 CENTOS_VAULT value - * @property {number} CENTOS_STREAM=4 CENTOS_STREAM value - * @property {number} ROCKY=5 ROCKY value - * @property {number} EPEL=6 EPEL value - */ - PublicRepository.RepositoryBase = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPOSITORY_BASE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CENTOS"] = 1; - values[valuesById[2] = "CENTOS_DEBUG"] = 2; - values[valuesById[3] = "CENTOS_VAULT"] = 3; - values[valuesById[4] = "CENTOS_STREAM"] = 4; - values[valuesById[5] = "ROCKY"] = 5; - values[valuesById[6] = "EPEL"] = 6; - return values; - })(); - - return PublicRepository; - })(); - - YumRepository.CustomRepository = (function() { - - /** - * Properties of a CustomRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @interface ICustomRepository - * @property {string|null} [uri] CustomRepository uri - */ - - /** - * Constructs a new CustomRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository - * @classdesc Represents a CustomRepository. - * @implements ICustomRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository=} [properties] Properties to set - */ - function CustomRepository(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]]; - } - - /** - * CustomRepository uri. - * @member {string} uri - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository - * @instance - */ - CustomRepository.prototype.uri = ""; - - /** - * Creates a new CustomRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository} CustomRepository instance - */ - CustomRepository.create = function create(properties) { - return new CustomRepository(properties); - }; - - /** - * Encodes the specified CustomRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository} message CustomRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CustomRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.ICustomRepository} message CustomRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository} CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository} CustomRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CustomRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository} CustomRepository - */ - CustomRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CustomRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository} message CustomRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CustomRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository - * @instance - * @returns {Object.} JSON object - */ - CustomRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository"; - }; - - return CustomRepository; - })(); - - return YumRepository; - })(); - - RemoteRepositoryConfig.CommonRemoteRepository = (function() { - - /** - * Properties of a CommonRemoteRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @interface ICommonRemoteRepository - * @property {string|null} [uri] CommonRemoteRepository uri - */ - - /** - * Constructs a new CommonRemoteRepository. - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig - * @classdesc Represents a CommonRemoteRepository. - * @implements ICommonRemoteRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository=} [properties] Properties to set - */ - function CommonRemoteRepository(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]]; - } - - /** - * CommonRemoteRepository uri. - * @member {string} uri - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository - * @instance - */ - CommonRemoteRepository.prototype.uri = ""; - - /** - * Creates a new CommonRemoteRepository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository} CommonRemoteRepository instance - */ - CommonRemoteRepository.create = function create(properties) { - return new CommonRemoteRepository(properties); - }; - - /** - * Encodes the specified CommonRemoteRepository message. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository} message CommonRemoteRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonRemoteRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CommonRemoteRepository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.ICommonRemoteRepository} message CommonRemoteRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonRemoteRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommonRemoteRepository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository} CommonRemoteRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonRemoteRepository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonRemoteRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository} CommonRemoteRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonRemoteRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonRemoteRepository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonRemoteRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CommonRemoteRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository} CommonRemoteRepository - */ - CommonRemoteRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CommonRemoteRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository - * @static - * @param {google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository} message CommonRemoteRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonRemoteRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CommonRemoteRepository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository - * @instance - * @returns {Object.} JSON object - */ - CommonRemoteRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonRemoteRepository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonRemoteRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository"; - }; - - return CommonRemoteRepository; - })(); - - return RemoteRepositoryConfig; - })(); - - v1.Repository = (function() { - - /** - * Properties of a Repository. - * @memberof google.devtools.artifactregistry.v1 - * @interface IRepository - * @property {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig|null} [mavenConfig] Repository mavenConfig - * @property {google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig|null} [dockerConfig] Repository dockerConfig - * @property {google.devtools.artifactregistry.v1.IVirtualRepositoryConfig|null} [virtualRepositoryConfig] Repository virtualRepositoryConfig - * @property {google.devtools.artifactregistry.v1.IRemoteRepositoryConfig|null} [remoteRepositoryConfig] Repository remoteRepositoryConfig - * @property {string|null} [name] Repository name - * @property {google.devtools.artifactregistry.v1.Repository.Format|null} [format] Repository format - * @property {string|null} [description] Repository description - * @property {Object.|null} [labels] Repository labels - * @property {google.protobuf.ITimestamp|null} [createTime] Repository createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Repository updateTime - * @property {string|null} [kmsKeyName] Repository kmsKeyName - * @property {google.devtools.artifactregistry.v1.Repository.Mode|null} [mode] Repository mode - * @property {Object.|null} [cleanupPolicies] Repository cleanupPolicies - * @property {number|Long|null} [sizeBytes] Repository sizeBytes - * @property {boolean|null} [satisfiesPzs] Repository satisfiesPzs - * @property {boolean|null} [cleanupPolicyDryRun] Repository cleanupPolicyDryRun - * @property {google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig|null} [vulnerabilityScanningConfig] Repository vulnerabilityScanningConfig - * @property {boolean|null} [disallowUnspecifiedMode] Repository disallowUnspecifiedMode - * @property {boolean|null} [satisfiesPzi] Repository satisfiesPzi - * @property {string|null} [registryUri] Repository registryUri - */ - - /** - * Constructs a new Repository. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a Repository. - * @implements IRepository - * @constructor - * @param {google.devtools.artifactregistry.v1.IRepository=} [properties] Properties to set - */ - function Repository(properties) { - this.labels = {}; - this.cleanupPolicies = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Repository mavenConfig. - * @member {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig|null|undefined} mavenConfig - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.mavenConfig = null; - - /** - * Repository dockerConfig. - * @member {google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig|null|undefined} dockerConfig - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.dockerConfig = null; - - /** - * Repository virtualRepositoryConfig. - * @member {google.devtools.artifactregistry.v1.IVirtualRepositoryConfig|null|undefined} virtualRepositoryConfig - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.virtualRepositoryConfig = null; - - /** - * Repository remoteRepositoryConfig. - * @member {google.devtools.artifactregistry.v1.IRemoteRepositoryConfig|null|undefined} remoteRepositoryConfig - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.remoteRepositoryConfig = null; - - /** - * Repository name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.name = ""; - - /** - * Repository format. - * @member {google.devtools.artifactregistry.v1.Repository.Format} format - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.format = 0; - - /** - * Repository description. - * @member {string} description - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.description = ""; - - /** - * Repository labels. - * @member {Object.} labels - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.labels = $util.emptyObject; - - /** - * Repository createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.createTime = null; - - /** - * Repository updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.updateTime = null; - - /** - * Repository kmsKeyName. - * @member {string} kmsKeyName - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.kmsKeyName = ""; - - /** - * Repository mode. - * @member {google.devtools.artifactregistry.v1.Repository.Mode} mode - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.mode = 0; - - /** - * Repository cleanupPolicies. - * @member {Object.} cleanupPolicies - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.cleanupPolicies = $util.emptyObject; - - /** - * Repository sizeBytes. - * @member {number|Long} sizeBytes - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Repository satisfiesPzs. - * @member {boolean} satisfiesPzs - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.satisfiesPzs = false; - - /** - * Repository cleanupPolicyDryRun. - * @member {boolean} cleanupPolicyDryRun - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.cleanupPolicyDryRun = false; - - /** - * Repository vulnerabilityScanningConfig. - * @member {google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig|null|undefined} vulnerabilityScanningConfig - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.vulnerabilityScanningConfig = null; - - /** - * Repository disallowUnspecifiedMode. - * @member {boolean} disallowUnspecifiedMode - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.disallowUnspecifiedMode = false; - - /** - * Repository satisfiesPzi. - * @member {boolean} satisfiesPzi - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.satisfiesPzi = false; - - /** - * Repository registryUri. - * @member {string} registryUri - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.registryUri = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Repository formatConfig. - * @member {"mavenConfig"|"dockerConfig"|undefined} formatConfig - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Object.defineProperty(Repository.prototype, "formatConfig", { - get: $util.oneOfGetter($oneOfFields = ["mavenConfig", "dockerConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Repository modeConfig. - * @member {"virtualRepositoryConfig"|"remoteRepositoryConfig"|undefined} modeConfig - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Object.defineProperty(Repository.prototype, "modeConfig", { - get: $util.oneOfGetter($oneOfFields = ["virtualRepositoryConfig", "remoteRepositoryConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Repository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.Repository - * @static - * @param {google.devtools.artifactregistry.v1.IRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.Repository} Repository instance - */ - Repository.create = function create(properties) { - return new Repository(properties); - }; - - /** - * Encodes the specified Repository message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.Repository - * @static - * @param {google.devtools.artifactregistry.v1.IRepository} message Repository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Repository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.kmsKeyName); - if (message.mavenConfig != null && Object.hasOwnProperty.call(message, "mavenConfig")) - $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.encode(message.mavenConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.mode); - if (message.cleanupPolicies != null && Object.hasOwnProperty.call(message, "cleanupPolicies")) - for (var keys = Object.keys(message.cleanupPolicies), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.devtools.artifactregistry.v1.CleanupPolicy.encode(message.cleanupPolicies[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) - writer.uint32(/* id 13, wireType 0 =*/104).int64(message.sizeBytes); - if (message.virtualRepositoryConfig != null && Object.hasOwnProperty.call(message, "virtualRepositoryConfig")) - $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.encode(message.virtualRepositoryConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.remoteRepositoryConfig != null && Object.hasOwnProperty.call(message, "remoteRepositoryConfig")) - $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.encode(message.remoteRepositoryConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.satisfiesPzs); - if (message.dockerConfig != null && Object.hasOwnProperty.call(message, "dockerConfig")) - $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.encode(message.dockerConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.cleanupPolicyDryRun != null && Object.hasOwnProperty.call(message, "cleanupPolicyDryRun")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.cleanupPolicyDryRun); - if (message.vulnerabilityScanningConfig != null && Object.hasOwnProperty.call(message, "vulnerabilityScanningConfig")) - $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.encode(message.vulnerabilityScanningConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.disallowUnspecifiedMode != null && Object.hasOwnProperty.call(message, "disallowUnspecifiedMode")) - writer.uint32(/* id 21, wireType 0 =*/168).bool(message.disallowUnspecifiedMode); - if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) - writer.uint32(/* id 22, wireType 0 =*/176).bool(message.satisfiesPzi); - if (message.registryUri != null && Object.hasOwnProperty.call(message, "registryUri")) - writer.uint32(/* id 26, wireType 2 =*/210).string(message.registryUri); - return writer; - }; - - /** - * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.Repository - * @static - * @param {google.devtools.artifactregistry.v1.IRepository} message Repository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Repository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Repository message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.Repository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.Repository} Repository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Repository.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Repository(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 9: { - message.mavenConfig = $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.decode(reader, reader.uint32()); - break; - } - case 17: { - message.dockerConfig = $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.decode(reader, reader.uint32()); - break; - } - case 14: { - message.virtualRepositoryConfig = $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.decode(reader, reader.uint32()); - break; - } - case 15: { - message.remoteRepositoryConfig = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.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; - } - case 10: { - message.mode = reader.int32(); - break; - } - case 12: { - if (message.cleanupPolicies === $util.emptyObject) - message.cleanupPolicies = {}; - 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.devtools.artifactregistry.v1.CleanupPolicy.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.cleanupPolicies[key] = value; - break; - } - case 13: { - message.sizeBytes = reader.int64(); - break; - } - case 16: { - message.satisfiesPzs = reader.bool(); - break; - } - case 18: { - message.cleanupPolicyDryRun = reader.bool(); - break; - } - case 19: { - message.vulnerabilityScanningConfig = $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.decode(reader, reader.uint32()); - break; - } - case 21: { - message.disallowUnspecifiedMode = reader.bool(); - break; - } - case 22: { - message.satisfiesPzi = reader.bool(); - break; - } - case 26: { - message.registryUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Repository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.Repository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.Repository} Repository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Repository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Repository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.Repository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Repository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.mavenConfig != null && message.hasOwnProperty("mavenConfig")) { - properties.formatConfig = 1; - { - var error = $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify(message.mavenConfig); - if (error) - return "mavenConfig." + error; - } - } - if (message.dockerConfig != null && message.hasOwnProperty("dockerConfig")) { - if (properties.formatConfig === 1) - return "formatConfig: multiple values"; - properties.formatConfig = 1; - { - var error = $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.verify(message.dockerConfig); - if (error) - return "dockerConfig." + error; - } - } - if (message.virtualRepositoryConfig != null && message.hasOwnProperty("virtualRepositoryConfig")) { - properties.modeConfig = 1; - { - var error = $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.verify(message.virtualRepositoryConfig); - if (error) - return "virtualRepositoryConfig." + error; - } - } - if (message.remoteRepositoryConfig != null && message.hasOwnProperty("remoteRepositoryConfig")) { - if (properties.modeConfig === 1) - return "modeConfig: multiple values"; - properties.modeConfig = 1; - { - var error = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.verify(message.remoteRepositoryConfig); - if (error) - return "remoteRepositoryConfig." + 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: - case 9: - case 10: - case 11: - case 12: - 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"; - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.cleanupPolicies != null && message.hasOwnProperty("cleanupPolicies")) { - if (!$util.isObject(message.cleanupPolicies)) - return "cleanupPolicies: object expected"; - var key = Object.keys(message.cleanupPolicies); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.CleanupPolicy.verify(message.cleanupPolicies[key[i]]); - if (error) - return "cleanupPolicies." + error; - } - } - 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.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) - if (typeof message.satisfiesPzs !== "boolean") - return "satisfiesPzs: boolean expected"; - if (message.cleanupPolicyDryRun != null && message.hasOwnProperty("cleanupPolicyDryRun")) - if (typeof message.cleanupPolicyDryRun !== "boolean") - return "cleanupPolicyDryRun: boolean expected"; - if (message.vulnerabilityScanningConfig != null && message.hasOwnProperty("vulnerabilityScanningConfig")) { - var error = $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.verify(message.vulnerabilityScanningConfig); - if (error) - return "vulnerabilityScanningConfig." + error; - } - if (message.disallowUnspecifiedMode != null && message.hasOwnProperty("disallowUnspecifiedMode")) - if (typeof message.disallowUnspecifiedMode !== "boolean") - return "disallowUnspecifiedMode: boolean expected"; - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) - if (typeof message.satisfiesPzi !== "boolean") - return "satisfiesPzi: boolean expected"; - if (message.registryUri != null && message.hasOwnProperty("registryUri")) - if (!$util.isString(message.registryUri)) - return "registryUri: string expected"; - return null; - }; - - /** - * Creates a Repository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.Repository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.Repository} Repository - */ - Repository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.Repository) - return object; - var message = new $root.google.devtools.artifactregistry.v1.Repository(); - if (object.mavenConfig != null) { - if (typeof object.mavenConfig !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Repository.mavenConfig: object expected"); - message.mavenConfig = $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.fromObject(object.mavenConfig); - } - if (object.dockerConfig != null) { - if (typeof object.dockerConfig !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Repository.dockerConfig: object expected"); - message.dockerConfig = $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.fromObject(object.dockerConfig); - } - if (object.virtualRepositoryConfig != null) { - if (typeof object.virtualRepositoryConfig !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Repository.virtualRepositoryConfig: object expected"); - message.virtualRepositoryConfig = $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.fromObject(object.virtualRepositoryConfig); - } - if (object.remoteRepositoryConfig != null) { - if (typeof object.remoteRepositoryConfig !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Repository.remoteRepositoryConfig: object expected"); - message.remoteRepositoryConfig = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.fromObject(object.remoteRepositoryConfig); - } - if (object.name != null) - message.name = String(object.name); - switch (object.format) { - default: - if (typeof object.format === "number") { - message.format = object.format; - break; - } - break; - 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; - case "KFP": - case 9: - message.format = 9; - break; - case "GO": - case 10: - message.format = 10; - break; - case "GENERIC": - case 11: - message.format = 11; - break; - case "RUBY": - case 12: - message.format = 12; - break; - } - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Repository.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Repository.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Repository.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "STANDARD_REPOSITORY": - case 1: - message.mode = 1; - break; - case "VIRTUAL_REPOSITORY": - case 2: - message.mode = 2; - break; - case "REMOTE_REPOSITORY": - case 3: - message.mode = 3; - break; - } - if (object.cleanupPolicies) { - if (typeof object.cleanupPolicies !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Repository.cleanupPolicies: object expected"); - message.cleanupPolicies = {}; - for (var keys = Object.keys(object.cleanupPolicies), i = 0; i < keys.length; ++i) { - if (typeof object.cleanupPolicies[keys[i]] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Repository.cleanupPolicies: object expected"); - message.cleanupPolicies[keys[i]] = $root.google.devtools.artifactregistry.v1.CleanupPolicy.fromObject(object.cleanupPolicies[keys[i]]); - } - } - 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.satisfiesPzs != null) - message.satisfiesPzs = Boolean(object.satisfiesPzs); - if (object.cleanupPolicyDryRun != null) - message.cleanupPolicyDryRun = Boolean(object.cleanupPolicyDryRun); - if (object.vulnerabilityScanningConfig != null) { - if (typeof object.vulnerabilityScanningConfig !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Repository.vulnerabilityScanningConfig: object expected"); - message.vulnerabilityScanningConfig = $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.fromObject(object.vulnerabilityScanningConfig); - } - if (object.disallowUnspecifiedMode != null) - message.disallowUnspecifiedMode = Boolean(object.disallowUnspecifiedMode); - if (object.satisfiesPzi != null) - message.satisfiesPzi = Boolean(object.satisfiesPzi); - if (object.registryUri != null) - message.registryUri = String(object.registryUri); - return message; - }; - - /** - * Creates a plain object from a Repository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.Repository - * @static - * @param {google.devtools.artifactregistry.v1.Repository} message Repository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Repository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) { - object.labels = {}; - object.cleanupPolicies = {}; - } - if (options.defaults) { - object.name = ""; - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.kmsKeyName = ""; - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - 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.satisfiesPzs = false; - object.cleanupPolicyDryRun = false; - object.vulnerabilityScanningConfig = null; - object.disallowUnspecifiedMode = false; - object.satisfiesPzi = false; - object.registryUri = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.devtools.artifactregistry.v1.Repository.Format[message.format] === undefined ? message.format : $root.google.devtools.artifactregistry.v1.Repository.Format[message.format] : message.format; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - object.kmsKeyName = message.kmsKeyName; - if (message.mavenConfig != null && message.hasOwnProperty("mavenConfig")) { - object.mavenConfig = $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.toObject(message.mavenConfig, options); - if (options.oneofs) - object.formatConfig = "mavenConfig"; - } - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.devtools.artifactregistry.v1.Repository.Mode[message.mode] === undefined ? message.mode : $root.google.devtools.artifactregistry.v1.Repository.Mode[message.mode] : message.mode; - if (message.cleanupPolicies && (keys2 = Object.keys(message.cleanupPolicies)).length) { - object.cleanupPolicies = {}; - for (var j = 0; j < keys2.length; ++j) - object.cleanupPolicies[keys2[j]] = $root.google.devtools.artifactregistry.v1.CleanupPolicy.toObject(message.cleanupPolicies[keys2[j]], options); - } - 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.virtualRepositoryConfig != null && message.hasOwnProperty("virtualRepositoryConfig")) { - object.virtualRepositoryConfig = $root.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.toObject(message.virtualRepositoryConfig, options); - if (options.oneofs) - object.modeConfig = "virtualRepositoryConfig"; - } - if (message.remoteRepositoryConfig != null && message.hasOwnProperty("remoteRepositoryConfig")) { - object.remoteRepositoryConfig = $root.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.toObject(message.remoteRepositoryConfig, options); - if (options.oneofs) - object.modeConfig = "remoteRepositoryConfig"; - } - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) - object.satisfiesPzs = message.satisfiesPzs; - if (message.dockerConfig != null && message.hasOwnProperty("dockerConfig")) { - object.dockerConfig = $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.toObject(message.dockerConfig, options); - if (options.oneofs) - object.formatConfig = "dockerConfig"; - } - if (message.cleanupPolicyDryRun != null && message.hasOwnProperty("cleanupPolicyDryRun")) - object.cleanupPolicyDryRun = message.cleanupPolicyDryRun; - if (message.vulnerabilityScanningConfig != null && message.hasOwnProperty("vulnerabilityScanningConfig")) - object.vulnerabilityScanningConfig = $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.toObject(message.vulnerabilityScanningConfig, options); - if (message.disallowUnspecifiedMode != null && message.hasOwnProperty("disallowUnspecifiedMode")) - object.disallowUnspecifiedMode = message.disallowUnspecifiedMode; - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) - object.satisfiesPzi = message.satisfiesPzi; - if (message.registryUri != null && message.hasOwnProperty("registryUri")) - object.registryUri = message.registryUri; - return object; - }; - - /** - * Converts this Repository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - * @returns {Object.} JSON object - */ - Repository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Repository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.Repository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Repository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Repository"; - }; - - Repository.MavenRepositoryConfig = (function() { - - /** - * Properties of a MavenRepositoryConfig. - * @memberof google.devtools.artifactregistry.v1.Repository - * @interface IMavenRepositoryConfig - * @property {boolean|null} [allowSnapshotOverwrites] MavenRepositoryConfig allowSnapshotOverwrites - * @property {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy|null} [versionPolicy] MavenRepositoryConfig versionPolicy - */ - - /** - * Constructs a new MavenRepositoryConfig. - * @memberof google.devtools.artifactregistry.v1.Repository - * @classdesc Represents a MavenRepositoryConfig. - * @implements IMavenRepositoryConfig - * @constructor - * @param {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig=} [properties] Properties to set - */ - function MavenRepositoryConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MavenRepositoryConfig allowSnapshotOverwrites. - * @member {boolean} allowSnapshotOverwrites - * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - * @instance - */ - MavenRepositoryConfig.prototype.allowSnapshotOverwrites = false; - - /** - * MavenRepositoryConfig versionPolicy. - * @member {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy} versionPolicy - * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - * @instance - */ - MavenRepositoryConfig.prototype.versionPolicy = 0; - - /** - * Creates a new MavenRepositoryConfig instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} MavenRepositoryConfig instance - */ - MavenRepositoryConfig.create = function create(properties) { - return new MavenRepositoryConfig(properties); - }; - - /** - * Encodes the specified MavenRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig} message MavenRepositoryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MavenRepositoryConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowSnapshotOverwrites != null && Object.hasOwnProperty.call(message, "allowSnapshotOverwrites")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowSnapshotOverwrites); - if (message.versionPolicy != null && Object.hasOwnProperty.call(message, "versionPolicy")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.versionPolicy); - return writer; - }; - - /** - * Encodes the specified MavenRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig} message MavenRepositoryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MavenRepositoryConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MavenRepositoryConfig message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} MavenRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MavenRepositoryConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.allowSnapshotOverwrites = reader.bool(); - break; - } - case 2: { - message.versionPolicy = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MavenRepositoryConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} MavenRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MavenRepositoryConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MavenRepositoryConfig message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MavenRepositoryConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowSnapshotOverwrites != null && message.hasOwnProperty("allowSnapshotOverwrites")) - if (typeof message.allowSnapshotOverwrites !== "boolean") - return "allowSnapshotOverwrites: boolean expected"; - if (message.versionPolicy != null && message.hasOwnProperty("versionPolicy")) - switch (message.versionPolicy) { - default: - return "versionPolicy: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a MavenRepositoryConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} MavenRepositoryConfig - */ - MavenRepositoryConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) - return object; - var message = new $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig(); - if (object.allowSnapshotOverwrites != null) - message.allowSnapshotOverwrites = Boolean(object.allowSnapshotOverwrites); - switch (object.versionPolicy) { - default: - if (typeof object.versionPolicy === "number") { - message.versionPolicy = object.versionPolicy; - break; - } - break; - case "VERSION_POLICY_UNSPECIFIED": - case 0: - message.versionPolicy = 0; - break; - case "RELEASE": - case 1: - message.versionPolicy = 1; - break; - case "SNAPSHOT": - case 2: - message.versionPolicy = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a MavenRepositoryConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} message MavenRepositoryConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MavenRepositoryConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.allowSnapshotOverwrites = false; - object.versionPolicy = options.enums === String ? "VERSION_POLICY_UNSPECIFIED" : 0; - } - if (message.allowSnapshotOverwrites != null && message.hasOwnProperty("allowSnapshotOverwrites")) - object.allowSnapshotOverwrites = message.allowSnapshotOverwrites; - if (message.versionPolicy != null && message.hasOwnProperty("versionPolicy")) - object.versionPolicy = options.enums === String ? $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy[message.versionPolicy] === undefined ? message.versionPolicy : $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy[message.versionPolicy] : message.versionPolicy; - return object; - }; - - /** - * Converts this MavenRepositoryConfig to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - * @instance - * @returns {Object.} JSON object - */ - MavenRepositoryConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MavenRepositoryConfig - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MavenRepositoryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig"; - }; - - /** - * VersionPolicy enum. - * @name google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy - * @enum {number} - * @property {number} VERSION_POLICY_UNSPECIFIED=0 VERSION_POLICY_UNSPECIFIED value - * @property {number} RELEASE=1 RELEASE value - * @property {number} SNAPSHOT=2 SNAPSHOT value - */ - MavenRepositoryConfig.VersionPolicy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VERSION_POLICY_UNSPECIFIED"] = 0; - values[valuesById[1] = "RELEASE"] = 1; - values[valuesById[2] = "SNAPSHOT"] = 2; - return values; - })(); - - return MavenRepositoryConfig; - })(); - - Repository.DockerRepositoryConfig = (function() { - - /** - * Properties of a DockerRepositoryConfig. - * @memberof google.devtools.artifactregistry.v1.Repository - * @interface IDockerRepositoryConfig - * @property {boolean|null} [immutableTags] DockerRepositoryConfig immutableTags - */ - - /** - * Constructs a new DockerRepositoryConfig. - * @memberof google.devtools.artifactregistry.v1.Repository - * @classdesc Represents a DockerRepositoryConfig. - * @implements IDockerRepositoryConfig - * @constructor - * @param {google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig=} [properties] Properties to set - */ - function DockerRepositoryConfig(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]]; - } - - /** - * DockerRepositoryConfig immutableTags. - * @member {boolean} immutableTags - * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig - * @instance - */ - DockerRepositoryConfig.prototype.immutableTags = false; - - /** - * Creates a new DockerRepositoryConfig instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig} DockerRepositoryConfig instance - */ - DockerRepositoryConfig.create = function create(properties) { - return new DockerRepositoryConfig(properties); - }; - - /** - * Encodes the specified DockerRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig} message DockerRepositoryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DockerRepositoryConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.immutableTags != null && Object.hasOwnProperty.call(message, "immutableTags")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.immutableTags); - return writer; - }; - - /** - * Encodes the specified DockerRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.Repository.IDockerRepositoryConfig} message DockerRepositoryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DockerRepositoryConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DockerRepositoryConfig message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig} DockerRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DockerRepositoryConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.immutableTags = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DockerRepositoryConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig} DockerRepositoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DockerRepositoryConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DockerRepositoryConfig message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DockerRepositoryConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.immutableTags != null && message.hasOwnProperty("immutableTags")) - if (typeof message.immutableTags !== "boolean") - return "immutableTags: boolean expected"; - return null; - }; - - /** - * Creates a DockerRepositoryConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig} DockerRepositoryConfig - */ - DockerRepositoryConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) - return object; - var message = new $root.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig(); - if (object.immutableTags != null) - message.immutableTags = Boolean(object.immutableTags); - return message; - }; - - /** - * Creates a plain object from a DockerRepositoryConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig - * @static - * @param {google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig} message DockerRepositoryConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DockerRepositoryConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.immutableTags = false; - if (message.immutableTags != null && message.hasOwnProperty("immutableTags")) - object.immutableTags = message.immutableTags; - return object; - }; - - /** - * Converts this DockerRepositoryConfig to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig - * @instance - * @returns {Object.} JSON object - */ - DockerRepositoryConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DockerRepositoryConfig - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DockerRepositoryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig"; - }; - - return DockerRepositoryConfig; - })(); - - Repository.VulnerabilityScanningConfig = (function() { - - /** - * Properties of a VulnerabilityScanningConfig. - * @memberof google.devtools.artifactregistry.v1.Repository - * @interface IVulnerabilityScanningConfig - * @property {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig|null} [enablementConfig] VulnerabilityScanningConfig enablementConfig - * @property {google.protobuf.ITimestamp|null} [lastEnableTime] VulnerabilityScanningConfig lastEnableTime - * @property {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState|null} [enablementState] VulnerabilityScanningConfig enablementState - * @property {string|null} [enablementStateReason] VulnerabilityScanningConfig enablementStateReason - */ - - /** - * Constructs a new VulnerabilityScanningConfig. - * @memberof google.devtools.artifactregistry.v1.Repository - * @classdesc Represents a VulnerabilityScanningConfig. - * @implements IVulnerabilityScanningConfig - * @constructor - * @param {google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig=} [properties] Properties to set - */ - function VulnerabilityScanningConfig(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]]; - } - - /** - * VulnerabilityScanningConfig enablementConfig. - * @member {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig} enablementConfig - * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig - * @instance - */ - VulnerabilityScanningConfig.prototype.enablementConfig = 0; - - /** - * VulnerabilityScanningConfig lastEnableTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastEnableTime - * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig - * @instance - */ - VulnerabilityScanningConfig.prototype.lastEnableTime = null; - - /** - * VulnerabilityScanningConfig enablementState. - * @member {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState} enablementState - * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig - * @instance - */ - VulnerabilityScanningConfig.prototype.enablementState = 0; - - /** - * VulnerabilityScanningConfig enablementStateReason. - * @member {string} enablementStateReason - * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig - * @instance - */ - VulnerabilityScanningConfig.prototype.enablementStateReason = ""; - - /** - * Creates a new VulnerabilityScanningConfig instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig - * @static - * @param {google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig} VulnerabilityScanningConfig instance - */ - VulnerabilityScanningConfig.create = function create(properties) { - return new VulnerabilityScanningConfig(properties); - }; - - /** - * Encodes the specified VulnerabilityScanningConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig - * @static - * @param {google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig} message VulnerabilityScanningConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VulnerabilityScanningConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enablementConfig != null && Object.hasOwnProperty.call(message, "enablementConfig")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.enablementConfig); - if (message.lastEnableTime != null && Object.hasOwnProperty.call(message, "lastEnableTime")) - $root.google.protobuf.Timestamp.encode(message.lastEnableTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.enablementState); - if (message.enablementStateReason != null && Object.hasOwnProperty.call(message, "enablementStateReason")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.enablementStateReason); - return writer; - }; - - /** - * Encodes the specified VulnerabilityScanningConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig - * @static - * @param {google.devtools.artifactregistry.v1.Repository.IVulnerabilityScanningConfig} message VulnerabilityScanningConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VulnerabilityScanningConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VulnerabilityScanningConfig message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig} VulnerabilityScanningConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VulnerabilityScanningConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.enablementConfig = reader.int32(); - break; - } - case 2: { - message.lastEnableTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.enablementState = reader.int32(); - break; - } - case 4: { - message.enablementStateReason = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VulnerabilityScanningConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig} VulnerabilityScanningConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VulnerabilityScanningConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VulnerabilityScanningConfig message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VulnerabilityScanningConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enablementConfig != null && message.hasOwnProperty("enablementConfig")) - switch (message.enablementConfig) { - default: - return "enablementConfig: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lastEnableTime != null && message.hasOwnProperty("lastEnableTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastEnableTime); - if (error) - return "lastEnableTime." + error; - } - if (message.enablementState != null && message.hasOwnProperty("enablementState")) - switch (message.enablementState) { - default: - return "enablementState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enablementStateReason != null && message.hasOwnProperty("enablementStateReason")) - if (!$util.isString(message.enablementStateReason)) - return "enablementStateReason: string expected"; - return null; - }; - - /** - * Creates a VulnerabilityScanningConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig} VulnerabilityScanningConfig - */ - VulnerabilityScanningConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig) - return object; - var message = new $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig(); - switch (object.enablementConfig) { - default: - if (typeof object.enablementConfig === "number") { - message.enablementConfig = object.enablementConfig; - break; - } - break; - case "ENABLEMENT_CONFIG_UNSPECIFIED": - case 0: - message.enablementConfig = 0; - break; - case "INHERITED": - case 1: - message.enablementConfig = 1; - break; - case "DISABLED": - case 2: - message.enablementConfig = 2; - break; - } - if (object.lastEnableTime != null) { - if (typeof object.lastEnableTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.lastEnableTime: object expected"); - message.lastEnableTime = $root.google.protobuf.Timestamp.fromObject(object.lastEnableTime); - } - switch (object.enablementState) { - default: - if (typeof object.enablementState === "number") { - message.enablementState = object.enablementState; - break; - } - break; - case "ENABLEMENT_STATE_UNSPECIFIED": - case 0: - message.enablementState = 0; - break; - case "SCANNING_UNSUPPORTED": - case 1: - message.enablementState = 1; - break; - case "SCANNING_DISABLED": - case 2: - message.enablementState = 2; - break; - case "SCANNING_ACTIVE": - case 3: - message.enablementState = 3; - break; - } - if (object.enablementStateReason != null) - message.enablementStateReason = String(object.enablementStateReason); - return message; - }; - - /** - * Creates a plain object from a VulnerabilityScanningConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig - * @static - * @param {google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig} message VulnerabilityScanningConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VulnerabilityScanningConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enablementConfig = options.enums === String ? "ENABLEMENT_CONFIG_UNSPECIFIED" : 0; - object.lastEnableTime = null; - object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; - object.enablementStateReason = ""; - } - if (message.enablementConfig != null && message.hasOwnProperty("enablementConfig")) - object.enablementConfig = options.enums === String ? $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig[message.enablementConfig] === undefined ? message.enablementConfig : $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig[message.enablementConfig] : message.enablementConfig; - if (message.lastEnableTime != null && message.hasOwnProperty("lastEnableTime")) - object.lastEnableTime = $root.google.protobuf.Timestamp.toObject(message.lastEnableTime, options); - if (message.enablementState != null && message.hasOwnProperty("enablementState")) - object.enablementState = options.enums === String ? $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState[message.enablementState] : message.enablementState; - if (message.enablementStateReason != null && message.hasOwnProperty("enablementStateReason")) - object.enablementStateReason = message.enablementStateReason; - return object; - }; - - /** - * Converts this VulnerabilityScanningConfig to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig - * @instance - * @returns {Object.} JSON object - */ - VulnerabilityScanningConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VulnerabilityScanningConfig - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VulnerabilityScanningConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig"; - }; - - /** - * EnablementConfig enum. - * @name google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig - * @enum {number} - * @property {number} ENABLEMENT_CONFIG_UNSPECIFIED=0 ENABLEMENT_CONFIG_UNSPECIFIED value - * @property {number} INHERITED=1 INHERITED value - * @property {number} DISABLED=2 DISABLED value - */ - VulnerabilityScanningConfig.EnablementConfig = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENABLEMENT_CONFIG_UNSPECIFIED"] = 0; - values[valuesById[1] = "INHERITED"] = 1; - values[valuesById[2] = "DISABLED"] = 2; - return values; - })(); - - /** - * EnablementState enum. - * @name google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState - * @enum {number} - * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value - * @property {number} SCANNING_UNSUPPORTED=1 SCANNING_UNSUPPORTED value - * @property {number} SCANNING_DISABLED=2 SCANNING_DISABLED value - * @property {number} SCANNING_ACTIVE=3 SCANNING_ACTIVE value - */ - VulnerabilityScanningConfig.EnablementState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCANNING_UNSUPPORTED"] = 1; - values[valuesById[2] = "SCANNING_DISABLED"] = 2; - values[valuesById[3] = "SCANNING_ACTIVE"] = 3; - return values; - })(); - - return VulnerabilityScanningConfig; - })(); - - /** - * Format enum. - * @name google.devtools.artifactregistry.v1.Repository.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} DOCKER=1 DOCKER value - * @property {number} MAVEN=2 MAVEN value - * @property {number} NPM=3 NPM value - * @property {number} APT=5 APT value - * @property {number} YUM=6 YUM value - * @property {number} PYTHON=8 PYTHON value - * @property {number} KFP=9 KFP value - * @property {number} GO=10 GO value - * @property {number} GENERIC=11 GENERIC value - * @property {number} RUBY=12 RUBY value - */ - Repository.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "DOCKER"] = 1; - values[valuesById[2] = "MAVEN"] = 2; - values[valuesById[3] = "NPM"] = 3; - values[valuesById[5] = "APT"] = 5; - values[valuesById[6] = "YUM"] = 6; - values[valuesById[8] = "PYTHON"] = 8; - values[valuesById[9] = "KFP"] = 9; - values[valuesById[10] = "GO"] = 10; - values[valuesById[11] = "GENERIC"] = 11; - values[valuesById[12] = "RUBY"] = 12; - return values; - })(); - - /** - * Mode enum. - * @name google.devtools.artifactregistry.v1.Repository.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} STANDARD_REPOSITORY=1 STANDARD_REPOSITORY value - * @property {number} VIRTUAL_REPOSITORY=2 VIRTUAL_REPOSITORY value - * @property {number} REMOTE_REPOSITORY=3 REMOTE_REPOSITORY value - */ - Repository.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STANDARD_REPOSITORY"] = 1; - values[valuesById[2] = "VIRTUAL_REPOSITORY"] = 2; - values[valuesById[3] = "REMOTE_REPOSITORY"] = 3; - return values; - })(); - - return Repository; - })(); - - v1.ListRepositoriesRequest = (function() { - - /** - * Properties of a ListRepositoriesRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListRepositoriesRequest - * @property {string|null} [parent] ListRepositoriesRequest parent - * @property {number|null} [pageSize] ListRepositoriesRequest pageSize - * @property {string|null} [pageToken] ListRepositoriesRequest pageToken - * @property {string|null} [filter] ListRepositoriesRequest filter - * @property {string|null} [orderBy] ListRepositoriesRequest orderBy - */ - - /** - * Constructs a new ListRepositoriesRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListRepositoriesRequest. - * @implements IListRepositoriesRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest=} [properties] Properties to set - */ - function ListRepositoriesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListRepositoriesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @instance - */ - ListRepositoriesRequest.prototype.parent = ""; - - /** - * ListRepositoriesRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @instance - */ - ListRepositoriesRequest.prototype.pageSize = 0; - - /** - * ListRepositoriesRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @instance - */ - ListRepositoriesRequest.prototype.pageToken = ""; - - /** - * ListRepositoriesRequest filter. - * @member {string} filter - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @instance - */ - ListRepositoriesRequest.prototype.filter = ""; - - /** - * ListRepositoriesRequest orderBy. - * @member {string} orderBy - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @instance - */ - ListRepositoriesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListRepositoriesRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest instance - */ - ListRepositoriesRequest.create = function create(properties) { - return new ListRepositoriesRequest(properties); - }; - - /** - * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRepositoriesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRepositoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListRepositoriesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRepositoriesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListRepositoriesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRepositoriesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListRepositoriesRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListRepositoriesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest - */ - ListRepositoriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListRepositoriesRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListRepositoriesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @static - * @param {google.devtools.artifactregistry.v1.ListRepositoriesRequest} message ListRepositoriesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListRepositoriesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListRepositoriesRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @instance - * @returns {Object.} JSON object - */ - ListRepositoriesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListRepositoriesRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListRepositoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListRepositoriesRequest"; - }; - - return ListRepositoriesRequest; - })(); - - v1.ListRepositoriesResponse = (function() { - - /** - * Properties of a ListRepositoriesResponse. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListRepositoriesResponse - * @property {Array.|null} [repositories] ListRepositoriesResponse repositories - * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken - */ - - /** - * Constructs a new ListRepositoriesResponse. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListRepositoriesResponse. - * @implements IListRepositoriesResponse - * @constructor - * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse=} [properties] Properties to set - */ - function ListRepositoriesResponse(properties) { - this.repositories = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListRepositoriesResponse repositories. - * @member {Array.} repositories - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse - * @instance - */ - ListRepositoriesResponse.prototype.repositories = $util.emptyArray; - - /** - * ListRepositoriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse - * @instance - */ - ListRepositoriesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListRepositoriesResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse instance - */ - ListRepositoriesResponse.create = function create(properties) { - return new ListRepositoriesResponse(properties); - }; - - /** - * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRepositoriesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.repositories != null && message.repositories.length) - for (var i = 0; i < message.repositories.length; ++i) - $root.google.devtools.artifactregistry.v1.Repository.encode(message.repositories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRepositoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListRepositoriesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRepositoriesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListRepositoriesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.repositories && message.repositories.length)) - message.repositories = []; - message.repositories.push($root.google.devtools.artifactregistry.v1.Repository.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRepositoriesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListRepositoriesResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListRepositoriesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.repositories != null && message.hasOwnProperty("repositories")) { - if (!Array.isArray(message.repositories)) - return "repositories: array expected"; - for (var i = 0; i < message.repositories.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.Repository.verify(message.repositories[i]); - if (error) - return "repositories." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse - */ - ListRepositoriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListRepositoriesResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListRepositoriesResponse(); - if (object.repositories) { - if (!Array.isArray(object.repositories)) - throw TypeError(".google.devtools.artifactregistry.v1.ListRepositoriesResponse.repositories: array expected"); - message.repositories = []; - for (var i = 0; i < object.repositories.length; ++i) { - if (typeof object.repositories[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ListRepositoriesResponse.repositories: object expected"); - message.repositories[i] = $root.google.devtools.artifactregistry.v1.Repository.fromObject(object.repositories[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse - * @static - * @param {google.devtools.artifactregistry.v1.ListRepositoriesResponse} message ListRepositoriesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListRepositoriesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.repositories = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.repositories && message.repositories.length) { - object.repositories = []; - for (var j = 0; j < message.repositories.length; ++j) - object.repositories[j] = $root.google.devtools.artifactregistry.v1.Repository.toObject(message.repositories[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListRepositoriesResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse - * @instance - * @returns {Object.} JSON object - */ - ListRepositoriesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListRepositoriesResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListRepositoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListRepositoriesResponse"; - }; - - return ListRepositoriesResponse; - })(); - - v1.GetRepositoryRequest = (function() { - - /** - * Properties of a GetRepositoryRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGetRepositoryRequest - * @property {string|null} [name] GetRepositoryRequest name - */ - - /** - * Constructs a new GetRepositoryRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GetRepositoryRequest. - * @implements IGetRepositoryRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest=} [properties] Properties to set - */ - function GetRepositoryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetRepositoryRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest - * @instance - */ - GetRepositoryRequest.prototype.name = ""; - - /** - * Creates a new GetRepositoryRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest instance - */ - GetRepositoryRequest.create = function create(properties) { - return new GetRepositoryRequest(properties); - }; - - /** - * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetRepositoryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetRepositoryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetRepositoryRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetRepositoryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetRepositoryRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetRepositoryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest - */ - GetRepositoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GetRepositoryRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GetRepositoryRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.GetRepositoryRequest} message GetRepositoryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetRepositoryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetRepositoryRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest - * @instance - * @returns {Object.} JSON object - */ - GetRepositoryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetRepositoryRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetRepositoryRequest"; - }; - - return GetRepositoryRequest; - })(); - - v1.CreateRepositoryRequest = (function() { - - /** - * Properties of a CreateRepositoryRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface ICreateRepositoryRequest - * @property {string|null} [parent] CreateRepositoryRequest parent - * @property {string|null} [repositoryId] CreateRepositoryRequest repositoryId - * @property {google.devtools.artifactregistry.v1.IRepository|null} [repository] CreateRepositoryRequest repository - */ - - /** - * Constructs a new CreateRepositoryRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a CreateRepositoryRequest. - * @implements ICreateRepositoryRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest=} [properties] Properties to set - */ - function CreateRepositoryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateRepositoryRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest - * @instance - */ - CreateRepositoryRequest.prototype.parent = ""; - - /** - * CreateRepositoryRequest repositoryId. - * @member {string} repositoryId - * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest - * @instance - */ - CreateRepositoryRequest.prototype.repositoryId = ""; - - /** - * CreateRepositoryRequest repository. - * @member {google.devtools.artifactregistry.v1.IRepository|null|undefined} repository - * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest - * @instance - */ - CreateRepositoryRequest.prototype.repository = null; - - /** - * Creates a new CreateRepositoryRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.CreateRepositoryRequest} CreateRepositoryRequest instance - */ - CreateRepositoryRequest.create = function create(properties) { - return new CreateRepositoryRequest(properties); - }; - - /** - * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRepositoryRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateRepositoryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.repositoryId != null && Object.hasOwnProperty.call(message, "repositoryId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.repositoryId); - if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) - $root.google.devtools.artifactregistry.v1.Repository.encode(message.repository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRepositoryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateRepositoryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.CreateRepositoryRequest} CreateRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateRepositoryRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.CreateRepositoryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.repositoryId = reader.string(); - break; - } - case 3: { - message.repository = $root.google.devtools.artifactregistry.v1.Repository.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.CreateRepositoryRequest} CreateRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateRepositoryRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateRepositoryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) - if (!$util.isString(message.repositoryId)) - return "repositoryId: string expected"; - if (message.repository != null && message.hasOwnProperty("repository")) { - var error = $root.google.devtools.artifactregistry.v1.Repository.verify(message.repository); - if (error) - return "repository." + error; - } - return null; - }; - - /** - * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.CreateRepositoryRequest} CreateRepositoryRequest - */ - CreateRepositoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.CreateRepositoryRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.CreateRepositoryRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.repositoryId != null) - message.repositoryId = String(object.repositoryId); - if (object.repository != null) { - if (typeof object.repository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.CreateRepositoryRequest.repository: object expected"); - message.repository = $root.google.devtools.artifactregistry.v1.Repository.fromObject(object.repository); - } - return message; - }; - - /** - * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.CreateRepositoryRequest} message CreateRepositoryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateRepositoryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.repositoryId = ""; - object.repository = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) - object.repositoryId = message.repositoryId; - if (message.repository != null && message.hasOwnProperty("repository")) - object.repository = $root.google.devtools.artifactregistry.v1.Repository.toObject(message.repository, options); - return object; - }; - - /** - * Converts this CreateRepositoryRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest - * @instance - * @returns {Object.} JSON object - */ - CreateRepositoryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateRepositoryRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.CreateRepositoryRequest"; - }; - - return CreateRepositoryRequest; - })(); - - v1.UpdateRepositoryRequest = (function() { - - /** - * Properties of an UpdateRepositoryRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IUpdateRepositoryRequest - * @property {google.devtools.artifactregistry.v1.IRepository|null} [repository] UpdateRepositoryRequest repository - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateRepositoryRequest updateMask - */ - - /** - * Constructs a new UpdateRepositoryRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an UpdateRepositoryRequest. - * @implements IUpdateRepositoryRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest=} [properties] Properties to set - */ - function UpdateRepositoryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateRepositoryRequest repository. - * @member {google.devtools.artifactregistry.v1.IRepository|null|undefined} repository - * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest - * @instance - */ - UpdateRepositoryRequest.prototype.repository = null; - - /** - * UpdateRepositoryRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest - * @instance - */ - UpdateRepositoryRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateRepositoryRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} UpdateRepositoryRequest instance - */ - UpdateRepositoryRequest.create = function create(properties) { - return new UpdateRepositoryRequest(properties); - }; - - /** - * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRepositoryRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateRepositoryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) - $root.google.devtools.artifactregistry.v1.Repository.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRepositoryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} UpdateRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateRepositoryRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdateRepositoryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.repository = $root.google.devtools.artifactregistry.v1.Repository.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} UpdateRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateRepositoryRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateRepositoryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.repository != null && message.hasOwnProperty("repository")) { - var error = $root.google.devtools.artifactregistry.v1.Repository.verify(message.repository); - if (error) - return "repository." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} UpdateRepositoryRequest - */ - UpdateRepositoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateRepositoryRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.UpdateRepositoryRequest(); - if (object.repository != null) { - if (typeof object.repository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdateRepositoryRequest.repository: object expected"); - message.repository = $root.google.devtools.artifactregistry.v1.Repository.fromObject(object.repository); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdateRepositoryRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} message UpdateRepositoryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateRepositoryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.repository = null; - object.updateMask = null; - } - if (message.repository != null && message.hasOwnProperty("repository")) - object.repository = $root.google.devtools.artifactregistry.v1.Repository.toObject(message.repository, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateRepositoryRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateRepositoryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateRepositoryRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdateRepositoryRequest"; - }; - - return UpdateRepositoryRequest; - })(); - - v1.DeleteRepositoryRequest = (function() { - - /** - * Properties of a DeleteRepositoryRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IDeleteRepositoryRequest - * @property {string|null} [name] DeleteRepositoryRequest name - */ - - /** - * Constructs a new DeleteRepositoryRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a DeleteRepositoryRequest. - * @implements IDeleteRepositoryRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest=} [properties] Properties to set - */ - function DeleteRepositoryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteRepositoryRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest - * @instance - */ - DeleteRepositoryRequest.prototype.name = ""; - - /** - * Creates a new DeleteRepositoryRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} DeleteRepositoryRequest instance - */ - DeleteRepositoryRequest.create = function create(properties) { - return new DeleteRepositoryRequest(properties); - }; - - /** - * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRepositoryRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteRepositoryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRepositoryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} DeleteRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteRepositoryRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DeleteRepositoryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} DeleteRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteRepositoryRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteRepositoryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} DeleteRepositoryRequest - */ - DeleteRepositoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteRepositoryRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.DeleteRepositoryRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} message DeleteRepositoryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteRepositoryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteRepositoryRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteRepositoryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteRepositoryRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DeleteRepositoryRequest"; - }; - - return DeleteRepositoryRequest; - })(); - - v1.Rule = (function() { - - /** - * Properties of a Rule. - * @memberof google.devtools.artifactregistry.v1 - * @interface IRule - * @property {string|null} [name] Rule name - * @property {google.devtools.artifactregistry.v1.Rule.Action|null} [action] Rule action - * @property {google.devtools.artifactregistry.v1.Rule.Operation|null} [operation] Rule operation - * @property {google.type.IExpr|null} [condition] Rule condition - * @property {string|null} [packageId] Rule packageId - */ - - /** - * Constructs a new Rule. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a Rule. - * @implements IRule - * @constructor - * @param {google.devtools.artifactregistry.v1.IRule=} [properties] Properties to set - */ - function Rule(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]]; - } - - /** - * Rule name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.Rule - * @instance - */ - Rule.prototype.name = ""; - - /** - * Rule action. - * @member {google.devtools.artifactregistry.v1.Rule.Action} action - * @memberof google.devtools.artifactregistry.v1.Rule - * @instance - */ - Rule.prototype.action = 0; - - /** - * Rule operation. - * @member {google.devtools.artifactregistry.v1.Rule.Operation} operation - * @memberof google.devtools.artifactregistry.v1.Rule - * @instance - */ - Rule.prototype.operation = 0; - - /** - * Rule condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.devtools.artifactregistry.v1.Rule - * @instance - */ - Rule.prototype.condition = null; - - /** - * Rule packageId. - * @member {string} packageId - * @memberof google.devtools.artifactregistry.v1.Rule - * @instance - */ - Rule.prototype.packageId = ""; - - /** - * Creates a new Rule instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.Rule - * @static - * @param {google.devtools.artifactregistry.v1.IRule=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.Rule} Rule instance - */ - Rule.create = function create(properties) { - return new Rule(properties); - }; - - /** - * Encodes the specified Rule message. Does not implicitly {@link google.devtools.artifactregistry.v1.Rule.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.Rule - * @static - * @param {google.devtools.artifactregistry.v1.IRule} message Rule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Rule.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.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.action); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.operation); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.packageId != null && Object.hasOwnProperty.call(message, "packageId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.packageId); - return writer; - }; - - /** - * Encodes the specified Rule message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Rule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.Rule - * @static - * @param {google.devtools.artifactregistry.v1.IRule} message Rule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Rule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Rule message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.Rule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.Rule} Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Rule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.Rule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.action = reader.int32(); - break; - } - case 3: { - message.operation = reader.int32(); - break; - } - case 4: { - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - case 5: { - message.packageId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Rule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.Rule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.Rule} Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Rule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Rule message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.Rule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Rule.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.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.operation != null && message.hasOwnProperty("operation")) - switch (message.operation) { - default: - return "operation: enum value expected"; - case 0: - case 1: - break; - } - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; - } - if (message.packageId != null && message.hasOwnProperty("packageId")) - if (!$util.isString(message.packageId)) - return "packageId: string expected"; - return null; - }; - - /** - * Creates a Rule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.Rule - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.Rule} Rule - */ - Rule.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.Rule) - return object; - var message = new $root.google.devtools.artifactregistry.v1.Rule(); - if (object.name != null) - message.name = String(object.name); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ALLOW": - case 1: - message.action = 1; - break; - case "DENY": - case 2: - message.action = 2; - break; - } - switch (object.operation) { - default: - if (typeof object.operation === "number") { - message.operation = object.operation; - break; - } - break; - case "OPERATION_UNSPECIFIED": - case 0: - message.operation = 0; - break; - case "DOWNLOAD": - case 1: - message.operation = 1; - break; - } - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Rule.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); - } - if (object.packageId != null) - message.packageId = String(object.packageId); - return message; - }; - - /** - * Creates a plain object from a Rule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.Rule - * @static - * @param {google.devtools.artifactregistry.v1.Rule} message Rule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Rule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; - object.condition = null; - object.packageId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.devtools.artifactregistry.v1.Rule.Action[message.action] === undefined ? message.action : $root.google.devtools.artifactregistry.v1.Rule.Action[message.action] : message.action; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = options.enums === String ? $root.google.devtools.artifactregistry.v1.Rule.Operation[message.operation] === undefined ? message.operation : $root.google.devtools.artifactregistry.v1.Rule.Operation[message.operation] : message.operation; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); - if (message.packageId != null && message.hasOwnProperty("packageId")) - object.packageId = message.packageId; - return object; - }; - - /** - * Converts this Rule to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.Rule - * @instance - * @returns {Object.} JSON object - */ - Rule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Rule - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.Rule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Rule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.Rule"; - }; - - /** - * Action enum. - * @name google.devtools.artifactregistry.v1.Rule.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ALLOW=1 ALLOW value - * @property {number} DENY=2 DENY value - */ - Rule.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "DENY"] = 2; - return values; - })(); - - /** - * Operation enum. - * @name google.devtools.artifactregistry.v1.Rule.Operation - * @enum {number} - * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value - * @property {number} DOWNLOAD=1 DOWNLOAD value - */ - Rule.Operation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "DOWNLOAD"] = 1; - return values; - })(); - - return Rule; - })(); - - v1.ListRulesRequest = (function() { - - /** - * Properties of a ListRulesRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListRulesRequest - * @property {string|null} [parent] ListRulesRequest parent - * @property {number|null} [pageSize] ListRulesRequest pageSize - * @property {string|null} [pageToken] ListRulesRequest pageToken - */ - - /** - * Constructs a new ListRulesRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListRulesRequest. - * @implements IListRulesRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IListRulesRequest=} [properties] Properties to set - */ - function ListRulesRequest(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]]; - } - - /** - * ListRulesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ListRulesRequest - * @instance - */ - ListRulesRequest.prototype.parent = ""; - - /** - * ListRulesRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1.ListRulesRequest - * @instance - */ - ListRulesRequest.prototype.pageSize = 0; - - /** - * ListRulesRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1.ListRulesRequest - * @instance - */ - ListRulesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListRulesRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListRulesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListRulesRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListRulesRequest} ListRulesRequest instance - */ - ListRulesRequest.create = function create(properties) { - return new ListRulesRequest(properties); - }; - - /** - * Encodes the specified ListRulesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListRulesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListRulesRequest} message ListRulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRulesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListRulesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListRulesRequest - * @static - * @param {google.devtools.artifactregistry.v1.IListRulesRequest} message ListRulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListRulesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListRulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListRulesRequest} ListRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRulesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListRulesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListRulesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListRulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListRulesRequest} ListRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRulesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListRulesRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListRulesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListRulesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListRulesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListRulesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListRulesRequest} ListRulesRequest - */ - ListRulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListRulesRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListRulesRequest(); - 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 ListRulesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListRulesRequest - * @static - * @param {google.devtools.artifactregistry.v1.ListRulesRequest} message ListRulesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListRulesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListRulesRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListRulesRequest - * @instance - * @returns {Object.} JSON object - */ - ListRulesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListRulesRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListRulesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListRulesRequest"; - }; - - return ListRulesRequest; - })(); - - v1.ListRulesResponse = (function() { - - /** - * Properties of a ListRulesResponse. - * @memberof google.devtools.artifactregistry.v1 - * @interface IListRulesResponse - * @property {Array.|null} [rules] ListRulesResponse rules - * @property {string|null} [nextPageToken] ListRulesResponse nextPageToken - */ - - /** - * Constructs a new ListRulesResponse. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListRulesResponse. - * @implements IListRulesResponse - * @constructor - * @param {google.devtools.artifactregistry.v1.IListRulesResponse=} [properties] Properties to set - */ - function ListRulesResponse(properties) { - this.rules = []; - 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]]; - } - - /** - * ListRulesResponse rules. - * @member {Array.} rules - * @memberof google.devtools.artifactregistry.v1.ListRulesResponse - * @instance - */ - ListRulesResponse.prototype.rules = $util.emptyArray; - - /** - * ListRulesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1.ListRulesResponse - * @instance - */ - ListRulesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListRulesResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ListRulesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListRulesResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListRulesResponse} ListRulesResponse instance - */ - ListRulesResponse.create = function create(properties) { - return new ListRulesResponse(properties); - }; - - /** - * Encodes the specified ListRulesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ListRulesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListRulesResponse} message ListRulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRulesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.devtools.artifactregistry.v1.Rule.encode(message.rules[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 ListRulesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRulesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListRulesResponse - * @static - * @param {google.devtools.artifactregistry.v1.IListRulesResponse} message ListRulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListRulesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ListRulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListRulesResponse} ListRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRulesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ListRulesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.devtools.artifactregistry.v1.Rule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListRulesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListRulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListRulesResponse} ListRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRulesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListRulesResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ListRulesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListRulesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.Rule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListRulesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListRulesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListRulesResponse} ListRulesResponse - */ - ListRulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListRulesResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ListRulesResponse(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.devtools.artifactregistry.v1.ListRulesResponse.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ListRulesResponse.rules: object expected"); - message.rules[i] = $root.google.devtools.artifactregistry.v1.Rule.fromObject(object.rules[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListRulesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListRulesResponse - * @static - * @param {google.devtools.artifactregistry.v1.ListRulesResponse} message ListRulesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListRulesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.devtools.artifactregistry.v1.Rule.toObject(message.rules[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListRulesResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListRulesResponse - * @instance - * @returns {Object.} JSON object - */ - ListRulesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListRulesResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ListRulesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ListRulesResponse"; - }; - - return ListRulesResponse; - })(); - - v1.GetRuleRequest = (function() { - - /** - * Properties of a GetRuleRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGetRuleRequest - * @property {string|null} [name] GetRuleRequest name - */ - - /** - * Constructs a new GetRuleRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GetRuleRequest. - * @implements IGetRuleRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IGetRuleRequest=} [properties] Properties to set - */ - function GetRuleRequest(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]]; - } - - /** - * GetRuleRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GetRuleRequest - * @instance - */ - GetRuleRequest.prototype.name = ""; - - /** - * Creates a new GetRuleRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GetRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetRuleRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GetRuleRequest} GetRuleRequest instance - */ - GetRuleRequest.create = function create(properties) { - return new GetRuleRequest(properties); - }; - - /** - * Encodes the specified GetRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRuleRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GetRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetRuleRequest} message GetRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetRuleRequest.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 GetRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetRuleRequest} message GetRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetRuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GetRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GetRuleRequest} GetRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetRuleRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetRuleRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetRuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GetRuleRequest} GetRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetRuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetRuleRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GetRuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetRuleRequest.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 GetRuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GetRuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GetRuleRequest} GetRuleRequest - */ - GetRuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GetRuleRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GetRuleRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetRuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GetRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.GetRuleRequest} message GetRuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetRuleRequest.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 GetRuleRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GetRuleRequest - * @instance - * @returns {Object.} JSON object - */ - GetRuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetRuleRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GetRuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetRuleRequest"; - }; - - return GetRuleRequest; - })(); - - v1.CreateRuleRequest = (function() { - - /** - * Properties of a CreateRuleRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface ICreateRuleRequest - * @property {string|null} [parent] CreateRuleRequest parent - * @property {string|null} [ruleId] CreateRuleRequest ruleId - * @property {google.devtools.artifactregistry.v1.IRule|null} [rule] CreateRuleRequest rule - */ - - /** - * Constructs a new CreateRuleRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a CreateRuleRequest. - * @implements ICreateRuleRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.ICreateRuleRequest=} [properties] Properties to set - */ - function CreateRuleRequest(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]]; - } - - /** - * CreateRuleRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest - * @instance - */ - CreateRuleRequest.prototype.parent = ""; - - /** - * CreateRuleRequest ruleId. - * @member {string} ruleId - * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest - * @instance - */ - CreateRuleRequest.prototype.ruleId = ""; - - /** - * CreateRuleRequest rule. - * @member {google.devtools.artifactregistry.v1.IRule|null|undefined} rule - * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest - * @instance - */ - CreateRuleRequest.prototype.rule = null; - - /** - * Creates a new CreateRuleRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.ICreateRuleRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.CreateRuleRequest} CreateRuleRequest instance - */ - CreateRuleRequest.create = function create(properties) { - return new CreateRuleRequest(properties); - }; - - /** - * Encodes the specified CreateRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRuleRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.ICreateRuleRequest} message CreateRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateRuleRequest.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.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ruleId); - if (message.rule != null && Object.hasOwnProperty.call(message, "rule")) - $root.google.devtools.artifactregistry.v1.Rule.encode(message.rule, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.ICreateRuleRequest} message CreateRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateRuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.CreateRuleRequest} CreateRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateRuleRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.CreateRuleRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.ruleId = reader.string(); - break; - } - case 3: { - message.rule = $root.google.devtools.artifactregistry.v1.Rule.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateRuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.CreateRuleRequest} CreateRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateRuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateRuleRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateRuleRequest.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.ruleId != null && message.hasOwnProperty("ruleId")) - if (!$util.isString(message.ruleId)) - return "ruleId: string expected"; - if (message.rule != null && message.hasOwnProperty("rule")) { - var error = $root.google.devtools.artifactregistry.v1.Rule.verify(message.rule); - if (error) - return "rule." + error; - } - return null; - }; - - /** - * Creates a CreateRuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.CreateRuleRequest} CreateRuleRequest - */ - CreateRuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.CreateRuleRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.CreateRuleRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.ruleId != null) - message.ruleId = String(object.ruleId); - if (object.rule != null) { - if (typeof object.rule !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.CreateRuleRequest.rule: object expected"); - message.rule = $root.google.devtools.artifactregistry.v1.Rule.fromObject(object.rule); - } - return message; - }; - - /** - * Creates a plain object from a CreateRuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.CreateRuleRequest} message CreateRuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateRuleRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.ruleId = ""; - object.rule = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - object.ruleId = message.ruleId; - if (message.rule != null && message.hasOwnProperty("rule")) - object.rule = $root.google.devtools.artifactregistry.v1.Rule.toObject(message.rule, options); - return object; - }; - - /** - * Converts this CreateRuleRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest - * @instance - * @returns {Object.} JSON object - */ - CreateRuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateRuleRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.CreateRuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.CreateRuleRequest"; - }; - - return CreateRuleRequest; - })(); - - v1.UpdateRuleRequest = (function() { - - /** - * Properties of an UpdateRuleRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IUpdateRuleRequest - * @property {google.devtools.artifactregistry.v1.IRule|null} [rule] UpdateRuleRequest rule - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateRuleRequest updateMask - */ - - /** - * Constructs a new UpdateRuleRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an UpdateRuleRequest. - * @implements IUpdateRuleRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IUpdateRuleRequest=} [properties] Properties to set - */ - function UpdateRuleRequest(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]]; - } - - /** - * UpdateRuleRequest rule. - * @member {google.devtools.artifactregistry.v1.IRule|null|undefined} rule - * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest - * @instance - */ - UpdateRuleRequest.prototype.rule = null; - - /** - * UpdateRuleRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest - * @instance - */ - UpdateRuleRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateRuleRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateRuleRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.UpdateRuleRequest} UpdateRuleRequest instance - */ - UpdateRuleRequest.create = function create(properties) { - return new UpdateRuleRequest(properties); - }; - - /** - * Encodes the specified UpdateRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRuleRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateRuleRequest} message UpdateRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateRuleRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rule != null && Object.hasOwnProperty.call(message, "rule")) - $root.google.devtools.artifactregistry.v1.Rule.encode(message.rule, 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 UpdateRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateRuleRequest} message UpdateRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateRuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.UpdateRuleRequest} UpdateRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateRuleRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdateRuleRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.rule = $root.google.devtools.artifactregistry.v1.Rule.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 UpdateRuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.UpdateRuleRequest} UpdateRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateRuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateRuleRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateRuleRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rule != null && message.hasOwnProperty("rule")) { - var error = $root.google.devtools.artifactregistry.v1.Rule.verify(message.rule); - if (error) - return "rule." + 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 UpdateRuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.UpdateRuleRequest} UpdateRuleRequest - */ - UpdateRuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateRuleRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.UpdateRuleRequest(); - if (object.rule != null) { - if (typeof object.rule !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdateRuleRequest.rule: object expected"); - message.rule = $root.google.devtools.artifactregistry.v1.Rule.fromObject(object.rule); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdateRuleRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateRuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.UpdateRuleRequest} message UpdateRuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateRuleRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.rule = null; - object.updateMask = null; - } - if (message.rule != null && message.hasOwnProperty("rule")) - object.rule = $root.google.devtools.artifactregistry.v1.Rule.toObject(message.rule, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateRuleRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateRuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateRuleRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.UpdateRuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdateRuleRequest"; - }; - - return UpdateRuleRequest; - })(); - - v1.DeleteRuleRequest = (function() { - - /** - * Properties of a DeleteRuleRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IDeleteRuleRequest - * @property {string|null} [name] DeleteRuleRequest name - */ - - /** - * Constructs a new DeleteRuleRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a DeleteRuleRequest. - * @implements IDeleteRuleRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IDeleteRuleRequest=} [properties] Properties to set - */ - function DeleteRuleRequest(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]]; - } - - /** - * DeleteRuleRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest - * @instance - */ - DeleteRuleRequest.prototype.name = ""; - - /** - * Creates a new DeleteRuleRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteRuleRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.DeleteRuleRequest} DeleteRuleRequest instance - */ - DeleteRuleRequest.create = function create(properties) { - return new DeleteRuleRequest(properties); - }; - - /** - * Encodes the specified DeleteRuleRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRuleRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteRuleRequest} message DeleteRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteRuleRequest.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 DeleteRuleRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.IDeleteRuleRequest} message DeleteRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteRuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.DeleteRuleRequest} DeleteRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteRuleRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DeleteRuleRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteRuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.DeleteRuleRequest} DeleteRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteRuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteRuleRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteRuleRequest.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 DeleteRuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.DeleteRuleRequest} DeleteRuleRequest - */ - DeleteRuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteRuleRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.DeleteRuleRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteRuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest - * @static - * @param {google.devtools.artifactregistry.v1.DeleteRuleRequest} message DeleteRuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteRuleRequest.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 DeleteRuleRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteRuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteRuleRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.DeleteRuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.DeleteRuleRequest"; - }; - - return DeleteRuleRequest; - })(); - - v1.ArtifactRegistry = (function() { - - /** - * Constructs a new ArtifactRegistry service. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ArtifactRegistry - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function ArtifactRegistry(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ArtifactRegistry.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ArtifactRegistry; - - /** - * Creates new ArtifactRegistry service using the specified rpc implementation. - * @function create - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {ArtifactRegistry} RPC service. Useful where requests and/or responses are streamed. - */ - ArtifactRegistry.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listDockerImages}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ListDockerImagesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ListDockerImagesResponse} [response] ListDockerImagesResponse - */ - - /** - * Calls ListDockerImages. - * @function listDockerImages - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} request ListDockerImagesRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImagesCallback} callback Node-style callback called with the error, if any, and ListDockerImagesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.listDockerImages = function listDockerImages(request, callback) { - return this.rpcCall(listDockerImages, $root.google.devtools.artifactregistry.v1.ListDockerImagesRequest, $root.google.devtools.artifactregistry.v1.ListDockerImagesResponse, request, callback); - }, "name", { value: "ListDockerImages" }); - - /** - * Calls ListDockerImages. - * @function listDockerImages - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} request ListDockerImagesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getDockerImage}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetDockerImageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.DockerImage} [response] DockerImage - */ - - /** - * Calls GetDockerImage. - * @function getDockerImage - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest} request GetDockerImageRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImageCallback} callback Node-style callback called with the error, if any, and DockerImage - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.getDockerImage = function getDockerImage(request, callback) { - return this.rpcCall(getDockerImage, $root.google.devtools.artifactregistry.v1.GetDockerImageRequest, $root.google.devtools.artifactregistry.v1.DockerImage, request, callback); - }, "name", { value: "GetDockerImage" }); - - /** - * Calls GetDockerImage. - * @function getDockerImage - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest} request GetDockerImageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listMavenArtifacts}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ListMavenArtifactsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ListMavenArtifactsResponse} [response] ListMavenArtifactsResponse - */ - - /** - * Calls ListMavenArtifacts. - * @function listMavenArtifacts - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsRequest} request ListMavenArtifactsRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListMavenArtifactsCallback} callback Node-style callback called with the error, if any, and ListMavenArtifactsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.listMavenArtifacts = function listMavenArtifacts(request, callback) { - return this.rpcCall(listMavenArtifacts, $root.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest, $root.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse, request, callback); - }, "name", { value: "ListMavenArtifacts" }); - - /** - * Calls ListMavenArtifacts. - * @function listMavenArtifacts - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListMavenArtifactsRequest} request ListMavenArtifactsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getMavenArtifact}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetMavenArtifactCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.MavenArtifact} [response] MavenArtifact - */ - - /** - * Calls GetMavenArtifact. - * @function getMavenArtifact - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetMavenArtifactRequest} request GetMavenArtifactRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetMavenArtifactCallback} callback Node-style callback called with the error, if any, and MavenArtifact - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.getMavenArtifact = function getMavenArtifact(request, callback) { - return this.rpcCall(getMavenArtifact, $root.google.devtools.artifactregistry.v1.GetMavenArtifactRequest, $root.google.devtools.artifactregistry.v1.MavenArtifact, request, callback); - }, "name", { value: "GetMavenArtifact" }); - - /** - * Calls GetMavenArtifact. - * @function getMavenArtifact - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetMavenArtifactRequest} request GetMavenArtifactRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listNpmPackages}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ListNpmPackagesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ListNpmPackagesResponse} [response] ListNpmPackagesResponse - */ - - /** - * Calls ListNpmPackages. - * @function listNpmPackages - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListNpmPackagesRequest} request ListNpmPackagesRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListNpmPackagesCallback} callback Node-style callback called with the error, if any, and ListNpmPackagesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.listNpmPackages = function listNpmPackages(request, callback) { - return this.rpcCall(listNpmPackages, $root.google.devtools.artifactregistry.v1.ListNpmPackagesRequest, $root.google.devtools.artifactregistry.v1.ListNpmPackagesResponse, request, callback); - }, "name", { value: "ListNpmPackages" }); - - /** - * Calls ListNpmPackages. - * @function listNpmPackages - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListNpmPackagesRequest} request ListNpmPackagesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getNpmPackage}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetNpmPackageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.NpmPackage} [response] NpmPackage - */ - - /** - * Calls GetNpmPackage. - * @function getNpmPackage - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetNpmPackageRequest} request GetNpmPackageRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetNpmPackageCallback} callback Node-style callback called with the error, if any, and NpmPackage - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.getNpmPackage = function getNpmPackage(request, callback) { - return this.rpcCall(getNpmPackage, $root.google.devtools.artifactregistry.v1.GetNpmPackageRequest, $root.google.devtools.artifactregistry.v1.NpmPackage, request, callback); - }, "name", { value: "GetNpmPackage" }); - - /** - * Calls GetNpmPackage. - * @function getNpmPackage - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetNpmPackageRequest} request GetNpmPackageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listPythonPackages}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ListPythonPackagesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ListPythonPackagesResponse} [response] ListPythonPackagesResponse - */ - - /** - * Calls ListPythonPackages. - * @function listPythonPackages - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListPythonPackagesRequest} request ListPythonPackagesRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListPythonPackagesCallback} callback Node-style callback called with the error, if any, and ListPythonPackagesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.listPythonPackages = function listPythonPackages(request, callback) { - return this.rpcCall(listPythonPackages, $root.google.devtools.artifactregistry.v1.ListPythonPackagesRequest, $root.google.devtools.artifactregistry.v1.ListPythonPackagesResponse, request, callback); - }, "name", { value: "ListPythonPackages" }); - - /** - * Calls ListPythonPackages. - * @function listPythonPackages - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListPythonPackagesRequest} request ListPythonPackagesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getPythonPackage}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetPythonPackageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.PythonPackage} [response] PythonPackage - */ - - /** - * Calls GetPythonPackage. - * @function getPythonPackage - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetPythonPackageRequest} request GetPythonPackageRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetPythonPackageCallback} callback Node-style callback called with the error, if any, and PythonPackage - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.getPythonPackage = function getPythonPackage(request, callback) { - return this.rpcCall(getPythonPackage, $root.google.devtools.artifactregistry.v1.GetPythonPackageRequest, $root.google.devtools.artifactregistry.v1.PythonPackage, request, callback); - }, "name", { value: "GetPythonPackage" }); - - /** - * Calls GetPythonPackage. - * @function getPythonPackage - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetPythonPackageRequest} request GetPythonPackageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|importAptArtifacts}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ImportAptArtifactsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ImportAptArtifacts. - * @function importAptArtifacts - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest} request ImportAptArtifactsRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifactsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.importAptArtifacts = function importAptArtifacts(request, callback) { - return this.rpcCall(importAptArtifacts, $root.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportAptArtifacts" }); - - /** - * Calls ImportAptArtifacts. - * @function importAptArtifacts - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest} request ImportAptArtifactsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|importYumArtifacts}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ImportYumArtifactsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ImportYumArtifacts. - * @function importYumArtifacts - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest} request ImportYumArtifactsRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifactsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.importYumArtifacts = function importYumArtifacts(request, callback) { - return this.rpcCall(importYumArtifacts, $root.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportYumArtifacts" }); - - /** - * Calls ImportYumArtifacts. - * @function importYumArtifacts - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest} request ImportYumArtifactsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listRepositories}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ListRepositoriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ListRepositoriesResponse} [response] ListRepositoriesResponse - */ - - /** - * Calls ListRepositories. - * @function listRepositories - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositoriesCallback} callback Node-style callback called with the error, if any, and ListRepositoriesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.listRepositories = function listRepositories(request, callback) { - return this.rpcCall(listRepositories, $root.google.devtools.artifactregistry.v1.ListRepositoriesRequest, $root.google.devtools.artifactregistry.v1.ListRepositoriesResponse, request, callback); - }, "name", { value: "ListRepositories" }); - - /** - * Calls ListRepositories. - * @function listRepositories - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getRepository}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetRepositoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.Repository} [response] Repository - */ - - /** - * Calls GetRepository. - * @function getRepository - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} request GetRepositoryRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepositoryCallback} callback Node-style callback called with the error, if any, and Repository - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.getRepository = function getRepository(request, callback) { - return this.rpcCall(getRepository, $root.google.devtools.artifactregistry.v1.GetRepositoryRequest, $root.google.devtools.artifactregistry.v1.Repository, request, callback); - }, "name", { value: "GetRepository" }); - - /** - * Calls GetRepository. - * @function getRepository - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} request GetRepositoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createRepository}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef CreateRepositoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateRepository. - * @function createRepository - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepositoryCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.createRepository = function createRepository(request, callback) { - return this.rpcCall(createRepository, $root.google.devtools.artifactregistry.v1.CreateRepositoryRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateRepository" }); - - /** - * Calls CreateRepository. - * @function createRepository - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateRepository}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef UpdateRepositoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.Repository} [response] Repository - */ - - /** - * Calls UpdateRepository. - * @function updateRepository - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepositoryCallback} callback Node-style callback called with the error, if any, and Repository - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.updateRepository = function updateRepository(request, callback) { - return this.rpcCall(updateRepository, $root.google.devtools.artifactregistry.v1.UpdateRepositoryRequest, $root.google.devtools.artifactregistry.v1.Repository, request, callback); - }, "name", { value: "UpdateRepository" }); - - /** - * Calls UpdateRepository. - * @function updateRepository - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteRepository}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef DeleteRepositoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteRepository. - * @function deleteRepository - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepositoryCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.deleteRepository = function deleteRepository(request, callback) { - return this.rpcCall(deleteRepository, $root.google.devtools.artifactregistry.v1.DeleteRepositoryRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteRepository" }); - - /** - * Calls DeleteRepository. - * @function deleteRepository - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listPackages}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ListPackagesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ListPackagesResponse} [response] ListPackagesResponse - */ - - /** - * Calls ListPackages. - * @function listPackages - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListPackagesRequest} request ListPackagesRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackagesCallback} callback Node-style callback called with the error, if any, and ListPackagesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.listPackages = function listPackages(request, callback) { - return this.rpcCall(listPackages, $root.google.devtools.artifactregistry.v1.ListPackagesRequest, $root.google.devtools.artifactregistry.v1.ListPackagesResponse, request, callback); - }, "name", { value: "ListPackages" }); - - /** - * Calls ListPackages. - * @function listPackages - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListPackagesRequest} request ListPackagesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getPackage}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetPackageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.Package} [response] Package - */ - - /** - * Calls GetPackage. - * @function getPackage - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetPackageRequest} request GetPackageRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackageCallback} callback Node-style callback called with the error, if any, and Package - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.getPackage = function getPackage(request, callback) { - return this.rpcCall(getPackage, $root.google.devtools.artifactregistry.v1.GetPackageRequest, $root.google.devtools.artifactregistry.v1.Package, request, callback); - }, "name", { value: "GetPackage" }); - - /** - * Calls GetPackage. - * @function getPackage - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetPackageRequest} request GetPackageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deletePackage}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef DeletePackageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeletePackage. - * @function deletePackage - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest} request DeletePackageRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackageCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.deletePackage = function deletePackage(request, callback) { - return this.rpcCall(deletePackage, $root.google.devtools.artifactregistry.v1.DeletePackageRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeletePackage" }); - - /** - * Calls DeletePackage. - * @function deletePackage - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest} request DeletePackageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listVersions}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ListVersionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ListVersionsResponse} [response] ListVersionsResponse - */ - - /** - * Calls ListVersions. - * @function listVersions - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListVersionsRequest} request ListVersionsRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersionsCallback} callback Node-style callback called with the error, if any, and ListVersionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.listVersions = function listVersions(request, callback) { - return this.rpcCall(listVersions, $root.google.devtools.artifactregistry.v1.ListVersionsRequest, $root.google.devtools.artifactregistry.v1.ListVersionsResponse, request, callback); - }, "name", { value: "ListVersions" }); - - /** - * Calls ListVersions. - * @function listVersions - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListVersionsRequest} request ListVersionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getVersion}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetVersionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.Version} [response] Version - */ - - /** - * Calls GetVersion. - * @function getVersion - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetVersionRequest} request GetVersionRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersionCallback} callback Node-style callback called with the error, if any, and Version - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.getVersion = function getVersion(request, callback) { - return this.rpcCall(getVersion, $root.google.devtools.artifactregistry.v1.GetVersionRequest, $root.google.devtools.artifactregistry.v1.Version, request, callback); - }, "name", { value: "GetVersion" }); - - /** - * Calls GetVersion. - * @function getVersion - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetVersionRequest} request GetVersionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteVersion}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef DeleteVersionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteVersion. - * @function deleteVersion - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest} request DeleteVersionRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersionCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.deleteVersion = function deleteVersion(request, callback) { - return this.rpcCall(deleteVersion, $root.google.devtools.artifactregistry.v1.DeleteVersionRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteVersion" }); - - /** - * Calls DeleteVersion. - * @function deleteVersion - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest} request DeleteVersionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|batchDeleteVersions}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef BatchDeleteVersionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls BatchDeleteVersions. - * @function batchDeleteVersions - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest} request BatchDeleteVersionsRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.BatchDeleteVersionsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.batchDeleteVersions = function batchDeleteVersions(request, callback) { - return this.rpcCall(batchDeleteVersions, $root.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "BatchDeleteVersions" }); - - /** - * Calls BatchDeleteVersions. - * @function batchDeleteVersions - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest} request BatchDeleteVersionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateVersion}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef UpdateVersionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.Version} [response] Version - */ - - /** - * Calls UpdateVersion. - * @function updateVersion - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdateVersionRequest} request UpdateVersionRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVersionCallback} callback Node-style callback called with the error, if any, and Version - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.updateVersion = function updateVersion(request, callback) { - return this.rpcCall(updateVersion, $root.google.devtools.artifactregistry.v1.UpdateVersionRequest, $root.google.devtools.artifactregistry.v1.Version, request, callback); - }, "name", { value: "UpdateVersion" }); - - /** - * Calls UpdateVersion. - * @function updateVersion - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdateVersionRequest} request UpdateVersionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listFiles}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ListFilesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ListFilesResponse} [response] ListFilesResponse - */ - - /** - * Calls ListFiles. - * @function listFiles - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListFilesRequest} request ListFilesRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListFilesCallback} callback Node-style callback called with the error, if any, and ListFilesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.listFiles = function listFiles(request, callback) { - return this.rpcCall(listFiles, $root.google.devtools.artifactregistry.v1.ListFilesRequest, $root.google.devtools.artifactregistry.v1.ListFilesResponse, request, callback); - }, "name", { value: "ListFiles" }); - - /** - * Calls ListFiles. - * @function listFiles - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListFilesRequest} request ListFilesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getFile}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetFileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.File} [response] File - */ - - /** - * Calls GetFile. - * @function getFile - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetFileRequest} request GetFileRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetFileCallback} callback Node-style callback called with the error, if any, and File - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.getFile = function getFile(request, callback) { - return this.rpcCall(getFile, $root.google.devtools.artifactregistry.v1.GetFileRequest, $root.google.devtools.artifactregistry.v1.File, request, callback); - }, "name", { value: "GetFile" }); - - /** - * Calls GetFile. - * @function getFile - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetFileRequest} request GetFileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteFile}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef DeleteFileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteFile. - * @function deleteFile - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IDeleteFileRequest} request DeleteFileRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteFileCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.deleteFile = function deleteFile(request, callback) { - return this.rpcCall(deleteFile, $root.google.devtools.artifactregistry.v1.DeleteFileRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteFile" }); - - /** - * Calls DeleteFile. - * @function deleteFile - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IDeleteFileRequest} request DeleteFileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateFile}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef UpdateFileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.File} [response] File - */ - - /** - * Calls UpdateFile. - * @function updateFile - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdateFileRequest} request UpdateFileRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateFileCallback} callback Node-style callback called with the error, if any, and File - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.updateFile = function updateFile(request, callback) { - return this.rpcCall(updateFile, $root.google.devtools.artifactregistry.v1.UpdateFileRequest, $root.google.devtools.artifactregistry.v1.File, request, callback); - }, "name", { value: "UpdateFile" }); - - /** - * Calls UpdateFile. - * @function updateFile - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdateFileRequest} request UpdateFileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listTags}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ListTagsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ListTagsResponse} [response] ListTagsResponse - */ - - /** - * Calls ListTags. - * @function listTags - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListTagsRequest} request ListTagsRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListTagsCallback} callback Node-style callback called with the error, if any, and ListTagsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.listTags = function listTags(request, callback) { - return this.rpcCall(listTags, $root.google.devtools.artifactregistry.v1.ListTagsRequest, $root.google.devtools.artifactregistry.v1.ListTagsResponse, request, callback); - }, "name", { value: "ListTags" }); - - /** - * Calls ListTags. - * @function listTags - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListTagsRequest} request ListTagsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getTag}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.Tag} [response] Tag - */ - - /** - * Calls GetTag. - * @function getTag - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetTagRequest} request GetTagRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetTagCallback} callback Node-style callback called with the error, if any, and Tag - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.getTag = function getTag(request, callback) { - return this.rpcCall(getTag, $root.google.devtools.artifactregistry.v1.GetTagRequest, $root.google.devtools.artifactregistry.v1.Tag, request, callback); - }, "name", { value: "GetTag" }); - - /** - * Calls GetTag. - * @function getTag - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetTagRequest} request GetTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createTag}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef CreateTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.Tag} [response] Tag - */ - - /** - * Calls CreateTag. - * @function createTag - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.ICreateTagRequest} request CreateTagRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTagCallback} callback Node-style callback called with the error, if any, and Tag - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.createTag = function createTag(request, callback) { - return this.rpcCall(createTag, $root.google.devtools.artifactregistry.v1.CreateTagRequest, $root.google.devtools.artifactregistry.v1.Tag, request, callback); - }, "name", { value: "CreateTag" }); - - /** - * Calls CreateTag. - * @function createTag - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.ICreateTagRequest} request CreateTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateTag}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef UpdateTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.Tag} [response] Tag - */ - - /** - * Calls UpdateTag. - * @function updateTag - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest} request UpdateTagRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTagCallback} callback Node-style callback called with the error, if any, and Tag - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.updateTag = function updateTag(request, callback) { - return this.rpcCall(updateTag, $root.google.devtools.artifactregistry.v1.UpdateTagRequest, $root.google.devtools.artifactregistry.v1.Tag, request, callback); - }, "name", { value: "UpdateTag" }); - - /** - * Calls UpdateTag. - * @function updateTag - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest} request UpdateTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteTag}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef DeleteTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteTag. - * @function deleteTag - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest} request DeleteTagRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTagCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.deleteTag = function deleteTag(request, callback) { - return this.rpcCall(deleteTag, $root.google.devtools.artifactregistry.v1.DeleteTagRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTag" }); - - /** - * Calls DeleteTag. - * @function deleteTag - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest} request DeleteTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createRule}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef CreateRuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.Rule} [response] Rule - */ - - /** - * Calls CreateRule. - * @function createRule - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.ICreateRuleRequest} request CreateRuleRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRuleCallback} callback Node-style callback called with the error, if any, and Rule - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.createRule = function createRule(request, callback) { - return this.rpcCall(createRule, $root.google.devtools.artifactregistry.v1.CreateRuleRequest, $root.google.devtools.artifactregistry.v1.Rule, request, callback); - }, "name", { value: "CreateRule" }); - - /** - * Calls CreateRule. - * @function createRule - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.ICreateRuleRequest} request CreateRuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listRules}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ListRulesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ListRulesResponse} [response] ListRulesResponse - */ - - /** - * Calls ListRules. - * @function listRules - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListRulesRequest} request ListRulesRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListRulesCallback} callback Node-style callback called with the error, if any, and ListRulesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.listRules = function listRules(request, callback) { - return this.rpcCall(listRules, $root.google.devtools.artifactregistry.v1.ListRulesRequest, $root.google.devtools.artifactregistry.v1.ListRulesResponse, request, callback); - }, "name", { value: "ListRules" }); - - /** - * Calls ListRules. - * @function listRules - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListRulesRequest} request ListRulesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getRule}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetRuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.Rule} [response] Rule - */ - - /** - * Calls GetRule. - * @function getRule - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetRuleRequest} request GetRuleRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetRuleCallback} callback Node-style callback called with the error, if any, and Rule - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.getRule = function getRule(request, callback) { - return this.rpcCall(getRule, $root.google.devtools.artifactregistry.v1.GetRuleRequest, $root.google.devtools.artifactregistry.v1.Rule, request, callback); - }, "name", { value: "GetRule" }); - - /** - * Calls GetRule. - * @function getRule - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetRuleRequest} request GetRuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateRule}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef UpdateRuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.Rule} [response] Rule - */ - - /** - * Calls UpdateRule. - * @function updateRule - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdateRuleRequest} request UpdateRuleRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRuleCallback} callback Node-style callback called with the error, if any, and Rule - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.updateRule = function updateRule(request, callback) { - return this.rpcCall(updateRule, $root.google.devtools.artifactregistry.v1.UpdateRuleRequest, $root.google.devtools.artifactregistry.v1.Rule, request, callback); - }, "name", { value: "UpdateRule" }); - - /** - * Calls UpdateRule. - * @function updateRule - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdateRuleRequest} request UpdateRuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteRule}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef DeleteRuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteRule. - * @function deleteRule - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IDeleteRuleRequest} request DeleteRuleRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRuleCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.deleteRule = function deleteRule(request, callback) { - return this.rpcCall(deleteRule, $root.google.devtools.artifactregistry.v1.DeleteRuleRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteRule" }); - - /** - * Calls DeleteRule. - * @function deleteRule - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IDeleteRuleRequest} request DeleteRuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|setIamPolicy}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getIamPolicy}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|testIamPermissions}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getProjectSettings}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetProjectSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ProjectSettings} [response] ProjectSettings - */ - - /** - * Calls GetProjectSettings. - * @function getProjectSettings - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest} request GetProjectSettingsRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettingsCallback} callback Node-style callback called with the error, if any, and ProjectSettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.getProjectSettings = function getProjectSettings(request, callback) { - return this.rpcCall(getProjectSettings, $root.google.devtools.artifactregistry.v1.GetProjectSettingsRequest, $root.google.devtools.artifactregistry.v1.ProjectSettings, request, callback); - }, "name", { value: "GetProjectSettings" }); - - /** - * Calls GetProjectSettings. - * @function getProjectSettings - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest} request GetProjectSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateProjectSettings}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef UpdateProjectSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ProjectSettings} [response] ProjectSettings - */ - - /** - * Calls UpdateProjectSettings. - * @function updateProjectSettings - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest} request UpdateProjectSettingsRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettingsCallback} callback Node-style callback called with the error, if any, and ProjectSettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.updateProjectSettings = function updateProjectSettings(request, callback) { - return this.rpcCall(updateProjectSettings, $root.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest, $root.google.devtools.artifactregistry.v1.ProjectSettings, request, callback); - }, "name", { value: "UpdateProjectSettings" }); - - /** - * Calls UpdateProjectSettings. - * @function updateProjectSettings - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest} request UpdateProjectSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getVPCSCConfig}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetVPCSCConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.VPCSCConfig} [response] VPCSCConfig - */ - - /** - * Calls GetVPCSCConfig. - * @function getVPCSCConfig - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest} request GetVPCSCConfigRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetVPCSCConfigCallback} callback Node-style callback called with the error, if any, and VPCSCConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.getVPCSCConfig = function getVPCSCConfig(request, callback) { - return this.rpcCall(getVPCSCConfig, $root.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest, $root.google.devtools.artifactregistry.v1.VPCSCConfig, request, callback); - }, "name", { value: "GetVPCSCConfig" }); - - /** - * Calls GetVPCSCConfig. - * @function getVPCSCConfig - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest} request GetVPCSCConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updateVPCSCConfig}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef UpdateVPCSCConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.VPCSCConfig} [response] VPCSCConfig - */ - - /** - * Calls UpdateVPCSCConfig. - * @function updateVPCSCConfig - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest} request UpdateVPCSCConfigRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVPCSCConfigCallback} callback Node-style callback called with the error, if any, and VPCSCConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.updateVPCSCConfig = function updateVPCSCConfig(request, callback) { - return this.rpcCall(updateVPCSCConfig, $root.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest, $root.google.devtools.artifactregistry.v1.VPCSCConfig, request, callback); - }, "name", { value: "UpdateVPCSCConfig" }); - - /** - * Calls UpdateVPCSCConfig. - * @function updateVPCSCConfig - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest} request UpdateVPCSCConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|updatePackage}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef UpdatePackageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.Package} [response] Package - */ - - /** - * Calls UpdatePackage. - * @function updatePackage - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdatePackageRequest} request UpdatePackageRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdatePackageCallback} callback Node-style callback called with the error, if any, and Package - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.updatePackage = function updatePackage(request, callback) { - return this.rpcCall(updatePackage, $root.google.devtools.artifactregistry.v1.UpdatePackageRequest, $root.google.devtools.artifactregistry.v1.Package, request, callback); - }, "name", { value: "UpdatePackage" }); - - /** - * Calls UpdatePackage. - * @function updatePackage - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IUpdatePackageRequest} request UpdatePackageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|listAttachments}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ListAttachmentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ListAttachmentsResponse} [response] ListAttachmentsResponse - */ - - /** - * Calls ListAttachments. - * @function listAttachments - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListAttachmentsRequest} request ListAttachmentsRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListAttachmentsCallback} callback Node-style callback called with the error, if any, and ListAttachmentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.listAttachments = function listAttachments(request, callback) { - return this.rpcCall(listAttachments, $root.google.devtools.artifactregistry.v1.ListAttachmentsRequest, $root.google.devtools.artifactregistry.v1.ListAttachmentsResponse, request, callback); - }, "name", { value: "ListAttachments" }); - - /** - * Calls ListAttachments. - * @function listAttachments - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListAttachmentsRequest} request ListAttachmentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|getAttachment}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetAttachmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.Attachment} [response] Attachment - */ - - /** - * Calls GetAttachment. - * @function getAttachment - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetAttachmentRequest} request GetAttachmentRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetAttachmentCallback} callback Node-style callback called with the error, if any, and Attachment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.getAttachment = function getAttachment(request, callback) { - return this.rpcCall(getAttachment, $root.google.devtools.artifactregistry.v1.GetAttachmentRequest, $root.google.devtools.artifactregistry.v1.Attachment, request, callback); - }, "name", { value: "GetAttachment" }); - - /** - * Calls GetAttachment. - * @function getAttachment - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetAttachmentRequest} request GetAttachmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|createAttachment}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef CreateAttachmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateAttachment. - * @function createAttachment - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.ICreateAttachmentRequest} request CreateAttachmentRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.CreateAttachmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.createAttachment = function createAttachment(request, callback) { - return this.rpcCall(createAttachment, $root.google.devtools.artifactregistry.v1.CreateAttachmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateAttachment" }); - - /** - * Calls CreateAttachment. - * @function createAttachment - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.ICreateAttachmentRequest} request CreateAttachmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|deleteAttachment}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef DeleteAttachmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteAttachment. - * @function deleteAttachment - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IDeleteAttachmentRequest} request DeleteAttachmentRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteAttachmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.deleteAttachment = function deleteAttachment(request, callback) { - return this.rpcCall(deleteAttachment, $root.google.devtools.artifactregistry.v1.DeleteAttachmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteAttachment" }); - - /** - * Calls DeleteAttachment. - * @function deleteAttachment - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IDeleteAttachmentRequest} request DeleteAttachmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry|exportArtifact}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ExportArtifactCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ExportArtifact. - * @function exportArtifact - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IExportArtifactRequest} request ExportArtifactRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ExportArtifactCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ArtifactRegistry.prototype.exportArtifact = function exportArtifact(request, callback) { - return this.rpcCall(exportArtifact, $root.google.devtools.artifactregistry.v1.ExportArtifactRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportArtifact" }); - - /** - * Calls ExportArtifact. - * @function exportArtifact - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IExportArtifactRequest} request ExportArtifactRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ArtifactRegistry; - })(); - - v1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.devtools.artifactregistry.v1 - * @interface IOperationMetadata - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.devtools.artifactregistry.v1.IOperationMetadata=} [properties] Properties to set - */ - function OperationMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.OperationMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.OperationMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IOperationMetadata} message OperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.OperationMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IOperationMetadata} message OperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.OperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationMetadata message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.OperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.OperationMetadata) - return object; - return new $root.google.devtools.artifactregistry.v1.OperationMetadata(); - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.OperationMetadata - * @static - * @param {google.devtools.artifactregistry.v1.OperationMetadata} message OperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationMetadata.toObject = function toObject() { - return {}; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.OperationMetadata - * @instance - * @returns {Object.} JSON object - */ - OperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationMetadata - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.OperationMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - v1.ProjectSettings = (function() { - - /** - * Properties of a ProjectSettings. - * @memberof google.devtools.artifactregistry.v1 - * @interface IProjectSettings - * @property {string|null} [name] ProjectSettings name - * @property {google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState|null} [legacyRedirectionState] ProjectSettings legacyRedirectionState - * @property {number|null} [pullPercent] ProjectSettings pullPercent - */ - - /** - * Constructs a new ProjectSettings. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ProjectSettings. - * @implements IProjectSettings - * @constructor - * @param {google.devtools.artifactregistry.v1.IProjectSettings=} [properties] Properties to set - */ - function ProjectSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProjectSettings name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.ProjectSettings - * @instance - */ - ProjectSettings.prototype.name = ""; - - /** - * ProjectSettings legacyRedirectionState. - * @member {google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState} legacyRedirectionState - * @memberof google.devtools.artifactregistry.v1.ProjectSettings - * @instance - */ - ProjectSettings.prototype.legacyRedirectionState = 0; - - /** - * ProjectSettings pullPercent. - * @member {number} pullPercent - * @memberof google.devtools.artifactregistry.v1.ProjectSettings - * @instance - */ - ProjectSettings.prototype.pullPercent = 0; - - /** - * Creates a new ProjectSettings instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ProjectSettings - * @static - * @param {google.devtools.artifactregistry.v1.IProjectSettings=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ProjectSettings} ProjectSettings instance - */ - ProjectSettings.create = function create(properties) { - return new ProjectSettings(properties); - }; - - /** - * Encodes the specified ProjectSettings message. Does not implicitly {@link google.devtools.artifactregistry.v1.ProjectSettings.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ProjectSettings - * @static - * @param {google.devtools.artifactregistry.v1.IProjectSettings} message ProjectSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProjectSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.legacyRedirectionState != null && Object.hasOwnProperty.call(message, "legacyRedirectionState")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.legacyRedirectionState); - if (message.pullPercent != null && Object.hasOwnProperty.call(message, "pullPercent")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pullPercent); - return writer; - }; - - /** - * Encodes the specified ProjectSettings message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ProjectSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ProjectSettings - * @static - * @param {google.devtools.artifactregistry.v1.IProjectSettings} message ProjectSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProjectSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProjectSettings message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ProjectSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ProjectSettings} ProjectSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProjectSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ProjectSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.legacyRedirectionState = reader.int32(); - break; - } - case 3: { - message.pullPercent = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProjectSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ProjectSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ProjectSettings} ProjectSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProjectSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProjectSettings message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ProjectSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProjectSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.legacyRedirectionState != null && message.hasOwnProperty("legacyRedirectionState")) - switch (message.legacyRedirectionState) { - default: - return "legacyRedirectionState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 5: - case 6: - break; - } - if (message.pullPercent != null && message.hasOwnProperty("pullPercent")) - if (!$util.isInteger(message.pullPercent)) - return "pullPercent: integer expected"; - return null; - }; - - /** - * Creates a ProjectSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ProjectSettings - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ProjectSettings} ProjectSettings - */ - ProjectSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ProjectSettings) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ProjectSettings(); - if (object.name != null) - message.name = String(object.name); - switch (object.legacyRedirectionState) { - default: - if (typeof object.legacyRedirectionState === "number") { - message.legacyRedirectionState = object.legacyRedirectionState; - break; - } - break; - case "REDIRECTION_STATE_UNSPECIFIED": - case 0: - message.legacyRedirectionState = 0; - break; - case "REDIRECTION_FROM_GCR_IO_DISABLED": - case 1: - message.legacyRedirectionState = 1; - break; - case "REDIRECTION_FROM_GCR_IO_ENABLED": - case 2: - message.legacyRedirectionState = 2; - break; - case "REDIRECTION_FROM_GCR_IO_FINALIZED": - case 3: - message.legacyRedirectionState = 3; - break; - case "REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING": - case 5: - message.legacyRedirectionState = 5; - break; - case "REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING": - case 6: - message.legacyRedirectionState = 6; - break; - } - if (object.pullPercent != null) - message.pullPercent = object.pullPercent | 0; - return message; - }; - - /** - * Creates a plain object from a ProjectSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ProjectSettings - * @static - * @param {google.devtools.artifactregistry.v1.ProjectSettings} message ProjectSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProjectSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.legacyRedirectionState = options.enums === String ? "REDIRECTION_STATE_UNSPECIFIED" : 0; - object.pullPercent = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.legacyRedirectionState != null && message.hasOwnProperty("legacyRedirectionState")) - object.legacyRedirectionState = options.enums === String ? $root.google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState[message.legacyRedirectionState] === undefined ? message.legacyRedirectionState : $root.google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState[message.legacyRedirectionState] : message.legacyRedirectionState; - if (message.pullPercent != null && message.hasOwnProperty("pullPercent")) - object.pullPercent = message.pullPercent; - return object; - }; - - /** - * Converts this ProjectSettings to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ProjectSettings - * @instance - * @returns {Object.} JSON object - */ - ProjectSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProjectSettings - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ProjectSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProjectSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ProjectSettings"; - }; - - /** - * RedirectionState enum. - * @name google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState - * @enum {number} - * @property {number} REDIRECTION_STATE_UNSPECIFIED=0 REDIRECTION_STATE_UNSPECIFIED value - * @property {number} REDIRECTION_FROM_GCR_IO_DISABLED=1 REDIRECTION_FROM_GCR_IO_DISABLED value - * @property {number} REDIRECTION_FROM_GCR_IO_ENABLED=2 REDIRECTION_FROM_GCR_IO_ENABLED value - * @property {number} REDIRECTION_FROM_GCR_IO_FINALIZED=3 REDIRECTION_FROM_GCR_IO_FINALIZED value - * @property {number} REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING=5 REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING value - * @property {number} REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING=6 REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING 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; - values[valuesById[5] = "REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING"] = 5; - values[valuesById[6] = "REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING"] = 6; - return values; - })(); - - return ProjectSettings; - })(); - - v1.GetProjectSettingsRequest = (function() { - - /** - * Properties of a GetProjectSettingsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGetProjectSettingsRequest - * @property {string|null} [name] GetProjectSettingsRequest name - */ - - /** - * Constructs a new GetProjectSettingsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GetProjectSettingsRequest. - * @implements IGetProjectSettingsRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest=} [properties] Properties to set - */ - function GetProjectSettingsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetProjectSettingsRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest - * @instance - */ - GetProjectSettingsRequest.prototype.name = ""; - - /** - * Creates a new GetProjectSettingsRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} GetProjectSettingsRequest instance - */ - GetProjectSettingsRequest.create = function create(properties) { - return new GetProjectSettingsRequest(properties); - }; - - /** - * Encodes the specified GetProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetProjectSettingsRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest} message GetProjectSettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetProjectSettingsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetProjectSettingsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest} message GetProjectSettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetProjectSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetProjectSettingsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} GetProjectSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetProjectSettingsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetProjectSettingsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetProjectSettingsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} GetProjectSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetProjectSettingsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetProjectSettingsRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetProjectSettingsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} GetProjectSettingsRequest - */ - GetProjectSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GetProjectSettingsRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GetProjectSettingsRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetProjectSettingsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest - * @static - * @param {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} message GetProjectSettingsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetProjectSettingsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetProjectSettingsRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest - * @instance - * @returns {Object.} JSON object - */ - GetProjectSettingsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetProjectSettingsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetProjectSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetProjectSettingsRequest"; - }; - - return GetProjectSettingsRequest; - })(); - - v1.UpdateProjectSettingsRequest = (function() { - - /** - * Properties of an UpdateProjectSettingsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IUpdateProjectSettingsRequest - * @property {google.devtools.artifactregistry.v1.IProjectSettings|null} [projectSettings] UpdateProjectSettingsRequest projectSettings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateProjectSettingsRequest updateMask - */ - - /** - * Constructs a new UpdateProjectSettingsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an UpdateProjectSettingsRequest. - * @implements IUpdateProjectSettingsRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest=} [properties] Properties to set - */ - function UpdateProjectSettingsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateProjectSettingsRequest projectSettings. - * @member {google.devtools.artifactregistry.v1.IProjectSettings|null|undefined} projectSettings - * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest - * @instance - */ - UpdateProjectSettingsRequest.prototype.projectSettings = null; - - /** - * UpdateProjectSettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest - * @instance - */ - UpdateProjectSettingsRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateProjectSettingsRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest instance - */ - UpdateProjectSettingsRequest.create = function create(properties) { - return new UpdateProjectSettingsRequest(properties); - }; - - /** - * Encodes the specified UpdateProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest} message UpdateProjectSettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateProjectSettingsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectSettings != null && Object.hasOwnProperty.call(message, "projectSettings")) - $root.google.devtools.artifactregistry.v1.ProjectSettings.encode(message.projectSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest} message UpdateProjectSettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateProjectSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateProjectSettingsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.projectSettings = $root.google.devtools.artifactregistry.v1.ProjectSettings.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateProjectSettingsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateProjectSettingsRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateProjectSettingsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectSettings != null && message.hasOwnProperty("projectSettings")) { - var error = $root.google.devtools.artifactregistry.v1.ProjectSettings.verify(message.projectSettings); - if (error) - return "projectSettings." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates an UpdateProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest - */ - UpdateProjectSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest(); - if (object.projectSettings != null) { - if (typeof object.projectSettings !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.projectSettings: object expected"); - message.projectSettings = $root.google.devtools.artifactregistry.v1.ProjectSettings.fromObject(object.projectSettings); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateProjectSettingsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest - * @static - * @param {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} message UpdateProjectSettingsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateProjectSettingsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectSettings = null; - object.updateMask = null; - } - if (message.projectSettings != null && message.hasOwnProperty("projectSettings")) - object.projectSettings = $root.google.devtools.artifactregistry.v1.ProjectSettings.toObject(message.projectSettings, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateProjectSettingsRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateProjectSettingsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateProjectSettingsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateProjectSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest"; - }; - - return UpdateProjectSettingsRequest; - })(); - - v1.VPCSCConfig = (function() { - - /** - * Properties of a VPCSCConfig. - * @memberof google.devtools.artifactregistry.v1 - * @interface IVPCSCConfig - * @property {string|null} [name] VPCSCConfig name - * @property {google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy|null} [vpcscPolicy] VPCSCConfig vpcscPolicy - */ - - /** - * Constructs a new VPCSCConfig. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a VPCSCConfig. - * @implements IVPCSCConfig - * @constructor - * @param {google.devtools.artifactregistry.v1.IVPCSCConfig=} [properties] Properties to set - */ - function VPCSCConfig(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]]; - } - - /** - * VPCSCConfig name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.VPCSCConfig - * @instance - */ - VPCSCConfig.prototype.name = ""; - - /** - * VPCSCConfig vpcscPolicy. - * @member {google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy} vpcscPolicy - * @memberof google.devtools.artifactregistry.v1.VPCSCConfig - * @instance - */ - VPCSCConfig.prototype.vpcscPolicy = 0; - - /** - * Creates a new VPCSCConfig instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.VPCSCConfig - * @static - * @param {google.devtools.artifactregistry.v1.IVPCSCConfig=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.VPCSCConfig} VPCSCConfig instance - */ - VPCSCConfig.create = function create(properties) { - return new VPCSCConfig(properties); - }; - - /** - * Encodes the specified VPCSCConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.VPCSCConfig.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.VPCSCConfig - * @static - * @param {google.devtools.artifactregistry.v1.IVPCSCConfig} message VPCSCConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VPCSCConfig.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.vpcscPolicy != null && Object.hasOwnProperty.call(message, "vpcscPolicy")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.vpcscPolicy); - return writer; - }; - - /** - * Encodes the specified VPCSCConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.VPCSCConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.VPCSCConfig - * @static - * @param {google.devtools.artifactregistry.v1.IVPCSCConfig} message VPCSCConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VPCSCConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VPCSCConfig message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.VPCSCConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.VPCSCConfig} VPCSCConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VPCSCConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.VPCSCConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.vpcscPolicy = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VPCSCConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.VPCSCConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.VPCSCConfig} VPCSCConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VPCSCConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VPCSCConfig message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.VPCSCConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VPCSCConfig.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.vpcscPolicy != null && message.hasOwnProperty("vpcscPolicy")) - switch (message.vpcscPolicy) { - default: - return "vpcscPolicy: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a VPCSCConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.VPCSCConfig - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.VPCSCConfig} VPCSCConfig - */ - VPCSCConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.VPCSCConfig) - return object; - var message = new $root.google.devtools.artifactregistry.v1.VPCSCConfig(); - if (object.name != null) - message.name = String(object.name); - switch (object.vpcscPolicy) { - default: - if (typeof object.vpcscPolicy === "number") { - message.vpcscPolicy = object.vpcscPolicy; - break; - } - break; - case "VPCSC_POLICY_UNSPECIFIED": - case 0: - message.vpcscPolicy = 0; - break; - case "DENY": - case 1: - message.vpcscPolicy = 1; - break; - case "ALLOW": - case 2: - message.vpcscPolicy = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a VPCSCConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.VPCSCConfig - * @static - * @param {google.devtools.artifactregistry.v1.VPCSCConfig} message VPCSCConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VPCSCConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.vpcscPolicy = options.enums === String ? "VPCSC_POLICY_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.vpcscPolicy != null && message.hasOwnProperty("vpcscPolicy")) - object.vpcscPolicy = options.enums === String ? $root.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy[message.vpcscPolicy] === undefined ? message.vpcscPolicy : $root.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy[message.vpcscPolicy] : message.vpcscPolicy; - return object; - }; - - /** - * Converts this VPCSCConfig to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.VPCSCConfig - * @instance - * @returns {Object.} JSON object - */ - VPCSCConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VPCSCConfig - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.VPCSCConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VPCSCConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.VPCSCConfig"; - }; - - /** - * VPCSCPolicy enum. - * @name google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy - * @enum {number} - * @property {number} VPCSC_POLICY_UNSPECIFIED=0 VPCSC_POLICY_UNSPECIFIED value - * @property {number} DENY=1 DENY value - * @property {number} ALLOW=2 ALLOW value - */ - VPCSCConfig.VPCSCPolicy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VPCSC_POLICY_UNSPECIFIED"] = 0; - values[valuesById[1] = "DENY"] = 1; - values[valuesById[2] = "ALLOW"] = 2; - return values; - })(); - - return VPCSCConfig; - })(); - - v1.GetVPCSCConfigRequest = (function() { - - /** - * Properties of a GetVPCSCConfigRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IGetVPCSCConfigRequest - * @property {string|null} [name] GetVPCSCConfigRequest name - */ - - /** - * Constructs a new GetVPCSCConfigRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GetVPCSCConfigRequest. - * @implements IGetVPCSCConfigRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest=} [properties] Properties to set - */ - function GetVPCSCConfigRequest(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]]; - } - - /** - * GetVPCSCConfigRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest - * @instance - */ - GetVPCSCConfigRequest.prototype.name = ""; - - /** - * Creates a new GetVPCSCConfigRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GetVPCSCConfigRequest} GetVPCSCConfigRequest instance - */ - GetVPCSCConfigRequest.create = function create(properties) { - return new GetVPCSCConfigRequest(properties); - }; - - /** - * Encodes the specified GetVPCSCConfigRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest} message GetVPCSCConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVPCSCConfigRequest.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 GetVPCSCConfigRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVPCSCConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest - * @static - * @param {google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest} message GetVPCSCConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVPCSCConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetVPCSCConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GetVPCSCConfigRequest} GetVPCSCConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVPCSCConfigRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetVPCSCConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GetVPCSCConfigRequest} GetVPCSCConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVPCSCConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetVPCSCConfigRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetVPCSCConfigRequest.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 GetVPCSCConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GetVPCSCConfigRequest} GetVPCSCConfigRequest - */ - GetVPCSCConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetVPCSCConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest - * @static - * @param {google.devtools.artifactregistry.v1.GetVPCSCConfigRequest} message GetVPCSCConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetVPCSCConfigRequest.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 GetVPCSCConfigRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest - * @instance - * @returns {Object.} JSON object - */ - GetVPCSCConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetVPCSCConfigRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.GetVPCSCConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetVPCSCConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.GetVPCSCConfigRequest"; - }; - - return GetVPCSCConfigRequest; - })(); - - v1.UpdateVPCSCConfigRequest = (function() { - - /** - * Properties of an UpdateVPCSCConfigRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IUpdateVPCSCConfigRequest - * @property {google.devtools.artifactregistry.v1.IVPCSCConfig|null} [vpcscConfig] UpdateVPCSCConfigRequest vpcscConfig - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVPCSCConfigRequest updateMask - */ - - /** - * Constructs a new UpdateVPCSCConfigRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an UpdateVPCSCConfigRequest. - * @implements IUpdateVPCSCConfigRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest=} [properties] Properties to set - */ - function UpdateVPCSCConfigRequest(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]]; - } - - /** - * UpdateVPCSCConfigRequest vpcscConfig. - * @member {google.devtools.artifactregistry.v1.IVPCSCConfig|null|undefined} vpcscConfig - * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest - * @instance - */ - UpdateVPCSCConfigRequest.prototype.vpcscConfig = null; - - /** - * UpdateVPCSCConfigRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest - * @instance - */ - UpdateVPCSCConfigRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateVPCSCConfigRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest} UpdateVPCSCConfigRequest instance - */ - UpdateVPCSCConfigRequest.create = function create(properties) { - return new UpdateVPCSCConfigRequest(properties); - }; - - /** - * Encodes the specified UpdateVPCSCConfigRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest} message UpdateVPCSCConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateVPCSCConfigRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.vpcscConfig != null && Object.hasOwnProperty.call(message, "vpcscConfig")) - $root.google.devtools.artifactregistry.v1.VPCSCConfig.encode(message.vpcscConfig, 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 UpdateVPCSCConfigRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest - * @static - * @param {google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest} message UpdateVPCSCConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateVPCSCConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateVPCSCConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest} UpdateVPCSCConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateVPCSCConfigRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.vpcscConfig = $root.google.devtools.artifactregistry.v1.VPCSCConfig.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 UpdateVPCSCConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest} UpdateVPCSCConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateVPCSCConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateVPCSCConfigRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateVPCSCConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.vpcscConfig != null && message.hasOwnProperty("vpcscConfig")) { - var error = $root.google.devtools.artifactregistry.v1.VPCSCConfig.verify(message.vpcscConfig); - if (error) - return "vpcscConfig." + 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 UpdateVPCSCConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest} UpdateVPCSCConfigRequest - */ - UpdateVPCSCConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest(); - if (object.vpcscConfig != null) { - if (typeof object.vpcscConfig !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.vpcscConfig: object expected"); - message.vpcscConfig = $root.google.devtools.artifactregistry.v1.VPCSCConfig.fromObject(object.vpcscConfig); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateVPCSCConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest - * @static - * @param {google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest} message UpdateVPCSCConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateVPCSCConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.vpcscConfig = null; - object.updateMask = null; - } - if (message.vpcscConfig != null && message.hasOwnProperty("vpcscConfig")) - object.vpcscConfig = $root.google.devtools.artifactregistry.v1.VPCSCConfig.toObject(message.vpcscConfig, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateVPCSCConfigRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateVPCSCConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateVPCSCConfigRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateVPCSCConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest"; - }; - - return UpdateVPCSCConfigRequest; - })(); - - v1.YumArtifact = (function() { - - /** - * Properties of a YumArtifact. - * @memberof google.devtools.artifactregistry.v1 - * @interface IYumArtifact - * @property {string|null} [name] YumArtifact name - * @property {string|null} [packageName] YumArtifact packageName - * @property {google.devtools.artifactregistry.v1.YumArtifact.PackageType|null} [packageType] YumArtifact packageType - * @property {string|null} [architecture] YumArtifact architecture - */ - - /** - * Constructs a new YumArtifact. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a YumArtifact. - * @implements IYumArtifact - * @constructor - * @param {google.devtools.artifactregistry.v1.IYumArtifact=} [properties] Properties to set - */ - function YumArtifact(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * YumArtifact name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.YumArtifact - * @instance - */ - YumArtifact.prototype.name = ""; - - /** - * YumArtifact packageName. - * @member {string} packageName - * @memberof google.devtools.artifactregistry.v1.YumArtifact - * @instance - */ - YumArtifact.prototype.packageName = ""; - - /** - * YumArtifact packageType. - * @member {google.devtools.artifactregistry.v1.YumArtifact.PackageType} packageType - * @memberof google.devtools.artifactregistry.v1.YumArtifact - * @instance - */ - YumArtifact.prototype.packageType = 0; - - /** - * YumArtifact architecture. - * @member {string} architecture - * @memberof google.devtools.artifactregistry.v1.YumArtifact - * @instance - */ - YumArtifact.prototype.architecture = ""; - - /** - * Creates a new YumArtifact instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.YumArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IYumArtifact=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.YumArtifact} YumArtifact instance - */ - YumArtifact.create = function create(properties) { - return new YumArtifact(properties); - }; - - /** - * Encodes the specified YumArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.YumArtifact.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.YumArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IYumArtifact} message YumArtifact message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - YumArtifact.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.packageName); - if (message.packageType != null && Object.hasOwnProperty.call(message, "packageType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.packageType); - if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.architecture); - return writer; - }; - - /** - * Encodes the specified YumArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.YumArtifact.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.YumArtifact - * @static - * @param {google.devtools.artifactregistry.v1.IYumArtifact} message YumArtifact message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - YumArtifact.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a YumArtifact message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.YumArtifact - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.YumArtifact} YumArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - YumArtifact.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.YumArtifact(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.packageName = reader.string(); - break; - } - case 3: { - message.packageType = reader.int32(); - break; - } - case 4: { - message.architecture = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a YumArtifact message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.YumArtifact - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.YumArtifact} YumArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - YumArtifact.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a YumArtifact message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.YumArtifact - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - YumArtifact.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.packageName != null && message.hasOwnProperty("packageName")) - if (!$util.isString(message.packageName)) - return "packageName: string expected"; - if (message.packageType != null && message.hasOwnProperty("packageType")) - switch (message.packageType) { - default: - return "packageType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.architecture != null && message.hasOwnProperty("architecture")) - if (!$util.isString(message.architecture)) - return "architecture: string expected"; - return null; - }; - - /** - * Creates a YumArtifact message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.YumArtifact - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.YumArtifact} YumArtifact - */ - YumArtifact.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.YumArtifact) - return object; - var message = new $root.google.devtools.artifactregistry.v1.YumArtifact(); - if (object.name != null) - message.name = String(object.name); - if (object.packageName != null) - message.packageName = String(object.packageName); - switch (object.packageType) { - default: - if (typeof object.packageType === "number") { - message.packageType = object.packageType; - break; - } - break; - case "PACKAGE_TYPE_UNSPECIFIED": - case 0: - message.packageType = 0; - break; - case "BINARY": - case 1: - message.packageType = 1; - break; - case "SOURCE": - case 2: - message.packageType = 2; - break; - } - if (object.architecture != null) - message.architecture = String(object.architecture); - return message; - }; - - /** - * Creates a plain object from a YumArtifact message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.YumArtifact - * @static - * @param {google.devtools.artifactregistry.v1.YumArtifact} message YumArtifact - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - YumArtifact.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.packageName = ""; - object.packageType = options.enums === String ? "PACKAGE_TYPE_UNSPECIFIED" : 0; - object.architecture = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.packageName != null && message.hasOwnProperty("packageName")) - object.packageName = message.packageName; - if (message.packageType != null && message.hasOwnProperty("packageType")) - object.packageType = options.enums === String ? $root.google.devtools.artifactregistry.v1.YumArtifact.PackageType[message.packageType] === undefined ? message.packageType : $root.google.devtools.artifactregistry.v1.YumArtifact.PackageType[message.packageType] : message.packageType; - if (message.architecture != null && message.hasOwnProperty("architecture")) - object.architecture = message.architecture; - return object; - }; - - /** - * Converts this YumArtifact to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.YumArtifact - * @instance - * @returns {Object.} JSON object - */ - YumArtifact.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for YumArtifact - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.YumArtifact - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - YumArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.YumArtifact"; - }; - - /** - * PackageType enum. - * @name google.devtools.artifactregistry.v1.YumArtifact.PackageType - * @enum {number} - * @property {number} PACKAGE_TYPE_UNSPECIFIED=0 PACKAGE_TYPE_UNSPECIFIED value - * @property {number} BINARY=1 BINARY value - * @property {number} SOURCE=2 SOURCE value - */ - YumArtifact.PackageType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PACKAGE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BINARY"] = 1; - values[valuesById[2] = "SOURCE"] = 2; - return values; - })(); - - return YumArtifact; - })(); - - v1.ImportYumArtifactsGcsSource = (function() { - - /** - * Properties of an ImportYumArtifactsGcsSource. - * @memberof google.devtools.artifactregistry.v1 - * @interface IImportYumArtifactsGcsSource - * @property {Array.|null} [uris] ImportYumArtifactsGcsSource uris - * @property {boolean|null} [useWildcards] ImportYumArtifactsGcsSource useWildcards - */ - - /** - * Constructs a new ImportYumArtifactsGcsSource. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ImportYumArtifactsGcsSource. - * @implements IImportYumArtifactsGcsSource - * @constructor - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource=} [properties] Properties to set - */ - function ImportYumArtifactsGcsSource(properties) { - this.uris = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportYumArtifactsGcsSource uris. - * @member {Array.} uris - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource - * @instance - */ - ImportYumArtifactsGcsSource.prototype.uris = $util.emptyArray; - - /** - * ImportYumArtifactsGcsSource useWildcards. - * @member {boolean} useWildcards - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource - * @instance - */ - ImportYumArtifactsGcsSource.prototype.useWildcards = false; - - /** - * Creates a new ImportYumArtifactsGcsSource instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} ImportYumArtifactsGcsSource instance - */ - ImportYumArtifactsGcsSource.create = function create(properties) { - return new ImportYumArtifactsGcsSource(properties); - }; - - /** - * Encodes the specified ImportYumArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource} message ImportYumArtifactsGcsSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportYumArtifactsGcsSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uris != null && message.uris.length) - for (var i = 0; i < message.uris.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uris[i]); - if (message.useWildcards != null && Object.hasOwnProperty.call(message, "useWildcards")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.useWildcards); - return writer; - }; - - /** - * Encodes the specified ImportYumArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource} message ImportYumArtifactsGcsSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportYumArtifactsGcsSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} ImportYumArtifactsGcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportYumArtifactsGcsSource.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.uris && message.uris.length)) - message.uris = []; - message.uris.push(reader.string()); - break; - } - case 2: { - message.useWildcards = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} ImportYumArtifactsGcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportYumArtifactsGcsSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportYumArtifactsGcsSource message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportYumArtifactsGcsSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uris != null && message.hasOwnProperty("uris")) { - if (!Array.isArray(message.uris)) - return "uris: array expected"; - for (var i = 0; i < message.uris.length; ++i) - if (!$util.isString(message.uris[i])) - return "uris: string[] expected"; - } - if (message.useWildcards != null && message.hasOwnProperty("useWildcards")) - if (typeof message.useWildcards !== "boolean") - return "useWildcards: boolean expected"; - return null; - }; - - /** - * Creates an ImportYumArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} ImportYumArtifactsGcsSource - */ - ImportYumArtifactsGcsSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource(); - if (object.uris) { - if (!Array.isArray(object.uris)) - throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.uris: array expected"); - message.uris = []; - for (var i = 0; i < object.uris.length; ++i) - message.uris[i] = String(object.uris[i]); - } - if (object.useWildcards != null) - message.useWildcards = Boolean(object.useWildcards); - return message; - }; - - /** - * Creates a plain object from an ImportYumArtifactsGcsSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource - * @static - * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} message ImportYumArtifactsGcsSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportYumArtifactsGcsSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uris = []; - if (options.defaults) - object.useWildcards = false; - if (message.uris && message.uris.length) { - object.uris = []; - for (var j = 0; j < message.uris.length; ++j) - object.uris[j] = message.uris[j]; - } - if (message.useWildcards != null && message.hasOwnProperty("useWildcards")) - object.useWildcards = message.useWildcards; - return object; - }; - - /** - * Converts this ImportYumArtifactsGcsSource to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource - * @instance - * @returns {Object.} JSON object - */ - ImportYumArtifactsGcsSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportYumArtifactsGcsSource - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportYumArtifactsGcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource"; - }; - - return ImportYumArtifactsGcsSource; - })(); - - v1.ImportYumArtifactsRequest = (function() { - - /** - * Properties of an ImportYumArtifactsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @interface IImportYumArtifactsRequest - * @property {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null} [gcsSource] ImportYumArtifactsRequest gcsSource - * @property {string|null} [parent] ImportYumArtifactsRequest parent - */ - - /** - * Constructs a new ImportYumArtifactsRequest. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ImportYumArtifactsRequest. - * @implements IImportYumArtifactsRequest - * @constructor - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest=} [properties] Properties to set - */ - function ImportYumArtifactsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportYumArtifactsRequest gcsSource. - * @member {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null|undefined} gcsSource - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest - * @instance - */ - ImportYumArtifactsRequest.prototype.gcsSource = null; - - /** - * ImportYumArtifactsRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest - * @instance - */ - ImportYumArtifactsRequest.prototype.parent = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ImportYumArtifactsRequest source. - * @member {"gcsSource"|undefined} source - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest - * @instance - */ - Object.defineProperty(ImportYumArtifactsRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ImportYumArtifactsRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} ImportYumArtifactsRequest instance - */ - ImportYumArtifactsRequest.create = function create(properties) { - return new ImportYumArtifactsRequest(properties); - }; - - /** - * Encodes the specified ImportYumArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest} message ImportYumArtifactsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportYumArtifactsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) - $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.encode(message.gcsSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ImportYumArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest} message ImportYumArtifactsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportYumArtifactsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} ImportYumArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportYumArtifactsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.decode(reader, reader.uint32()); - break; - } - case 1: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} ImportYumArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportYumArtifactsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportYumArtifactsRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportYumArtifactsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - properties.source = 1; - { - var error = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } - } - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates an ImportYumArtifactsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} ImportYumArtifactsRequest - */ - ImportYumArtifactsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest(); - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.gcsSource: object expected"); - message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.fromObject(object.gcsSource); - } - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from an ImportYumArtifactsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest - * @static - * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} message ImportYumArtifactsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportYumArtifactsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; - } - return object; - }; - - /** - * Converts this ImportYumArtifactsRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest - * @instance - * @returns {Object.} JSON object - */ - ImportYumArtifactsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportYumArtifactsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportYumArtifactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportYumArtifactsRequest"; - }; - - return ImportYumArtifactsRequest; - })(); - - v1.ImportYumArtifactsErrorInfo = (function() { - - /** - * Properties of an ImportYumArtifactsErrorInfo. - * @memberof google.devtools.artifactregistry.v1 - * @interface IImportYumArtifactsErrorInfo - * @property {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null} [gcsSource] ImportYumArtifactsErrorInfo gcsSource - * @property {google.rpc.IStatus|null} [error] ImportYumArtifactsErrorInfo error - */ - - /** - * Constructs a new ImportYumArtifactsErrorInfo. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ImportYumArtifactsErrorInfo. - * @implements IImportYumArtifactsErrorInfo - * @constructor - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo=} [properties] Properties to set - */ - function ImportYumArtifactsErrorInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportYumArtifactsErrorInfo gcsSource. - * @member {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null|undefined} gcsSource - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo - * @instance - */ - ImportYumArtifactsErrorInfo.prototype.gcsSource = null; - - /** - * ImportYumArtifactsErrorInfo error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo - * @instance - */ - ImportYumArtifactsErrorInfo.prototype.error = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ImportYumArtifactsErrorInfo source. - * @member {"gcsSource"|undefined} source - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo - * @instance - */ - Object.defineProperty(ImportYumArtifactsErrorInfo.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ImportYumArtifactsErrorInfo instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} ImportYumArtifactsErrorInfo instance - */ - ImportYumArtifactsErrorInfo.create = function create(properties) { - return new ImportYumArtifactsErrorInfo(properties); - }; - - /** - * Encodes the specified ImportYumArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo} message ImportYumArtifactsErrorInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportYumArtifactsErrorInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) - $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ImportYumArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo} message ImportYumArtifactsErrorInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportYumArtifactsErrorInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} ImportYumArtifactsErrorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportYumArtifactsErrorInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.decode(reader, reader.uint32()); - break; - } - case 2: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} ImportYumArtifactsErrorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportYumArtifactsErrorInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportYumArtifactsErrorInfo message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportYumArtifactsErrorInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - properties.source = 1; - { - var error = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - return null; - }; - - /** - * Creates an ImportYumArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} ImportYumArtifactsErrorInfo - */ - ImportYumArtifactsErrorInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo(); - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.gcsSource: object expected"); - message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.fromObject(object.gcsSource); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - return message; - }; - - /** - * Creates a plain object from an ImportYumArtifactsErrorInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo - * @static - * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} message ImportYumArtifactsErrorInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportYumArtifactsErrorInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.error = null; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; - } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - return object; - }; - - /** - * Converts this ImportYumArtifactsErrorInfo to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo - * @instance - * @returns {Object.} JSON object - */ - ImportYumArtifactsErrorInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportYumArtifactsErrorInfo - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportYumArtifactsErrorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo"; - }; - - return ImportYumArtifactsErrorInfo; - })(); - - v1.ImportYumArtifactsResponse = (function() { - - /** - * Properties of an ImportYumArtifactsResponse. - * @memberof google.devtools.artifactregistry.v1 - * @interface IImportYumArtifactsResponse - * @property {Array.|null} [yumArtifacts] ImportYumArtifactsResponse yumArtifacts - * @property {Array.|null} [errors] ImportYumArtifactsResponse errors - */ - - /** - * Constructs a new ImportYumArtifactsResponse. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ImportYumArtifactsResponse. - * @implements IImportYumArtifactsResponse - * @constructor - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsResponse=} [properties] Properties to set - */ - function ImportYumArtifactsResponse(properties) { - this.yumArtifacts = []; - this.errors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportYumArtifactsResponse yumArtifacts. - * @member {Array.} yumArtifacts - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse - * @instance - */ - ImportYumArtifactsResponse.prototype.yumArtifacts = $util.emptyArray; - - /** - * ImportYumArtifactsResponse errors. - * @member {Array.} errors - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse - * @instance - */ - ImportYumArtifactsResponse.prototype.errors = $util.emptyArray; - - /** - * Creates a new ImportYumArtifactsResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsResponse} ImportYumArtifactsResponse instance - */ - ImportYumArtifactsResponse.create = function create(properties) { - return new ImportYumArtifactsResponse(properties); - }; - - /** - * Encodes the specified ImportYumArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsResponse} message ImportYumArtifactsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportYumArtifactsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.yumArtifacts != null && message.yumArtifacts.length) - for (var i = 0; i < message.yumArtifacts.length; ++i) - $root.google.devtools.artifactregistry.v1.YumArtifact.encode(message.yumArtifacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ImportYumArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsResponse} message ImportYumArtifactsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportYumArtifactsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportYumArtifactsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsResponse} ImportYumArtifactsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportYumArtifactsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.yumArtifacts && message.yumArtifacts.length)) - message.yumArtifacts = []; - message.yumArtifacts.push($root.google.devtools.artifactregistry.v1.YumArtifact.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportYumArtifactsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsResponse} ImportYumArtifactsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportYumArtifactsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportYumArtifactsResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportYumArtifactsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.yumArtifacts != null && message.hasOwnProperty("yumArtifacts")) { - if (!Array.isArray(message.yumArtifacts)) - return "yumArtifacts: array expected"; - for (var i = 0; i < message.yumArtifacts.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.YumArtifact.verify(message.yumArtifacts[i]); - if (error) - return "yumArtifacts." + error; - } - } - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } - return null; - }; - - /** - * Creates an ImportYumArtifactsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsResponse} ImportYumArtifactsResponse - */ - ImportYumArtifactsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsResponse(); - if (object.yumArtifacts) { - if (!Array.isArray(object.yumArtifacts)) - throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.yumArtifacts: array expected"); - message.yumArtifacts = []; - for (var i = 0; i < object.yumArtifacts.length; ++i) { - if (typeof object.yumArtifacts[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.yumArtifacts: object expected"); - message.yumArtifacts[i] = $root.google.devtools.artifactregistry.v1.YumArtifact.fromObject(object.yumArtifacts[i]); - } - } - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.errors: object expected"); - message.errors[i] = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.fromObject(object.errors[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an ImportYumArtifactsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse - * @static - * @param {google.devtools.artifactregistry.v1.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.v1.YumArtifact.toObject(message.yumArtifacts[j], options); - } - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.toObject(message.errors[j], options); - } - return object; - }; - - /** - * Converts this ImportYumArtifactsResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse - * @instance - * @returns {Object.} JSON object - */ - ImportYumArtifactsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportYumArtifactsResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportYumArtifactsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportYumArtifactsResponse"; - }; - - return ImportYumArtifactsResponse; - })(); - - v1.ImportYumArtifactsMetadata = (function() { - - /** - * Properties of an ImportYumArtifactsMetadata. - * @memberof google.devtools.artifactregistry.v1 - * @interface IImportYumArtifactsMetadata - */ - - /** - * Constructs a new ImportYumArtifactsMetadata. - * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ImportYumArtifactsMetadata. - * @implements IImportYumArtifactsMetadata - * @constructor - * @param {google.devtools.artifactregistry.v1.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.v1.ImportYumArtifactsMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata instance - */ - ImportYumArtifactsMetadata.create = function create(properties) { - return new ImportYumArtifactsMetadata(properties); - }; - - /** - * Encodes the specified ImportYumArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata} message ImportYumArtifactsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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.v1.ImportYumArtifactsMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata - * @static - * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata} message ImportYumArtifactsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportYumArtifactsMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportYumArtifactsMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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.v1.ImportYumArtifactsMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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.v1.ImportYumArtifactsMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportYumArtifactsMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an ImportYumArtifactsMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata - */ - ImportYumArtifactsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata) - return object; - return new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata(); - }; - - /** - * Creates a plain object from an ImportYumArtifactsMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata - * @static - * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} message ImportYumArtifactsMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportYumArtifactsMetadata.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ImportYumArtifactsMetadata to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata - * @instance - * @returns {Object.} JSON object - */ - ImportYumArtifactsMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportYumArtifactsMetadata - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportYumArtifactsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata"; - }; - - return ImportYumArtifactsMetadata; - })(); - - return v1; - })(); - - artifactregistry.v1beta2 = (function() { - - /** - * Namespace v1beta2. - * @memberof google.devtools.artifactregistry - * @namespace - */ - var v1beta2 = {}; - - v1beta2.AptArtifact = (function() { - - /** - * Properties of an AptArtifact. - * @memberof google.devtools.artifactregistry.v1beta2 - * @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 AptArtifact. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents an AptArtifact. - * @implements IAptArtifact - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IAptArtifact=} [properties] Properties to set - */ - function AptArtifact(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]]; - } - - /** - * AptArtifact name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact - * @instance - */ - AptArtifact.prototype.name = ""; - - /** - * AptArtifact packageName. - * @member {string} packageName - * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact - * @instance - */ - AptArtifact.prototype.packageName = ""; - - /** - * 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.AptArtifact - * @static - * @param {google.devtools.artifactregistry.v1beta2.IAptArtifact=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.AptArtifact} AptArtifact instance - */ - AptArtifact.create = function create(properties) { - return new AptArtifact(properties); - }; - - /** - * Encodes the specified AptArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.AptArtifact.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact - * @static - * @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 - */ - AptArtifact.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.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 AptArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.AptArtifact.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact - * @static - * @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 - */ - AptArtifact.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AptArtifact message from the specified reader or buffer. - * @function decode - * @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.AptArtifact} AptArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AptArtifact.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - if (tag === error) - break; - 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; - } - case 5: { - message.component = reader.string(); - break; - } - case 6: { - message.controlFile = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AptArtifact message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - AptArtifact.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AptArtifact message. - * @function verify - * @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 - */ - AptArtifact.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.packageName != null && message.hasOwnProperty("packageName")) - if (!$util.isString(message.packageName)) - return "packageName: string expected"; - if (message.packageType != null && message.hasOwnProperty("packageType")) - switch (message.packageType) { - default: - return "packageType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.architecture != null && message.hasOwnProperty("architecture")) - if (!$util.isString(message.architecture)) - return "architecture: string expected"; - if (message.component != null && message.hasOwnProperty("component")) - if (!$util.isString(message.component)) - return "component: string expected"; - if (message.controlFile != null && message.hasOwnProperty("controlFile")) - if (!(message.controlFile && typeof message.controlFile.length === "number" || $util.isString(message.controlFile))) - return "controlFile: buffer expected"; - return null; - }; - - /** - * Creates an AptArtifact message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.AptArtifact} AptArtifact - */ - AptArtifact.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.AptArtifact) - return object; - 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) { - default: - if (typeof object.packageType === "number") { - message.packageType = object.packageType; - break; - } - break; - case "PACKAGE_TYPE_UNSPECIFIED": - case 0: - message.packageType = 0; - break; - case "BINARY": - case 1: - message.packageType = 1; - break; - case "SOURCE": - case 2: - message.packageType = 2; - break; - } - if (object.architecture != null) - message.architecture = String(object.architecture); - if (object.component != null) - message.component = String(object.component); - if (object.controlFile != null) - if (typeof object.controlFile === "string") - $util.base64.decode(object.controlFile, message.controlFile = $util.newBuffer($util.base64.length(object.controlFile)), 0); - else if (object.controlFile.length >= 0) - message.controlFile = object.controlFile; - return message; - }; - - /** - * Creates a plain object from an AptArtifact message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact - * @static - * @param {google.devtools.artifactregistry.v1beta2.AptArtifact} message AptArtifact - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AptArtifact.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 = ""; - object.component = ""; - if (options.bytes === String) - object.controlFile = ""; - else { - object.controlFile = []; - if (options.bytes !== Array) - object.controlFile = $util.newBuffer(object.controlFile); - } - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.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] === undefined ? message.packageType : $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 AptArtifact to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact - * @instance - * @returns {Object.} JSON object - */ - AptArtifact.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AptArtifact - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AptArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.AptArtifact"; - }; - - /** - * PackageType enum. - * @name google.devtools.artifactregistry.v1beta2.AptArtifact.PackageType - * @enum {number} - * @property {number} PACKAGE_TYPE_UNSPECIFIED=0 PACKAGE_TYPE_UNSPECIFIED value - * @property {number} BINARY=1 BINARY value - * @property {number} SOURCE=2 SOURCE value - */ - AptArtifact.PackageType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PACKAGE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BINARY"] = 1; - values[valuesById[2] = "SOURCE"] = 2; - return values; - })(); - - return AptArtifact; - })(); - - v1beta2.ImportAptArtifactsGcsSource = (function() { - - /** - * Properties of an ImportAptArtifactsGcsSource. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IImportAptArtifactsGcsSource - * @property {Array.|null} [uris] ImportAptArtifactsGcsSource uris - * @property {boolean|null} [useWildcards] ImportAptArtifactsGcsSource useWildcards - */ - - /** - * Constructs a new ImportAptArtifactsGcsSource. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents an ImportAptArtifactsGcsSource. - * @implements IImportAptArtifactsGcsSource - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource=} [properties] Properties to set - */ - function ImportAptArtifactsGcsSource(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]]; - } - - /** - * ImportAptArtifactsGcsSource uris. - * @member {Array.} uris - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource - * @instance - */ - ImportAptArtifactsGcsSource.prototype.uris = $util.emptyArray; - - /** - * ImportAptArtifactsGcsSource useWildcards. - * @member {boolean} useWildcards - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource - * @instance - */ - ImportAptArtifactsGcsSource.prototype.useWildcards = false; - - /** - * Creates a new ImportAptArtifactsGcsSource instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource - * @static - * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource instance - */ - ImportAptArtifactsGcsSource.create = function create(properties) { - return new ImportAptArtifactsGcsSource(properties); - }; - - /** - * Encodes the specified ImportAptArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource - * @static - * @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 - */ - ImportAptArtifactsGcsSource.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 ImportAptArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource - * @static - * @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 - */ - ImportAptArtifactsGcsSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportAptArtifactsGcsSource message from the specified reader or buffer. - * @function decode - * @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.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsGcsSource.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - if (tag === error) - break; - 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 ImportAptArtifactsGcsSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - ImportAptArtifactsGcsSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportAptArtifactsGcsSource message. - * @function verify - * @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 - */ - ImportAptArtifactsGcsSource.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 ImportAptArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource - */ - ImportAptArtifactsGcsSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource) - return object; - 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.useWildcards != null) - message.useWildcards = Boolean(object.useWildcards); - return message; - }; - - /** - * Creates a plain object from an ImportAptArtifactsGcsSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource - * @static - * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource} message ImportAptArtifactsGcsSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportAptArtifactsGcsSource.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 ImportAptArtifactsGcsSource to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource - * @instance - * @returns {Object.} JSON object - */ - ImportAptArtifactsGcsSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportAptArtifactsGcsSource - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportAptArtifactsGcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource"; - }; - - return ImportAptArtifactsGcsSource; - })(); - - v1beta2.ImportAptArtifactsRequest = (function() { - - /** - * Properties of an ImportAptArtifactsRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IImportAptArtifactsRequest - * @property {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null} [gcsSource] ImportAptArtifactsRequest gcsSource - * @property {string|null} [parent] ImportAptArtifactsRequest parent - */ - - /** - * Constructs a new ImportAptArtifactsRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents an ImportAptArtifactsRequest. - * @implements IImportAptArtifactsRequest - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest=} [properties] Properties to set - */ - function ImportAptArtifactsRequest(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]]; - } - - /** - * ImportAptArtifactsRequest gcsSource. - * @member {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null|undefined} gcsSource - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest - * @instance - */ - ImportAptArtifactsRequest.prototype.gcsSource = null; - - /** - * ImportAptArtifactsRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest - * @instance - */ - ImportAptArtifactsRequest.prototype.parent = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ImportAptArtifactsRequest source. - * @member {"gcsSource"|undefined} source - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest - * @instance - */ - Object.defineProperty(ImportAptArtifactsRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ImportAptArtifactsRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest} ImportAptArtifactsRequest instance - */ - ImportAptArtifactsRequest.create = function create(properties) { - return new ImportAptArtifactsRequest(properties); - }; - - /** - * Encodes the specified ImportAptArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest - * @static - * @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 - */ - 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.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 ImportAptArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest - * @static - * @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 - */ - ImportAptArtifactsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer. - * @function decode - * @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.ImportAptArtifactsRequest} ImportAptArtifactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.gcsSource = $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.decode(reader, reader.uint32()); - break; - } - case 1: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - ImportAptArtifactsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportAptArtifactsRequest message. - * @function verify - * @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 - */ - 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"; - return null; - }; - - /** - * Creates an ImportAptArtifactsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest} ImportAptArtifactsRequest - */ - ImportAptArtifactsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest) - return object; - 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); - return message; - }; - - /** - * Creates a plain object from an ImportAptArtifactsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest} message ImportAptArtifactsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportAptArtifactsRequest.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.ImportAptArtifactsGcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; - } - return object; - }; - - /** - * Converts this ImportAptArtifactsRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest - * @instance - * @returns {Object.} JSON object - */ - ImportAptArtifactsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportAptArtifactsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportAptArtifactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest"; - }; - - return ImportAptArtifactsRequest; - })(); - - v1beta2.ImportAptArtifactsErrorInfo = (function() { - - /** - * Properties of an ImportAptArtifactsErrorInfo. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IImportAptArtifactsErrorInfo - * @property {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null} [gcsSource] ImportAptArtifactsErrorInfo gcsSource - * @property {google.rpc.IStatus|null} [error] ImportAptArtifactsErrorInfo error - */ - - /** - * Constructs a new ImportAptArtifactsErrorInfo. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents an ImportAptArtifactsErrorInfo. - * @implements IImportAptArtifactsErrorInfo - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo=} [properties] Properties to set - */ - function ImportAptArtifactsErrorInfo(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]]; - } - - /** - * ImportAptArtifactsErrorInfo gcsSource. - * @member {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null|undefined} gcsSource - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo - * @instance - */ - ImportAptArtifactsErrorInfo.prototype.gcsSource = null; - - /** - * ImportAptArtifactsErrorInfo error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo - * @instance - */ - ImportAptArtifactsErrorInfo.prototype.error = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * 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.ImportAptArtifactsErrorInfo - * @static - * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo instance - */ - ImportAptArtifactsErrorInfo.create = function create(properties) { - return new ImportAptArtifactsErrorInfo(properties); - }; - - /** - * Encodes the specified ImportAptArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo - * @static - * @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 - */ - ImportAptArtifactsErrorInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - 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 ImportAptArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo - * @static - * @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 - */ - ImportAptArtifactsErrorInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportAptArtifactsErrorInfo message from the specified reader or buffer. - * @function decode - * @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.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsErrorInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.gcsSource = $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.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 ImportAptArtifactsErrorInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - ImportAptArtifactsErrorInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportAptArtifactsErrorInfo message. - * @function verify - * @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 - */ - ImportAptArtifactsErrorInfo.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.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - return null; - }; - - /** - * Creates an ImportAptArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo - */ - ImportAptArtifactsErrorInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo) - return object; - 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); - } - return message; - }; - - /** - * Creates a plain object from an ImportAptArtifactsErrorInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo - * @static - * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo} message ImportAptArtifactsErrorInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportAptArtifactsErrorInfo.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.ImportAptArtifactsGcsSource.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 ImportAptArtifactsErrorInfo to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo - * @instance - * @returns {Object.} JSON object - */ - ImportAptArtifactsErrorInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportAptArtifactsErrorInfo - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportAptArtifactsErrorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo"; - }; - - return ImportAptArtifactsErrorInfo; - })(); - - v1beta2.ImportAptArtifactsResponse = (function() { - - /** - * Properties of an ImportAptArtifactsResponse. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IImportAptArtifactsResponse - * @property {Array.|null} [aptArtifacts] ImportAptArtifactsResponse aptArtifacts - * @property {Array.|null} [errors] ImportAptArtifactsResponse errors - */ - - /** - * Constructs a new ImportAptArtifactsResponse. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents an ImportAptArtifactsResponse. - * @implements IImportAptArtifactsResponse - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse=} [properties] Properties to set - */ - 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportAptArtifactsResponse aptArtifacts. - * @member {Array.} aptArtifacts - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse - * @instance - */ - ImportAptArtifactsResponse.prototype.aptArtifacts = $util.emptyArray; - - /** - * 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.ImportAptArtifactsResponse - * @static - * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse} ImportAptArtifactsResponse instance - */ - ImportAptArtifactsResponse.create = function create(properties) { - return new ImportAptArtifactsResponse(properties); - }; - - /** - * Encodes the specified ImportAptArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse - * @static - * @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 - */ - ImportAptArtifactsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - 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 ImportAptArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse - * @static - * @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 - */ - ImportAptArtifactsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer. - * @function decode - * @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.ImportAptArtifactsResponse} ImportAptArtifactsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - 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); - break; - } - } - return message; - }; - - /** - * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - ImportAptArtifactsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportAptArtifactsResponse message. - * @function verify - * @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 - */ - ImportAptArtifactsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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 an ImportAptArtifactsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse} ImportAptArtifactsResponse - */ - ImportAptArtifactsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse) - return object; - 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 an ImportAptArtifactsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse - * @static - * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse} message ImportAptArtifactsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportAptArtifactsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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 ImportAptArtifactsResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse - * @instance - * @returns {Object.} JSON object - */ - ImportAptArtifactsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportAptArtifactsResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportAptArtifactsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse"; - }; - - return ImportAptArtifactsResponse; - })(); - - v1beta2.ImportAptArtifactsMetadata = (function() { - - /** - * Properties of an ImportAptArtifactsMetadata. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IImportAptArtifactsMetadata - */ - - /** - * Constructs a new ImportAptArtifactsMetadata. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents an ImportAptArtifactsMetadata. - * @implements IImportAptArtifactsMetadata - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata=} [properties] Properties to set - */ - function ImportAptArtifactsMetadata(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 ImportAptArtifactsMetadata instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata - * @static - * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata instance - */ - ImportAptArtifactsMetadata.create = function create(properties) { - return new ImportAptArtifactsMetadata(properties); - }; - - /** - * Encodes the specified ImportAptArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata - * @static - * @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 - */ - ImportAptArtifactsMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * 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.ImportAptArtifactsMetadata - * @static - * @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 - */ - ImportAptArtifactsMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer. - * @function decode - * @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.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportAptArtifactsMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - ImportAptArtifactsMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportAptArtifactsMetadata message. - * @function verify - * @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 - */ - ImportAptArtifactsMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an ImportAptArtifactsMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata - */ - ImportAptArtifactsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata) - return object; - return new $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata(); - }; - - /** - * Creates a plain object from an ImportAptArtifactsMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata - * @static - * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata} message ImportAptArtifactsMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportAptArtifactsMetadata.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ImportAptArtifactsMetadata to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata - * @instance - * @returns {Object.} JSON object - */ - ImportAptArtifactsMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportAptArtifactsMetadata - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportAptArtifactsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata"; - }; - - return ImportAptArtifactsMetadata; - })(); - - v1beta2.Hash = (function() { - - /** - * Properties of a Hash. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IHash - * @property {google.devtools.artifactregistry.v1beta2.Hash.HashType|null} [type] Hash type - * @property {Uint8Array|null} [value] Hash value - */ - - /** - * Constructs a new Hash. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a Hash. - * @implements IHash - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IHash=} [properties] Properties to set - */ - function Hash(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Hash type. - * @member {google.devtools.artifactregistry.v1beta2.Hash.HashType} type - * @memberof google.devtools.artifactregistry.v1beta2.Hash - * @instance - */ - Hash.prototype.type = 0; - - /** - * Hash value. - * @member {Uint8Array} value - * @memberof google.devtools.artifactregistry.v1beta2.Hash - * @instance - */ - Hash.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Hash instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.Hash - * @static - * @param {google.devtools.artifactregistry.v1beta2.IHash=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.Hash} Hash instance - */ - Hash.create = function create(properties) { - return new Hash(properties); - }; - - /** - * Encodes the specified Hash message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Hash.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.Hash - * @static - * @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 - */ - Hash.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Hash message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Hash.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Hash - * @static - * @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 - */ - Hash.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Hash message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.Hash} Hash - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Hash.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Hash message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Hash - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - Hash.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Hash message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.Hash - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Hash.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates a Hash message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.Hash - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.Hash} Hash - */ - Hash.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Hash) - return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.Hash(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - 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 >= 0) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from a Hash message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.Hash - * @static - * @param {google.devtools.artifactregistry.v1beta2.Hash} message Hash - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Hash.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "HASH_TYPE_UNSPECIFIED" : 0; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.devtools.artifactregistry.v1beta2.Hash.HashType[message.type] === undefined ? message.type : $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 Hash to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.Hash - * @instance - * @returns {Object.} JSON object - */ - Hash.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Hash - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.Hash - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Hash.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.Hash"; - }; - - /** - * 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 IFile - * @property {string|null} [name] File name - * @property {number|Long|null} [sizeBytes] File sizeBytes - * @property {Array.|null} [hashes] File hashes - * @property {google.protobuf.ITimestamp|null} [createTime] File createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] File updateTime - * @property {string|null} [owner] File owner - */ - - /** - * Constructs a new File. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a File. - * @implements IFile - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IFile=} [properties] Properties to set - */ - function File(properties) { - this.hashes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * File name. - * @member {string} name - * @memberof google.devtools.artifactregistry.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 - * @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.File - * @static - * @param {google.devtools.artifactregistry.v1beta2.IFile=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.File} File instance - */ - File.create = function create(properties) { - return new File(properties); - }; - - /** - * Encodes the specified File message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.File.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.File - * @static - * @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 - */ - File.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.sizeBytes); - if (message.hashes != null && message.hashes.length) - for (var i = 0; i < message.hashes.length; ++i) - $root.google.devtools.artifactregistry.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 File message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.File.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.File - * @static - * @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 - */ - File.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a File message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.File} File - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - File.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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()); - break; - } - case 7: { - message.owner = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a File message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.File - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - File.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a File message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.File - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - File.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high))) - return "sizeBytes: integer|Long expected"; - if (message.hashes != null && message.hasOwnProperty("hashes")) { - if (!Array.isArray(message.hashes)) - return "hashes: array expected"; - for (var i = 0; i < message.hashes.length; ++i) { - var error = $root.google.devtools.artifactregistry.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.owner != null && message.hasOwnProperty("owner")) - if (!$util.isString(message.owner)) - return "owner: string expected"; - return null; - }; - - /** - * Creates a File message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.File - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.File} File - */ - File.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.File) - 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); - } - 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 File message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.File - * @static - * @param {google.devtools.artifactregistry.v1beta2.File} message File - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - File.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.hashes = []; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sizeBytes = options.longs === String ? "0" : 0; - object.createTime = null; - object.updateTime = null; - object.owner = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - if (typeof message.sizeBytes === "number") - object.sizeBytes = options.longs === String ? String(message.sizeBytes) : message.sizeBytes; - else - object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; - if (message.hashes && message.hashes.length) { - object.hashes = []; - for (var j = 0; j < message.hashes.length; ++j) - object.hashes[j] = $root.google.devtools.artifactregistry.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 File to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.File - * @instance - * @returns {Object.} JSON object - */ - File.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for File - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.File - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - File.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.File"; - }; - - return File; - })(); - - v1beta2.ListFilesRequest = (function() { - - /** - * Properties of a ListFilesRequest. - * @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 - */ - - /** - * Constructs a new ListFilesRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ListFilesRequest. - * @implements IListFilesRequest - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest=} [properties] Properties to set - */ - function ListFilesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFilesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest - * @instance - */ - ListFilesRequest.prototype.parent = ""; - - /** - * 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.ListFilesRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ListFilesRequest} ListFilesRequest instance - */ - ListFilesRequest.create = function create(properties) { - return new ListFilesRequest(properties); - }; - - /** - * Encodes the specified ListFilesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest - * @static - * @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 - */ - ListFilesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - return writer; - }; - - /** - * 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.ListFilesRequest - * @static - * @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 - */ - ListFilesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFilesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.ListFilesRequest} ListFilesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFilesRequest.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListFilesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - ListFilesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFilesRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFilesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListFilesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ListFilesRequest} ListFilesRequest - */ - ListFilesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListFilesRequest) - return object; - 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 ListFilesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.ListFilesRequest} message ListFilesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFilesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - 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 ListFilesRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest - * @instance - * @returns {Object.} JSON object - */ - ListFilesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListFilesRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListFilesRequest"; - }; - - return ListFilesRequest; - })(); - - v1beta2.ListFilesResponse = (function() { - - /** - * Properties of a ListFilesResponse. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IListFilesResponse - * @property {Array.|null} [files] ListFilesResponse files - * @property {string|null} [nextPageToken] ListFilesResponse nextPageToken - */ - - /** - * Constructs a new ListFilesResponse. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ListFilesResponse. - * @implements IListFilesResponse - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IListFilesResponse=} [properties] Properties to set - */ - function ListFilesResponse(properties) { - this.files = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFilesResponse files. - * @member {Array.} files - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse - * @instance - */ - ListFilesResponse.prototype.files = $util.emptyArray; - - /** - * 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.ListFilesResponse - * @static - * @param {google.devtools.artifactregistry.v1beta2.IListFilesResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ListFilesResponse} ListFilesResponse instance - */ - ListFilesResponse.create = function create(properties) { - return new ListFilesResponse(properties); - }; - - /** - * Encodes the specified ListFilesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse - * @static - * @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 - */ - ListFilesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.files != null && message.files.length) - for (var i = 0; i < message.files.length; ++i) - $root.google.devtools.artifactregistry.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 ListFilesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse - * @static - * @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 - */ - ListFilesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFilesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.ListFilesResponse} ListFilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFilesResponse.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListFilesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - ListFilesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFilesResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFilesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.files != null && message.hasOwnProperty("files")) { - if (!Array.isArray(message.files)) - return "files: array expected"; - for (var i = 0; i < message.files.length; ++i) { - var error = $root.google.devtools.artifactregistry.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 ListFilesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ListFilesResponse} ListFilesResponse - */ - ListFilesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListFilesResponse) - 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]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListFilesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse - * @static - * @param {google.devtools.artifactregistry.v1beta2.ListFilesResponse} message ListFilesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFilesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.files = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.files && message.files.length) { - object.files = []; - for (var j = 0; j < message.files.length; ++j) - object.files[j] = $root.google.devtools.artifactregistry.v1beta2.File.toObject(message.files[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListFilesResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse - * @instance - * @returns {Object.} JSON object - */ - ListFilesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListFilesResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListFilesResponse"; - }; - - return ListFilesResponse; - })(); - - v1beta2.GetFileRequest = (function() { - - /** - * Properties of a GetFileRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IGetFileRequest - * @property {string|null} [name] GetFileRequest name - */ - - /** - * Constructs a new GetFileRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a GetFileRequest. - * @implements IGetFileRequest - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IGetFileRequest=} [properties] Properties to set - */ - function GetFileRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetFileRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest - * @instance - */ - GetFileRequest.prototype.name = ""; - - /** - * 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 - */ - GetFileRequest.create = function create(properties) { - return new GetFileRequest(properties); - }; - - /** - * 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 - */ - GetFileRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.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 - */ - GetFileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetFileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.GetFileRequest} GetFileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetFileRequest.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetFileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - GetFileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetFileRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetFileRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetFileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.GetFileRequest} GetFileRequest - */ - GetFileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetFileRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.GetFileRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetFileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.GetFileRequest} message GetFileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetFileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetFileRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest - * @instance - * @returns {Object.} JSON object - */ - GetFileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetFileRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.GetFileRequest"; - }; - - return GetFileRequest; - })(); - - v1beta2.Package = (function() { - - /** - * Properties of a Package. - * @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 - */ - - /** - * Constructs a new Package. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a Package. - * @implements IPackage - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IPackage=} [properties] Properties to set - */ - function Package(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Package name. - * @member {string} name - * @memberof google.devtools.artifactregistry.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. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.Package - * @static - * @param {google.devtools.artifactregistry.v1beta2.IPackage=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.Package} Package instance - */ - Package.create = function create(properties) { - return new Package(properties); - }; - - /** - * Encodes the specified Package message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Package.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.Package - * @static - * @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 - */ - Package.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Package message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Package.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Package - * @static - * @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 - */ - Package.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Package message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.Package} Package - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Package.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Package message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Package - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - Package.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Package message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.Package - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Package.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - return null; - }; - - /** - * Creates a Package message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.Package - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.Package} Package - */ - Package.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Package) - 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; - }; - - /** - * Creates a plain object from a Package message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.Package - * @static - * @param {google.devtools.artifactregistry.v1beta2.Package} message Package - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Package.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.createTime = null; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - return object; - }; - - /** - * Converts this Package to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.Package - * @instance - * @returns {Object.} JSON object - */ - Package.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Package - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.Package - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Package.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.Package"; - }; - - return Package; - })(); - - v1beta2.ListPackagesRequest = (function() { - - /** - * Properties of a ListPackagesRequest. - * @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 - */ - - /** - * Constructs a new ListPackagesRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ListPackagesRequest. - * @implements IListPackagesRequest - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest=} [properties] Properties to set - */ - function ListPackagesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPackagesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest - * @instance - */ - ListPackagesRequest.prototype.parent = ""; - - /** - * ListPackagesRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest - * @instance - */ - ListPackagesRequest.prototype.pageSize = 0; - - /** - * 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.ListPackagesRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} ListPackagesRequest instance - */ - ListPackagesRequest.create = function create(properties) { - return new ListPackagesRequest(properties); - }; - - /** - * Encodes the specified ListPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest - * @static - * @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 - */ - ListPackagesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest - * @static - * @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 - */ - ListPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPackagesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.ListPackagesRequest} ListPackagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPackagesRequest.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPackagesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - ListPackagesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPackagesRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPackagesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListPackagesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} ListPackagesRequest - */ - ListPackagesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListPackagesRequest) - 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); - return message; - }; - - /** - * Creates a plain object from a ListPackagesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} message ListPackagesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPackagesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListPackagesRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest - * @instance - * @returns {Object.} JSON object - */ - ListPackagesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPackagesRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPackagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListPackagesRequest"; - }; - - return ListPackagesRequest; - })(); - - v1beta2.ListPackagesResponse = (function() { - - /** - * Properties of a ListPackagesResponse. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IListPackagesResponse - * @property {Array.|null} [packages] ListPackagesResponse packages - * @property {string|null} [nextPageToken] ListPackagesResponse nextPageToken - */ - - /** - * Constructs a new ListPackagesResponse. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ListPackagesResponse. - * @implements IListPackagesResponse - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IListPackagesResponse=} [properties] Properties to set - */ - function ListPackagesResponse(properties) { - this.packages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPackagesResponse packages. - * @member {Array.} packages - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse - * @instance - */ - ListPackagesResponse.prototype.packages = $util.emptyArray; - - /** - * 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.ListPackagesResponse - * @static - * @param {google.devtools.artifactregistry.v1beta2.IListPackagesResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} ListPackagesResponse instance - */ - ListPackagesResponse.create = function create(properties) { - return new ListPackagesResponse(properties); - }; - - /** - * Encodes the specified ListPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse - * @static - * @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 - */ - ListPackagesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packages != null && message.packages.length) - for (var i = 0; i < message.packages.length; ++i) - $root.google.devtools.artifactregistry.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 ListPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse - * @static - * @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 - */ - ListPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPackagesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.ListPackagesResponse} ListPackagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPackagesResponse.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPackagesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - ListPackagesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPackagesResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPackagesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packages != null && message.hasOwnProperty("packages")) { - if (!Array.isArray(message.packages)) - return "packages: array expected"; - for (var i = 0; i < message.packages.length; ++i) { - var error = $root.google.devtools.artifactregistry.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 ListPackagesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} ListPackagesResponse - */ - ListPackagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListPackagesResponse) - 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]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListPackagesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse - * @static - * @param {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} message ListPackagesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPackagesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.packages = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.packages && message.packages.length) { - object.packages = []; - for (var j = 0; j < message.packages.length; ++j) - object.packages[j] = $root.google.devtools.artifactregistry.v1beta2.Package.toObject(message.packages[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListPackagesResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse - * @instance - * @returns {Object.} JSON object - */ - ListPackagesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPackagesResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPackagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListPackagesResponse"; - }; - - return ListPackagesResponse; - })(); - - v1beta2.GetPackageRequest = (function() { - - /** - * Properties of a GetPackageRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IGetPackageRequest - * @property {string|null} [name] GetPackageRequest name - */ - - /** - * Constructs a new GetPackageRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a GetPackageRequest. - * @implements IGetPackageRequest - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest=} [properties] Properties to set - */ - function GetPackageRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetPackageRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest - * @instance - */ - GetPackageRequest.prototype.name = ""; - - /** - * Creates a new GetPackageRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.GetPackageRequest} GetPackageRequest instance - */ - GetPackageRequest.create = function create(properties) { - return new GetPackageRequest(properties); - }; - - /** - * Encodes the specified GetPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetPackageRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest - * @static - * @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 - */ - GetPackageRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetPackageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest - * @static - * @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 - */ - GetPackageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPackageRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.GetPackageRequest} GetPackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPackageRequest.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPackageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - GetPackageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPackageRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPackageRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetPackageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.GetPackageRequest} GetPackageRequest - */ - GetPackageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetPackageRequest) - return object; - 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 GetPackageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.GetPackageRequest} message GetPackageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPackageRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetPackageRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest - * @instance - * @returns {Object.} JSON object - */ - GetPackageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPackageRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPackageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.GetPackageRequest"; - }; - - return GetPackageRequest; - })(); - - v1beta2.DeletePackageRequest = (function() { - - /** - * Properties of a DeletePackageRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IDeletePackageRequest - * @property {string|null} [name] DeletePackageRequest name - */ - - /** - * Constructs a new DeletePackageRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a DeletePackageRequest. - * @implements IDeletePackageRequest - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest=} [properties] Properties to set - */ - function DeletePackageRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeletePackageRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest - * @instance - */ - DeletePackageRequest.prototype.name = ""; - - /** - * Creates a new DeletePackageRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} DeletePackageRequest instance - */ - DeletePackageRequest.create = function create(properties) { - return new DeletePackageRequest(properties); - }; - - /** - * Encodes the specified DeletePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeletePackageRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest - * @static - * @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 - */ - DeletePackageRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeletePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeletePackageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest - * @static - * @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 - */ - DeletePackageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeletePackageRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.DeletePackageRequest} DeletePackageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePackageRequest.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeletePackageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - DeletePackageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeletePackageRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeletePackageRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeletePackageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} DeletePackageRequest - */ - DeletePackageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.DeletePackageRequest) - return object; - 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 a DeletePackageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} message DeletePackageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeletePackageRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeletePackageRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest - * @instance - * @returns {Object.} JSON object - */ - DeletePackageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeletePackageRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeletePackageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.DeletePackageRequest"; - }; - - return DeletePackageRequest; - })(); - - v1beta2.Repository = (function() { - - /** - * Properties of a Repository. - * @memberof google.devtools.artifactregistry.v1beta2 - * @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 Repository. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a Repository. - * @implements IRepository - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IRepository=} [properties] Properties to set - */ - function Repository(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Repository mavenConfig. - * @member {google.devtools.artifactregistry.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.Repository - * @instance - */ - Repository.prototype.name = ""; - - /** - * Repository format. - * @member {google.devtools.artifactregistry.v1beta2.Repository.Format} format - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @instance - */ - Repository.prototype.format = 0; - - /** - * Repository description. - * @member {string} description - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @instance - */ - 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 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) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Repository message from the specified reader or buffer. - * @function decode - * @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.Repository} Repository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Repository.decode = function decode(reader, length, error) { - 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; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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; - } - } - return message; - }; - - /** - * Decodes a Repository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - Repository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Repository message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Repository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.mavenConfig != null && message.hasOwnProperty("mavenConfig")) { - properties.formatConfig = 1; - { - var error = $root.google.devtools.artifactregistry.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 Repository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.Repository} Repository - */ - Repository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Repository) - return object; - 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) { - default: - if (typeof object.format === "number") { - message.format = object.format; - break; - } - break; - 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 Repository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @static - * @param {google.devtools.artifactregistry.v1beta2.Repository} message Repository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Repository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.kmsKeyName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.devtools.artifactregistry.v1beta2.Repository.Format[message.format] === undefined ? message.format : $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 Repository to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @instance - * @returns {Object.} JSON object - */ - Repository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Repository - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Repository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.Repository"; - }; - - 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]]; - } - - /** - * 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, error) { - 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(); - if (tag === error) - break; - 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) { - default: - if (typeof object.versionPolicy === "number") { - message.versionPolicy = object.versionPolicy; - break; - } - break; - 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] === undefined ? message.versionPolicy : $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); - }; - - /** - * Gets the default type url for MavenRepositoryConfig - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MavenRepositoryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig"; - }; - - /** - * 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; - })(); - - /** - * 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 - */ - Repository.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "DOCKER"] = 1; - values[valuesById[2] = "MAVEN"] = 2; - values[valuesById[3] = "NPM"] = 3; - values[valuesById[5] = "APT"] = 5; - values[valuesById[6] = "YUM"] = 6; - values[valuesById[8] = "PYTHON"] = 8; - return values; - })(); - - return Repository; - })(); - - v1beta2.ListRepositoriesRequest = (function() { - - /** - * 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 - */ - - /** - * 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 - */ - function ListRepositoriesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListRepositoriesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest - * @instance - */ - ListRepositoriesRequest.prototype.parent = ""; - - /** - * ListRepositoriesRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest - * @instance - */ - ListRepositoriesRequest.prototype.pageSize = 0; - - /** - * ListRepositoriesRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest - * @instance - */ - ListRepositoriesRequest.prototype.pageToken = ""; - - /** - * 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); - }; - - /** - * 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 - */ - ListRepositoriesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.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(); - }; - - /** - * 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.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()); - }; - - /** - * 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 - */ - ListRepositoriesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.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; - }; - - /** - * 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; - }; - - /** - * Converts this ListRepositoriesRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest - * @instance - * @returns {Object.} JSON object - */ - ListRepositoriesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListRepositoriesRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListRepositoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest"; - }; - - return ListRepositoriesRequest; - })(); - - v1beta2.ListRepositoriesResponse = (function() { - - /** - * Properties of a ListRepositoriesResponse. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IListRepositoriesResponse - * @property {Array.|null} [repositories] ListRepositoriesResponse repositories - * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken - */ - - /** - * 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 - */ - function ListRepositoriesResponse(properties) { - this.repositories = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListRepositoriesResponse repositories. - * @member {Array.} repositories - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse - * @instance - */ - ListRepositoriesResponse.prototype.repositories = $util.emptyArray; - - /** - * ListRepositoriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse - * @instance - */ - ListRepositoriesResponse.prototype.nextPageToken = ""; - - /** - * 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 - */ - ListRepositoriesResponse.create = function create(properties) { - return new ListRepositoriesResponse(properties); - }; - - /** - * 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; - }; - - /** - * 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(); - }; - - /** - * 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 - */ - ListRepositoriesResponse.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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; - }; - - /** - * 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()); - }; - - /** - * 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; - }; - - /** - * 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 - */ - 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; - }; - - /** - * Converts this ListRepositoriesResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse - * @instance - * @returns {Object.} JSON object - */ - ListRepositoriesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListRepositoriesResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListRepositoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse"; - }; - - return ListRepositoriesResponse; - })(); - - v1beta2.GetRepositoryRequest = (function() { - - /** - * Properties of a GetRepositoryRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IGetRepositoryRequest - * @property {string|null} [name] GetRepositoryRequest name - */ - - /** - * 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 - */ - function GetRepositoryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetRepositoryRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest - * @instance - */ - GetRepositoryRequest.prototype.name = ""; - - /** - * 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); - }; - - /** - * 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 - */ - GetRepositoryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.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(); - }; - - /** - * 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.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 - */ - GetRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetRepositoryRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.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; - }; - - /** - * 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; - }; - - /** - * 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 - */ - GetRepositoryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetRepositoryRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest - * @instance - * @returns {Object.} JSON object - */ - GetRepositoryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetRepositoryRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.GetRepositoryRequest"; - }; - - return GetRepositoryRequest; - })(); - - v1beta2.CreateRepositoryRequest = (function() { - - /** - * 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 - */ - - /** - * 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 - */ - function CreateRepositoryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateRepositoryRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.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 - * @instance - */ - CreateRepositoryRequest.prototype.repository = null; - - /** - * Creates a new CreateRepositoryRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} CreateRepositoryRequest instance - */ - CreateRepositoryRequest.create = function create(properties) { - return new CreateRepositoryRequest(properties); - }; - - /** - * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest - * @static - * @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 - */ - 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 CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest - * @static - * @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 - */ - CreateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateRepositoryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.CreateRepositoryRequest} CreateRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateRepositoryRequest.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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; - } - } - return message; - }; - - /** - * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - CreateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateRepositoryRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateRepositoryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) - if (!$util.isString(message.repositoryId)) - return "repositoryId: string expected"; - if (message.repository != null && message.hasOwnProperty("repository")) { - var error = $root.google.devtools.artifactregistry.v1beta2.Repository.verify(message.repository); - if (error) - return "repository." + error; - } - return null; - }; - - /** - * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} CreateRepositoryRequest - */ - CreateRepositoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest) - 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); - } - return message; - }; - - /** - * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} message CreateRepositoryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateRepositoryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.repositoryId = ""; - object.repository = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) - object.repositoryId = message.repositoryId; - if (message.repository != null && message.hasOwnProperty("repository")) - object.repository = $root.google.devtools.artifactregistry.v1beta2.Repository.toObject(message.repository, options); - return object; - }; - - /** - * Converts this CreateRepositoryRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest - * @instance - * @returns {Object.} JSON object - */ - CreateRepositoryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateRepositoryRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest"; - }; - - return CreateRepositoryRequest; - })(); - - v1beta2.UpdateRepositoryRequest = (function() { - - /** - * Properties of an UpdateRepositoryRequest. - * @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 - */ - - /** - * Constructs a new UpdateRepositoryRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents an UpdateRepositoryRequest. - * @implements IUpdateRepositoryRequest - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest=} [properties] Properties to set - */ - function UpdateRepositoryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateRepositoryRequest repository. - * @member {google.devtools.artifactregistry.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 - * @instance - */ - UpdateRepositoryRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateRepositoryRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} UpdateRepositoryRequest instance - */ - UpdateRepositoryRequest.create = function create(properties) { - return new UpdateRepositoryRequest(properties); - }; - - /** - * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest - * @static - * @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 - */ - UpdateRepositoryRequest.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(); - return writer; - }; - - /** - * 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.UpdateRepositoryRequest - * @static - * @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 - */ - UpdateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.UpdateRepositoryRequest} UpdateRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateRepositoryRequest.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - UpdateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateRepositoryRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateRepositoryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.repository != null && message.hasOwnProperty("repository")) { - var error = $root.google.devtools.artifactregistry.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 an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} UpdateRepositoryRequest - */ - UpdateRepositoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest) - 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); - } - return message; - }; - - /** - * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} message UpdateRepositoryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateRepositoryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.repository = null; - object.updateMask = null; - } - if (message.repository != null && message.hasOwnProperty("repository")) - object.repository = $root.google.devtools.artifactregistry.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 UpdateRepositoryRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateRepositoryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateRepositoryRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest"; - }; - - return UpdateRepositoryRequest; - })(); - - v1beta2.DeleteRepositoryRequest = (function() { - - /** - * Properties of a DeleteRepositoryRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IDeleteRepositoryRequest - * @property {string|null} [name] DeleteRepositoryRequest name - */ - - /** - * Constructs a new DeleteRepositoryRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a DeleteRepositoryRequest. - * @implements IDeleteRepositoryRequest - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest=} [properties] Properties to set - */ - function DeleteRepositoryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteRepositoryRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest - * @instance - */ - DeleteRepositoryRequest.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 - */ - DeleteRepositoryRequest.create = function create(properties) { - return new DeleteRepositoryRequest(properties); - }; - - /** - * 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 - */ - DeleteRepositoryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest.verify|verify} messages. - * @function encodeDelimited - * @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 - */ - DeleteRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.DeleteRepositoryRequest} DeleteRepositoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteRepositoryRequest.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - DeleteRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteRepositoryRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteRepositoryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest} DeleteRepositoryRequest - */ - DeleteRepositoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest) - return object; - 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 DeleteRepositoryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest} message DeleteRepositoryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteRepositoryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteRepositoryRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteRepositoryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteRepositoryRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest"; - }; - - return DeleteRepositoryRequest; - })(); - - v1beta2.ArtifactRegistry = (function() { - - /** - * 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 - */ - function ArtifactRegistry(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ArtifactRegistry.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ArtifactRegistry; - - /** - * Creates new ArtifactRegistry service using the specified rpc implementation. - * @function create - * @memberof google.devtools.artifactregistry.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); - }; - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * Calls ListRepositories. - * @function listRepositories - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - - /** - * 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 - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.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 - */ - 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" }); - - /** - * 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 - */ - - /** - * 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 - */ - 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" }); - - /** - * 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.OperationMetadata - * @static - * @param {google.devtools.artifactregistry.v1beta2.IOperationMetadata=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata - * @static - * @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 - */ - OperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata - * @static - * @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 - */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationMetadata.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationMetadata message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.OperationMetadata) - return object; - return new $root.google.devtools.artifactregistry.v1beta2.OperationMetadata(); - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata - * @static - * @param {google.devtools.artifactregistry.v1beta2.OperationMetadata} message OperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationMetadata.toObject = function toObject() { - return {}; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata - * @instance - * @returns {Object.} JSON object - */ - OperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationMetadata - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - v1beta2.ProjectSettings = (function() { - - /** - * Properties of a ProjectSettings. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IProjectSettings - * @property {string|null} [name] ProjectSettings name - * @property {google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState|null} [legacyRedirectionState] ProjectSettings legacyRedirectionState - */ - - /** - * Constructs a new ProjectSettings. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ProjectSettings. - * @implements IProjectSettings - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IProjectSettings=} [properties] Properties to set - */ - function ProjectSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProjectSettings name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings - * @instance - */ - ProjectSettings.prototype.name = ""; - - /** - * ProjectSettings legacyRedirectionState. - * @member {google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState} legacyRedirectionState - * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings - * @instance - */ - ProjectSettings.prototype.legacyRedirectionState = 0; - - /** - * Creates a new ProjectSettings instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings - * @static - * @param {google.devtools.artifactregistry.v1beta2.IProjectSettings=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ProjectSettings} ProjectSettings instance - */ - ProjectSettings.create = function create(properties) { - return new ProjectSettings(properties); - }; - - /** - * Encodes the specified ProjectSettings message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ProjectSettings.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings - * @static - * @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 - */ - ProjectSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.legacyRedirectionState != null && Object.hasOwnProperty.call(message, "legacyRedirectionState")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.legacyRedirectionState); - return writer; - }; - - /** - * Encodes the specified ProjectSettings message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ProjectSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings - * @static - * @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 - */ - ProjectSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProjectSettings message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.ProjectSettings} ProjectSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProjectSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.legacyRedirectionState = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProjectSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - ProjectSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProjectSettings message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProjectSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.legacyRedirectionState != null && message.hasOwnProperty("legacyRedirectionState")) - switch (message.legacyRedirectionState) { - default: - return "legacyRedirectionState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a ProjectSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ProjectSettings} ProjectSettings - */ - ProjectSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ProjectSettings) - return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.ProjectSettings(); - if (object.name != null) - message.name = String(object.name); - switch (object.legacyRedirectionState) { - default: - if (typeof object.legacyRedirectionState === "number") { - message.legacyRedirectionState = object.legacyRedirectionState; - break; - } - break; - case "REDIRECTION_STATE_UNSPECIFIED": - case 0: - message.legacyRedirectionState = 0; - break; - case "REDIRECTION_FROM_GCR_IO_DISABLED": - case 1: - message.legacyRedirectionState = 1; - break; - case "REDIRECTION_FROM_GCR_IO_ENABLED": - case 2: - message.legacyRedirectionState = 2; - break; - case "REDIRECTION_FROM_GCR_IO_FINALIZED": - case 3: - message.legacyRedirectionState = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a ProjectSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings - * @static - * @param {google.devtools.artifactregistry.v1beta2.ProjectSettings} message ProjectSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProjectSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.legacyRedirectionState = options.enums === String ? "REDIRECTION_STATE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.legacyRedirectionState != null && message.hasOwnProperty("legacyRedirectionState")) - object.legacyRedirectionState = options.enums === String ? $root.google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState[message.legacyRedirectionState] === undefined ? message.legacyRedirectionState : $root.google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState[message.legacyRedirectionState] : message.legacyRedirectionState; - return object; - }; - - /** - * Converts this ProjectSettings to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings - * @instance - * @returns {Object.} JSON object - */ - ProjectSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProjectSettings - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProjectSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ProjectSettings"; - }; - - /** - * 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.GetProjectSettingsRequest = (function() { - - /** - * Properties of a GetProjectSettingsRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IGetProjectSettingsRequest - * @property {string|null} [name] GetProjectSettingsRequest name - */ - - /** - * Constructs a new GetProjectSettingsRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a GetProjectSettingsRequest. - * @implements IGetProjectSettingsRequest - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest=} [properties] Properties to set - */ - function GetProjectSettingsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetProjectSettingsRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest - * @instance - */ - GetProjectSettingsRequest.prototype.name = ""; - - /** - * Creates a new GetProjectSettingsRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest} GetProjectSettingsRequest instance - */ - GetProjectSettingsRequest.create = function create(properties) { - return new GetProjectSettingsRequest(properties); - }; - - /** - * Encodes the specified GetProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest - * @static - * @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 - */ - GetProjectSettingsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest - * @static - * @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 - */ - GetProjectSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetProjectSettingsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.GetProjectSettingsRequest} GetProjectSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetProjectSettingsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetProjectSettingsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - GetProjectSettingsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetProjectSettingsRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetProjectSettingsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest} GetProjectSettingsRequest - */ - GetProjectSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest) - return object; - 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 GetProjectSettingsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest} message GetProjectSettingsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetProjectSettingsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetProjectSettingsRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest - * @instance - * @returns {Object.} JSON object - */ - GetProjectSettingsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetProjectSettingsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetProjectSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest"; - }; - - return GetProjectSettingsRequest; - })(); - - v1beta2.UpdateProjectSettingsRequest = (function() { - - /** - * Properties of an UpdateProjectSettingsRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IUpdateProjectSettingsRequest - * @property {google.devtools.artifactregistry.v1beta2.IProjectSettings|null} [projectSettings] UpdateProjectSettingsRequest projectSettings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateProjectSettingsRequest updateMask - */ - - /** - * Constructs a new UpdateProjectSettingsRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents an UpdateProjectSettingsRequest. - * @implements IUpdateProjectSettingsRequest - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest=} [properties] Properties to set - */ - function UpdateProjectSettingsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateProjectSettingsRequest projectSettings. - * @member {google.devtools.artifactregistry.v1beta2.IProjectSettings|null|undefined} projectSettings - * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest - * @instance - */ - UpdateProjectSettingsRequest.prototype.projectSettings = null; - - /** - * UpdateProjectSettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest - * @instance - */ - UpdateProjectSettingsRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateProjectSettingsRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest instance - */ - UpdateProjectSettingsRequest.create = function create(properties) { - return new UpdateProjectSettingsRequest(properties); - }; - - /** - * Encodes the specified UpdateProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest - * @static - * @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 - */ - UpdateProjectSettingsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - 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 UpdateProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest - * @static - * @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 - */ - UpdateProjectSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateProjectSettingsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - 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); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - UpdateProjectSettingsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateProjectSettingsRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateProjectSettingsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectSettings != null && message.hasOwnProperty("projectSettings")) { - var error = $root.google.devtools.artifactregistry.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 an UpdateProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest - */ - UpdateProjectSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest) - return object; - 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 an UpdateProjectSettingsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest} message UpdateProjectSettingsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateProjectSettingsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectSettings = null; - object.updateMask = null; - } - if (message.projectSettings != null && message.hasOwnProperty("projectSettings")) - object.projectSettings = $root.google.devtools.artifactregistry.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 UpdateProjectSettingsRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateProjectSettingsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateProjectSettingsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateProjectSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest"; - }; - - return UpdateProjectSettingsRequest; - })(); - - v1beta2.Tag = (function() { - - /** - * Properties of a Tag. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface ITag - * @property {string|null} [name] Tag name - * @property {string|null} [version] Tag version - */ - - /** - * Constructs a new Tag. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a Tag. - * @implements ITag - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.ITag=} [properties] Properties to set - */ - function Tag(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Tag name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.Tag - * @instance - */ - Tag.prototype.name = ""; - - /** - * Tag version. - * @member {string} version - * @memberof google.devtools.artifactregistry.v1beta2.Tag - * @instance - */ - Tag.prototype.version = ""; - - /** - * Creates a new Tag instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.Tag - * @static - * @param {google.devtools.artifactregistry.v1beta2.ITag=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.Tag} Tag instance - */ - Tag.create = function create(properties) { - return new Tag(properties); - }; - - /** - * Encodes the specified Tag message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Tag.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.Tag - * @static - * @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 - */ - Tag.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); - return writer; - }; - - /** - * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Tag.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Tag - * @static - * @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 - */ - Tag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Tag message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.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.Tag} Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tag.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.version = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Tag message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Tag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - Tag.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Tag message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.Tag - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Tag.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; - - /** - * Creates a Tag message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.Tag - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.Tag} Tag - */ - Tag.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Tag) - 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); - return message; - }; - - /** - * Creates a plain object from a Tag message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.Tag - * @static - * @param {google.devtools.artifactregistry.v1beta2.Tag} message Tag - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Tag.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.version = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this Tag to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.Tag - * @instance - * @returns {Object.} JSON object - */ - Tag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Tag - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.Tag - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Tag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.Tag"; - }; - - return Tag; - })(); - - v1beta2.ListTagsRequest = (function() { - - /** - * 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 - */ - - /** - * 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]]; - } - - /** - * 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 - * @instance - */ - ListTagsRequest.prototype.pageToken = ""; - - /** - * 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); - }; - - /** - * 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; - }; - - /** - * 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(); - }; - - /** - * 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.artifactregistry.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()); - }; - - /** - * 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; - }; - - /** - * 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; - }; - - /** - * 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; - }; - - /** - * 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); - }; - - /** - * Gets the default type url for ListTagsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTagsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListTagsRequest"; - }; - - return ListTagsRequest; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for ListTagsResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTagsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListTagsResponse"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for GetTagRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.GetTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.GetTagRequest"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for CreateTagRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.CreateTagRequest"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for UpdateTagRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.UpdateTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.UpdateTagRequest"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for DeleteTagRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.DeleteTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.DeleteTagRequest"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for Version - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.Version - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Version.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.Version"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - 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] === undefined ? message.view : $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); - }; - - /** - * Gets the default type url for ListVersionsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListVersionsRequest"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for ListVersionsResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ListVersionsResponse"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - 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] === undefined ? message.view : $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); - }; - - /** - * Gets the default type url for GetVersionRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.GetVersionRequest"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for DeleteVersionRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.DeleteVersionRequest"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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) { - default: - if (typeof object.packageType === "number") { - message.packageType = object.packageType; - break; - } - break; - 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] === undefined ? message.packageType : $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); - }; - - /** - * Gets the default type url for YumArtifact - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.YumArtifact - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - YumArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.YumArtifact"; - }; - - /** - * 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for ImportYumArtifactsGcsSource - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportYumArtifactsGcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for ImportYumArtifactsRequest - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportYumArtifactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for ImportYumArtifactsErrorInfo - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportYumArtifactsErrorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for ImportYumArtifactsResponse - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportYumArtifactsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for ImportYumArtifactsMetadata - * @function getTypeUrl - * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportYumArtifactsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata"; - }; - - 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 - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.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")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @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.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDescriptor - * @function getTypeUrl - * @memberof google.api.ResourceDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(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]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.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.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - 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]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - 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]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpRule - * @function getTypeUrl - * @memberof google.api.HttpRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.HttpRule"; - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(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]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomHttpPattern - * @function getTypeUrl - * @memberof google.api.CustomHttpPattern - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; - }; - - return CustomHttpPattern; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - */ - - /** - * Constructs a new CommonLanguageSettings. - * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings - * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - */ - function CommonLanguageSettings(properties) { - this.destinations = []; - 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]]; - } - - /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; - - /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @function create - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance - */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); - }; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(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]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); - } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientLibrarySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); - return object; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri - * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri - */ - - /** - * Constructs a new Publishing. - * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing - * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set - */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; - 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]]; - } - - /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.githubLabel = ""; - - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; - - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; - - /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.librarySettings = $util.emptyArray; - - /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.protoReferenceDocumentationUri = ""; - - /** - * Publishing restReferenceDocumentationUri. - * @member {string} restReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.restReferenceDocumentationUri = ""; - - /** - * Creates a new Publishing instance using the specified properties. - * @function create - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance - */ - Publishing.create = function create(properties) { - return new Publishing(properties); - }; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encode - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); - return writer; - }; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - if (!$util.isString(message.restReferenceDocumentationUri)) - return "restReferenceDocumentationUri: string expected"; - return null; - }; - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Publishing - * @static - * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing - */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) - return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; - break; - } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); - if (object.restReferenceDocumentationUri != null) - message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); - return message; - }; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Publishing - * @static - * @param {google.api.Publishing} message Publishing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publishing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - object.restReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; - return object; - }; - - /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing - * @instance - * @returns {Object.} JSON object - */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publishing - * @function getTypeUrl - * @memberof google.api.Publishing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { - - /** - * Properties of a JavaSettings. - * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common - */ - - /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set - */ - function JavaSettings(properties) { - this.serviceClassNames = {}; - 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]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); - break; - } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - 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.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) - return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(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]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) - return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CppSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(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]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) - return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(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]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) - return object; - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(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]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) - return object; - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures - */ - - /** - * Constructs a new DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings - * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set - */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; - 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]]; - } - - /** - * DotnetSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @function create - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance - */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); - }; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encode - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); - return writer; - }; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - 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.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - 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.renamedResources[key] = value; - break; - } - case 4: { - if (!(message.ignoredResources && message.ignoredResources.length)) - message.ignoredResources = []; - message.ignoredResources.push(reader.string()); - break; - } - case 5: { - if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) - message.forcedNamespaceAliases = []; - message.forcedNamespaceAliases.push(reader.string()); - break; - } - case 6: { - if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) - message.handwrittenSignatures = []; - message.handwrittenSignatures.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; - } - return null; - }; - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings - */ - DotnetSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); - } - return message; - }; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.DotnetSettings} message DotnetSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DotnetSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; - } - return object; - }; - - /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings - * @instance - * @returns {Object.} JSON object - */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DotnetSettings - * @function getTypeUrl - * @memberof google.api.DotnetSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.DotnetSettings"; - }; - - return DotnetSettings; - })(); - - api.RubySettings = (function() { - - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ - - /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set - */ - function RubySettings(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]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) - return object; - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(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]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) - return object; - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields - */ - - /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings - * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set - */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; - 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]]; - } - - /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.selector = ""; - - /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.longRunning = null; - - /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance - */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); - }; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); - return writer; - }; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { - if (!Array.isArray(message.autoPopulatedFields)) - return "autoPopulatedFields: array expected"; - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings - */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) - return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); - } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings - * @static - * @param {google.api.MethodSettings} message MethodSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; - } - return object; - }; - - /** - * Converts this MethodSettings to JSON. - * @function toJSON - * @memberof google.api.MethodSettings - * @instance - * @returns {Object.} JSON object - */ - MethodSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodSettings - * @function getTypeUrl - * @memberof google.api.MethodSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings"; - }; - - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(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]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - api.ClientLibraryOrganization = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD"] = 1; - values[valuesById[2] = "ADS"] = 2; - values[valuesById[3] = "PHOTOS"] = 3; - values[valuesById[4] = "STREET_VIEW"] = 4; - values[valuesById[5] = "SHOPPING"] = 5; - values[valuesById[6] = "GEO"] = 6; - values[valuesById[7] = "GENERATIVE_AI"] = 7; - return values; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - api.ClientLibraryDestination = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; - values[valuesById[10] = "GITHUB"] = 10; - values[valuesById[20] = "PACKAGE_MANAGER"] = 20; - return values; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - 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]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - 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]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.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["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.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["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - 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]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.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.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.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.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(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]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(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]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - 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]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - 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 ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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 ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(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]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(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]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.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.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.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.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(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]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.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.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.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.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - 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]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.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.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.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.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(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]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(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]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.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.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.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.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - 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]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.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.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.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.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(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]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.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.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.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.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - 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]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - 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.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(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]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - 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.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - 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]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - 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.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 16: { - message.debugRedact = reader.bool(); - break; - } - case 17: { - message.retention = reader.int32(); - break; - } - case 19: { - if (!(message.targets && message.targets.length)) - message.targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(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]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ - - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(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]]; - } - - /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; - - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - 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 OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - 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 OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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 OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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 OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ - - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(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]]; - } - - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - 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 EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - 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 EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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 EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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 EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ - - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @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 features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; - - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = 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.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = 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.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: 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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - 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; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - 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); - }; - - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @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 - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion - */ - - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(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]]; - } - - /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * 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"] = ""; - - /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.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.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - 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.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); - return writer; - }; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @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.ServiceOptions} ServiceOptions - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 33: { - 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; - } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); - break; - } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); - break; - } - case 525000001: { - message[".google.api.apiVersion"] = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @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 - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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; - } - } - 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.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: string expected"; - return null; - }; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - 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.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"]); - if (object[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); - return message; - }; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; - return object; - }; - - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceOptions - * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @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 MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * 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.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} 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.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - 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(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @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.MethodOptions} MethodOptions - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - } - 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); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @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 - */ - 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.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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; - } - } - 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 MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - 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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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]); - } - } - 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 MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - 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] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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.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 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); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * 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.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @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 - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - 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]]; - } - - /** - * 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 - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.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); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @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.UninterpretedOption} UninterpretedOption - * @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, error) { - 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(); - if (tag === error) - break; - 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(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @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 - */ - UninterpretedOption.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 (error) - return "name." + 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. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - 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]); - } - } - 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 >= 0) - 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. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.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); - } - 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. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - 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, error) { - 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(); - if (tag === error) - break; - 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; - }; - - /** - * 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); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.FeatureSet = (function() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(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]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fieldPresence = reader.int32(); - break; - } - case 2: { - message.enumType = reader.int32(); - break; - } - case 3: { - message.repeatedFieldEncoding = reader.int32(); - break; - } - case 4: { - message.utf8Validation = reader.int32(); - break; - } - case 5: { - message.messageEncoding = reader.int32(); - break; - } - case 6: { - message.jsonFormat = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - var message = new $root.google.protobuf.FeatureSet(); - switch (object.fieldPresence) { - default: - if (typeof object.fieldPresence === "number") { - message.fieldPresence = object.fieldPresence; - break; - } - break; - case "FIELD_PRESENCE_UNKNOWN": - case 0: - message.fieldPresence = 0; - break; - case "EXPLICIT": - case 1: - message.fieldPresence = 1; - break; - case "IMPLICIT": - case 2: - message.fieldPresence = 2; - break; - case "LEGACY_REQUIRED": - case 3: - message.fieldPresence = 3; - break; - } - switch (object.enumType) { - default: - if (typeof object.enumType === "number") { - message.enumType = object.enumType; - break; - } - break; - case "ENUM_TYPE_UNKNOWN": - case 0: - message.enumType = 0; - break; - case "OPEN": - case 1: - message.enumType = 1; - break; - case "CLOSED": - case 2: - message.enumType = 2; - break; - } - switch (object.repeatedFieldEncoding) { - default: - if (typeof object.repeatedFieldEncoding === "number") { - message.repeatedFieldEncoding = object.repeatedFieldEncoding; - break; - } - break; - case "REPEATED_FIELD_ENCODING_UNKNOWN": - case 0: - message.repeatedFieldEncoding = 0; - break; - case "PACKED": - case 1: - message.repeatedFieldEncoding = 1; - break; - case "EXPANDED": - case 2: - message.repeatedFieldEncoding = 2; - break; - } - switch (object.utf8Validation) { - default: - if (typeof object.utf8Validation === "number") { - message.utf8Validation = object.utf8Validation; - break; - } - break; - case "UTF8_VALIDATION_UNKNOWN": - case 0: - message.utf8Validation = 0; - break; - case "VERIFY": - case 2: - message.utf8Validation = 2; - break; - case "NONE": - case 3: - message.utf8Validation = 3; - break; - } - switch (object.messageEncoding) { - default: - if (typeof object.messageEncoding === "number") { - message.messageEncoding = object.messageEncoding; - break; - } - break; - case "MESSAGE_ENCODING_UNKNOWN": - case 0: - message.messageEncoding = 0; - break; - case "LENGTH_PREFIXED": - case 1: - message.messageEncoding = 1; - break; - case "DELIMITED": - case 2: - message.messageEncoding = 2; - break; - } - switch (object.jsonFormat) { - default: - if (typeof object.jsonFormat === "number") { - message.jsonFormat = object.jsonFormat; - break; - } - break; - case "JSON_FORMAT_UNKNOWN": - case 0: - message.jsonFormat = 0; - break; - case "ALLOW": - case 1: - message.jsonFormat = 1; - break; - case "LEGACY_BEST_EFFORT": - case 2: - message.jsonFormat = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - FeatureSet.FieldPresence = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; - values[valuesById[1] = "EXPLICIT"] = 1; - values[valuesById[2] = "IMPLICIT"] = 2; - values[valuesById[3] = "LEGACY_REQUIRED"] = 3; - return values; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - FeatureSet.EnumType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - FeatureSet.RepeatedFieldEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "PACKED"] = 1; - values[valuesById[2] = "EXPANDED"] = 2; - return values; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - FeatureSet.Utf8Validation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; - values[valuesById[2] = "VERIFY"] = 2; - values[valuesById[3] = "NONE"] = 3; - return values; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - FeatureSet.MessageEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "LENGTH_PREFIXED"] = 1; - values[valuesById[2] = "DELIMITED"] = 2; - return values; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - FeatureSet.JsonFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; - return values; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - 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]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults(); - if (object.defaults) { - if (!Array.isArray(object.defaults)) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); - message.defaults = []; - for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(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]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; - }; - - return FeatureSetEditionDefault; - })(); - - return FeatureSetDefaults; - })(); - - protobuf.SourceCodeInfo = (function() { - - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ - - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - 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]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.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(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @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.SourceCodeInfo} SourceCodeInfo - * @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, error) { - if (!(reader instanceof $Reader)) - 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(); - if (tag === error) - break; - 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); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @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 - */ - SourceCodeInfo.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 (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - 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]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.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); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (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 - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location 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 - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * 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.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @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 - */ - Location.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.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 Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @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 - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @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.SourceCodeInfo.Location} Location - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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: { - 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; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @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 - */ - Location.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"; - } - 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 Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - 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 Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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.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]; - } - return object; - }; - - /** - * 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); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - 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]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.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(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @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.GeneratedCodeInfo} GeneratedCodeInfo - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @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 - */ - GeneratedCodeInfo.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; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @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]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.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); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - 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 - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * 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; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * 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); - }; - - /** - * 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); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * 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(); - }; - - /** - * 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, error) { - 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(); - if (tag === error) - break; - 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; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * 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()); - }; - - /** - * 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"; - } - 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"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * 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; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * 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; - object.semantic = options.enums === String ? "NONE" : 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; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - 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); - }; - - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; - - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type_url = reader.string(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Any - * @function getTypeUrl - * @memberof google.protobuf.Any - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Any"; - }; - - return Any; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - protobuf.FieldMask = (function() { - - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ - - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - 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]]; - } - - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldMask - * @function getTypeUrl - * @memberof google.protobuf.FieldMask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldMask"; - }; - - return FieldMask; - })(); - - protobuf.Struct = (function() { - - /** - * Properties of a Struct. - * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields - */ - - /** - * Constructs a new Struct. - * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct - * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set - */ - function Struct(properties) { - this.fields = {}; - 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]]; - } - - /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct - * @instance - */ - Struct.prototype.fields = $util.emptyObject; - - /** - * Creates a new Struct instance using the specified properties. - * @function create - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance - */ - Struct.create = function create(properties) { - return new Struct(properties); - }; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Struct message from the specified reader or buffer. - * @function decode - * @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.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.fields[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - Struct.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Struct message. - * @function verify - * @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 - */ - Struct.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } - return null; - }; - - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Struct - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct - */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) - return object; - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.Struct} message Struct - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Struct.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); - } - return object; - }; - - /** - * Converts this Struct to JSON. - * @function toJSON - * @memberof google.protobuf.Struct - * @instance - * @returns {Object.} JSON object - */ - Struct.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Struct - * @function getTypeUrl - * @memberof google.protobuf.Struct - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Struct"; - }; - - return Struct; - })(); - - protobuf.Value = (function() { - - /** - * Properties of a Value. - * @memberof google.protobuf - * @interface IValue - * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue - * @property {number|null} [numberValue] Value numberValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.protobuf.IStruct|null} [structValue] Value structValue - * @property {google.protobuf.IListValue|null} [listValue] Value listValue - */ - - /** - * Constructs a new Value. - * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set - */ - function Value(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]]; - } - - /** - * Value nullValue. - * @member {google.protobuf.NullValue|null|undefined} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = null; - - /** - * Value numberValue. - * @member {number|null|undefined} numberValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.numberValue = null; - - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.stringValue = null; - - /** - * Value boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.boolValue = null; - - /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.structValue = null; - - /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.listValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Value kind. - * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind - * @memberof google.protobuf.Value - * @instance - */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue=} [properties] Properties to set - * @returns {google.protobuf.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; - - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) - $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) - $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @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.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.nullValue = reader.int32(); - break; - } - case 2: { - message.numberValue = reader.double(); - break; - } - case 3: { - message.stringValue = reader.string(); - break; - } - case 4: { - message.boolValue = reader.bool(); - break; - } - case 5: { - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 6: { - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Value message. - * @function verify - * @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 - */ - Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - properties.kind = 1; - switch (message.nullValue) { - default: - return "nullValue: enum value expected"; - case 0: - break; - } - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structValue); - if (error) - return "structValue." + error; - } - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.ListValue.verify(message.listValue); - if (error) - return "listValue." + error; - } - } - return null; - }; - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) - return object; - var message = new $root.google.protobuf.Value(); - switch (object.nullValue) { - default: - if (typeof object.nullValue === "number") { - message.nullValue = object.nullValue; - break; - } - break; - 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 Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; - if (options.oneofs) - object.kind = "nullValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); - if (options.oneofs) - object.kind = "structValue"; - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); - if (options.oneofs) - object.kind = "listValue"; - } - return object; - }; - - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof google.protobuf.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Value - * @function getTypeUrl - * @memberof google.protobuf.Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Value"; - }; - - return Value; - })(); - - /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {number} - * @property {number} NULL_VALUE=0 NULL_VALUE value - */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = 0; - return values; - })(); - - protobuf.ListValue = (function() { - - /** - * Properties of a ListValue. - * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values - */ - - /** - * Constructs a new ListValue. - * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue - * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set - */ - function ListValue(properties) { - this.values = []; - 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]]; - } - - /** - * 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.ListValue - * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance - */ - ListValue.create = function create(properties) { - return new ListValue(properties); - }; - - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} 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 ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListValue message from the specified reader or buffer. - * @function decode - * @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.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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; - } - } - return message; - }; - - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - ListValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListValue message. - * @function verify - * @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 - */ - 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 a ListValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue - */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) - return object; - var message = new $root.google.protobuf.ListValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.protobuf.ListValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.ListValue} message ListValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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 ListValue to JSON. - * @function toJSON - * @memberof google.protobuf.ListValue - * @instance - * @returns {Object.} JSON object - */ - ListValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListValue - * @function getTypeUrl - * @memberof google.protobuf.ListValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ListValue"; - }; - - return ListValue; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(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 Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @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.Empty} Empty - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @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 - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - return protobuf; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof google.rpc.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Status"; - }; - - return Status; - })(); - - return rpc; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - type.Expr = (function() { - - /** - * Properties of an Expr. - * @memberof google.type - * @interface IExpr - * @property {string|null} [expression] Expr expression - * @property {string|null} [title] Expr title - * @property {string|null} [description] Expr description - * @property {string|null} [location] Expr location - */ - - /** - * Constructs a new Expr. - * @memberof google.type - * @classdesc Represents an Expr. - * @implements IExpr - * @constructor - * @param {google.type.IExpr=} [properties] Properties to set - */ - function Expr(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]]; - } - - /** - * Expr expression. - * @member {string} expression - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.expression = ""; - - /** - * Expr title. - * @member {string} title - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.title = ""; - - /** - * Expr description. - * @member {string} description - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.description = ""; - - /** - * Expr location. - * @member {string} location - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.location = ""; - - /** - * Creates a new Expr instance using the specified properties. - * @function create - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr=} [properties] Properties to set - * @returns {google.type.Expr} Expr instance - */ - Expr.create = function create(properties) { - return new Expr(properties); - }; - - /** - * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @function encode - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr} message Expr message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Expr.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); - return writer; - }; - - /** - * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr} message Expr message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Expr.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Expr message from the specified reader or buffer. - * @function decode - * @memberof google.type.Expr - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.Expr} Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Expr.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.expression = reader.string(); - break; - } - case 2: { - message.title = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.location = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Expr message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.Expr - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Expr} Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Expr.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Expr message. - * @function verify - * @memberof google.type.Expr - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Expr.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expression != null && message.hasOwnProperty("expression")) - if (!$util.isString(message.expression)) - return "expression: string expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - return null; - }; - - /** - * Creates an Expr message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.Expr - * @static - * @param {Object.} object Plain object - * @returns {google.type.Expr} Expr - */ - Expr.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Expr) - return object; - var message = new $root.google.type.Expr(); - if (object.expression != null) - message.expression = String(object.expression); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.location != null) - message.location = String(object.location); - return message; - }; - - /** - * Creates a plain object from an Expr message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.Expr - * @static - * @param {google.type.Expr} message Expr - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Expr.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.expression = ""; - object.title = ""; - object.description = ""; - object.location = ""; - } - if (message.expression != null && message.hasOwnProperty("expression")) - object.expression = message.expression; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - return object; - }; - - /** - * Converts this Expr to JSON. - * @function toJSON - * @memberof google.type.Expr - * @instance - * @returns {Object.} JSON object - */ - Expr.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Expr - * @function getTypeUrl - * @memberof google.type.Expr - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.Expr"; - }; - - return Expr; - })(); - - return type; - })(); - - google.iam = (function() { - - /** - * Namespace iam. - * @memberof google - * @namespace - */ - var iam = {}; - - iam.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.iam - * @namespace - */ - var v1 = {}; - - v1.IAMPolicy = (function() { - - /** - * Constructs a new IAMPolicy service. - * @memberof google.iam.v1 - * @classdesc Represents a IAMPolicy - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; - - /** - * Creates new IAMPolicy service using the specified rpc implementation. - * @function create - * @memberof google.iam.v1.IAMPolicy - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. - */ - IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. - * @memberof google.iam.v1.IAMPolicy - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. - * @memberof google.iam.v1.IAMPolicy - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. - * @memberof google.iam.v1.IAMPolicy - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return IAMPolicy; - })(); - - v1.SetIamPolicyRequest = (function() { - - /** - * Properties of a SetIamPolicyRequest. - * @memberof google.iam.v1 - * @interface ISetIamPolicyRequest - * @property {string|null} [resource] SetIamPolicyRequest resource - * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy - * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask - */ - - /** - * Constructs a new SetIamPolicyRequest. - * @memberof google.iam.v1 - * @classdesc Represents a SetIamPolicyRequest. - * @implements ISetIamPolicyRequest - * @constructor - * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set - */ - function SetIamPolicyRequest(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]]; - } - - /** - * SetIamPolicyRequest resource. - * @member {string} resource - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.resource = ""; - - /** - * SetIamPolicyRequest policy. - * @member {google.iam.v1.IPolicy|null|undefined} policy - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.policy = null; - - /** - * SetIamPolicyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.updateMask = null; - - /** - * Creates a new SetIamPolicyRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance - */ - SetIamPolicyRequest.create = function create(properties) { - return new SetIamPolicyRequest(properties); - }; - - /** - * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetIamPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) - $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.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 SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetIamPolicyRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetIamPolicyRequest message. - * @function verify - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetIamPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.policy != null && message.hasOwnProperty("policy")) { - var error = $root.google.iam.v1.Policy.verify(message.policy); - if (error) - return "policy." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - */ - SetIamPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) - return object; - var message = new $root.google.iam.v1.SetIamPolicyRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.policy != null) { - if (typeof object.policy !== "object") - throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); - message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetIamPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resource = ""; - object.policy = null; - object.updateMask = null; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this SetIamPolicyRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - SetIamPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetIamPolicyRequest - * @function getTypeUrl - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.SetIamPolicyRequest"; - }; - - return SetIamPolicyRequest; - })(); - - v1.GetIamPolicyRequest = (function() { - - /** - * Properties of a GetIamPolicyRequest. - * @memberof google.iam.v1 - * @interface IGetIamPolicyRequest - * @property {string|null} [resource] GetIamPolicyRequest resource - * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options - */ - - /** - * Constructs a new GetIamPolicyRequest. - * @memberof google.iam.v1 - * @classdesc Represents a GetIamPolicyRequest. - * @implements IGetIamPolicyRequest - * @constructor - * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set - */ - function GetIamPolicyRequest(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]]; - } - - /** - * GetIamPolicyRequest resource. - * @member {string} resource - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - */ - GetIamPolicyRequest.prototype.resource = ""; - - /** - * GetIamPolicyRequest options. - * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - */ - GetIamPolicyRequest.prototype.options = null; - - /** - * Creates a new GetIamPolicyRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance - */ - GetIamPolicyRequest.create = function create(properties) { - return new GetIamPolicyRequest(properties); - }; - - /** - * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetIamPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetIamPolicyRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetIamPolicyRequest message. - * @function verify - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetIamPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - */ - GetIamPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) - return object; - var message = new $root.google.iam.v1.GetIamPolicyRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); - message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetIamPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resource = ""; - object.options = null; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this GetIamPolicyRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - GetIamPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetIamPolicyRequest - * @function getTypeUrl - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.GetIamPolicyRequest"; - }; - - return GetIamPolicyRequest; - })(); - - v1.TestIamPermissionsRequest = (function() { - - /** - * Properties of a TestIamPermissionsRequest. - * @memberof google.iam.v1 - * @interface ITestIamPermissionsRequest - * @property {string|null} [resource] TestIamPermissionsRequest resource - * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions - */ - - /** - * Constructs a new TestIamPermissionsRequest. - * @memberof google.iam.v1 - * @classdesc Represents a TestIamPermissionsRequest. - * @implements ITestIamPermissionsRequest - * @constructor - * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set - */ - function TestIamPermissionsRequest(properties) { - this.permissions = []; - 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]]; - } - - /** - * TestIamPermissionsRequest resource. - * @member {string} resource - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - */ - TestIamPermissionsRequest.prototype.resource = ""; - - /** - * TestIamPermissionsRequest permissions. - * @member {Array.} permissions - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - */ - TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; - - /** - * Creates a new TestIamPermissionsRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance - */ - TestIamPermissionsRequest.create = function create(properties) { - return new TestIamPermissionsRequest(properties); - }; - - /** - * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.permissions != null && message.permissions.length) - for (var i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); - return writer; - }; - - /** - * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TestIamPermissionsRequest message. - * @function verify - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TestIamPermissionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (var i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; - } - return null; - }; - - /** - * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - */ - TestIamPermissionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) - return object; - var message = new $root.google.iam.v1.TestIamPermissionsRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); - message.permissions = []; - for (var i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); - } - return message; - }; - - /** - * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TestIamPermissionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (options.defaults) - object.resource = ""; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (var j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; - } - return object; - }; - - /** - * Converts this TestIamPermissionsRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - * @returns {Object.} JSON object - */ - TestIamPermissionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TestIamPermissionsRequest - * @function getTypeUrl - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TestIamPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsRequest"; - }; - - return TestIamPermissionsRequest; - })(); - - v1.TestIamPermissionsResponse = (function() { - - /** - * Properties of a TestIamPermissionsResponse. - * @memberof google.iam.v1 - * @interface ITestIamPermissionsResponse - * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions - */ - - /** - * Constructs a new TestIamPermissionsResponse. - * @memberof google.iam.v1 - * @classdesc Represents a TestIamPermissionsResponse. - * @implements ITestIamPermissionsResponse - * @constructor - * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set - */ - function TestIamPermissionsResponse(properties) { - this.permissions = []; - 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]]; - } - - /** - * TestIamPermissionsResponse permissions. - * @member {Array.} permissions - * @memberof google.iam.v1.TestIamPermissionsResponse - * @instance - */ - TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; - - /** - * Creates a new TestIamPermissionsResponse instance using the specified properties. - * @function create - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance - */ - TestIamPermissionsResponse.create = function create(properties) { - return new TestIamPermissionsResponse(properties); - }; - - /** - * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.permissions != null && message.permissions.length) - for (var i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); - return writer; - }; - - /** - * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TestIamPermissionsResponse message. - * @function verify - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TestIamPermissionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (var i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; - } - return null; - }; - - /** - * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - */ - TestIamPermissionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) - return object; - var message = new $root.google.iam.v1.TestIamPermissionsResponse(); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); - message.permissions = []; - for (var i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); - } - return message; - }; - - /** - * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TestIamPermissionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (var j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; - } - return object; - }; - - /** - * Converts this TestIamPermissionsResponse to JSON. - * @function toJSON - * @memberof google.iam.v1.TestIamPermissionsResponse - * @instance - * @returns {Object.} JSON object - */ - TestIamPermissionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TestIamPermissionsResponse - * @function getTypeUrl - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TestIamPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsResponse"; - }; - - return TestIamPermissionsResponse; - })(); - - v1.GetPolicyOptions = (function() { - - /** - * Properties of a GetPolicyOptions. - * @memberof google.iam.v1 - * @interface IGetPolicyOptions - * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion - */ - - /** - * Constructs a new GetPolicyOptions. - * @memberof google.iam.v1 - * @classdesc Represents a GetPolicyOptions. - * @implements IGetPolicyOptions - * @constructor - * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set - */ - function GetPolicyOptions(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]]; - } - - /** - * GetPolicyOptions requestedPolicyVersion. - * @member {number} requestedPolicyVersion - * @memberof google.iam.v1.GetPolicyOptions - * @instance - */ - GetPolicyOptions.prototype.requestedPolicyVersion = 0; - - /** - * Creates a new GetPolicyOptions instance using the specified properties. - * @function create - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance - */ - GetPolicyOptions.create = function create(properties) { - return new GetPolicyOptions(properties); - }; - - /** - * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPolicyOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); - return writer; - }; - - /** - * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPolicyOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.requestedPolicyVersion = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPolicyOptions message. - * @function verify - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPolicyOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) - if (!$util.isInteger(message.requestedPolicyVersion)) - return "requestedPolicyVersion: integer expected"; - return null; - }; - - /** - * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - */ - GetPolicyOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.GetPolicyOptions) - return object; - var message = new $root.google.iam.v1.GetPolicyOptions(); - if (object.requestedPolicyVersion != null) - message.requestedPolicyVersion = object.requestedPolicyVersion | 0; - return message; - }; - - /** - * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPolicyOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.requestedPolicyVersion = 0; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) - object.requestedPolicyVersion = message.requestedPolicyVersion; - return object; - }; - - /** - * Converts this GetPolicyOptions to JSON. - * @function toJSON - * @memberof google.iam.v1.GetPolicyOptions - * @instance - * @returns {Object.} JSON object - */ - GetPolicyOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPolicyOptions - * @function getTypeUrl - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPolicyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.GetPolicyOptions"; - }; - - return GetPolicyOptions; - })(); - - v1.Policy = (function() { - - /** - * Properties of a Policy. - * @memberof google.iam.v1 - * @interface IPolicy - * @property {number|null} [version] Policy version - * @property {Array.|null} [bindings] Policy bindings - * @property {Array.|null} [auditConfigs] Policy auditConfigs - * @property {Uint8Array|null} [etag] Policy etag - */ - - /** - * Constructs a new Policy. - * @memberof google.iam.v1 - * @classdesc Represents a Policy. - * @implements IPolicy - * @constructor - * @param {google.iam.v1.IPolicy=} [properties] Properties to set - */ - function Policy(properties) { - this.bindings = []; - this.auditConfigs = []; - 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]]; - } - - /** - * Policy version. - * @member {number} version - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.version = 0; - - /** - * Policy bindings. - * @member {Array.} bindings - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.bindings = $util.emptyArray; - - /** - * Policy auditConfigs. - * @member {Array.} auditConfigs - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.auditConfigs = $util.emptyArray; - - /** - * Policy etag. - * @member {Uint8Array} etag - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.etag = $util.newBuffer([]); - - /** - * Creates a new Policy instance using the specified properties. - * @function create - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy=} [properties] Properties to set - * @returns {google.iam.v1.Policy} Policy instance - */ - Policy.create = function create(properties) { - return new Policy(properties); - }; - - /** - * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Policy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); - if (message.bindings != null && message.bindings.length) - for (var i = 0; i < message.bindings.length; ++i) - $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.auditConfigs != null && message.auditConfigs.length) - for (var i = 0; i < message.auditConfigs.length; ++i) - $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Policy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Policy message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.Policy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Policy} Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Policy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.version = reader.int32(); - break; - } - case 4: { - if (!(message.bindings && message.bindings.length)) - message.bindings = []; - message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.auditConfigs && message.auditConfigs.length)) - message.auditConfigs = []; - message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); - break; - } - case 3: { - message.etag = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Policy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.Policy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Policy} Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Policy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Policy message. - * @function verify - * @memberof google.iam.v1.Policy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Policy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version)) - return "version: integer expected"; - if (message.bindings != null && message.hasOwnProperty("bindings")) { - if (!Array.isArray(message.bindings)) - return "bindings: array expected"; - for (var i = 0; i < message.bindings.length; ++i) { - var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); - if (error) - return "bindings." + error; - } - } - if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { - if (!Array.isArray(message.auditConfigs)) - return "auditConfigs: array expected"; - for (var i = 0; i < message.auditConfigs.length; ++i) { - var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); - if (error) - return "auditConfigs." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) - return "etag: buffer expected"; - return null; - }; - - /** - * Creates a Policy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.Policy - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.Policy} Policy - */ - Policy.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Policy) - return object; - var message = new $root.google.iam.v1.Policy(); - if (object.version != null) - message.version = object.version | 0; - if (object.bindings) { - if (!Array.isArray(object.bindings)) - throw TypeError(".google.iam.v1.Policy.bindings: array expected"); - message.bindings = []; - for (var i = 0; i < object.bindings.length; ++i) { - if (typeof object.bindings[i] !== "object") - throw TypeError(".google.iam.v1.Policy.bindings: object expected"); - message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); - } - } - if (object.auditConfigs) { - if (!Array.isArray(object.auditConfigs)) - throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); - message.auditConfigs = []; - for (var i = 0; i < object.auditConfigs.length; ++i) { - if (typeof object.auditConfigs[i] !== "object") - throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); - message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); - } - } - if (object.etag != null) - if (typeof object.etag === "string") - $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); - else if (object.etag.length >= 0) - message.etag = object.etag; - return message; - }; - - /** - * Creates a plain object from a Policy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.Policy} message Policy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Policy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bindings = []; - object.auditConfigs = []; - } - if (options.defaults) { - object.version = 0; - if (options.bytes === String) - object.etag = ""; - else { - object.etag = []; - if (options.bytes !== Array) - object.etag = $util.newBuffer(object.etag); - } - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; - if (message.bindings && message.bindings.length) { - object.bindings = []; - for (var j = 0; j < message.bindings.length; ++j) - object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); - } - if (message.auditConfigs && message.auditConfigs.length) { - object.auditConfigs = []; - for (var j = 0; j < message.auditConfigs.length; ++j) - object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); - } - return object; - }; - - /** - * Converts this Policy to JSON. - * @function toJSON - * @memberof google.iam.v1.Policy - * @instance - * @returns {Object.} JSON object - */ - Policy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Policy - * @function getTypeUrl - * @memberof google.iam.v1.Policy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.Policy"; - }; - - return Policy; - })(); - - v1.Binding = (function() { - - /** - * Properties of a Binding. - * @memberof google.iam.v1 - * @interface IBinding - * @property {string|null} [role] Binding role - * @property {Array.|null} [members] Binding members - * @property {google.type.IExpr|null} [condition] Binding condition - */ - - /** - * Constructs a new Binding. - * @memberof google.iam.v1 - * @classdesc Represents a Binding. - * @implements IBinding - * @constructor - * @param {google.iam.v1.IBinding=} [properties] Properties to set - */ - function Binding(properties) { - this.members = []; - 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]]; - } - - /** - * Binding role. - * @member {string} role - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.role = ""; - - /** - * Binding members. - * @member {Array.} members - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.members = $util.emptyArray; - - /** - * Binding condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.condition = null; - - /** - * Creates a new Binding instance using the specified properties. - * @function create - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding=} [properties] Properties to set - * @returns {google.iam.v1.Binding} Binding instance - */ - Binding.create = function create(properties) { - return new Binding(properties); - }; - - /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); - if (message.members != null && message.members.length) - for (var i = 0; i < message.members.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Binding message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.role = reader.string(); - break; - } - case 2: { - if (!(message.members && message.members.length)) - message.members = []; - message.members.push(reader.string()); - break; - } - case 3: { - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Binding message. - * @function verify - * @memberof google.iam.v1.Binding - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Binding.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.members != null && message.hasOwnProperty("members")) { - if (!Array.isArray(message.members)) - return "members: array expected"; - for (var i = 0; i < message.members.length; ++i) - if (!$util.isString(message.members[i])) - return "members: string[] expected"; - } - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; - } - return null; - }; - - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.Binding - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.Binding} Binding - */ - Binding.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Binding) - return object; - var message = new $root.google.iam.v1.Binding(); - if (object.role != null) - message.role = String(object.role); - if (object.members) { - if (!Array.isArray(object.members)) - throw TypeError(".google.iam.v1.Binding.members: array expected"); - message.members = []; - for (var i = 0; i < object.members.length; ++i) - message.members[i] = String(object.members[i]); - } - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.Binding.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); - } - return message; - }; - - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.Binding} message Binding - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Binding.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.members = []; - if (options.defaults) { - object.role = ""; - object.condition = null; - } - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.members && message.members.length) { - object.members = []; - for (var j = 0; j < message.members.length; ++j) - object.members[j] = message.members[j]; - } - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); - return object; - }; - - /** - * Converts this Binding to JSON. - * @function toJSON - * @memberof google.iam.v1.Binding - * @instance - * @returns {Object.} JSON object - */ - Binding.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Binding - * @function getTypeUrl - * @memberof google.iam.v1.Binding - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.Binding"; - }; - - return Binding; - })(); - - v1.AuditConfig = (function() { - - /** - * Properties of an AuditConfig. - * @memberof google.iam.v1 - * @interface IAuditConfig - * @property {string|null} [service] AuditConfig service - * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs - */ - - /** - * Constructs a new AuditConfig. - * @memberof google.iam.v1 - * @classdesc Represents an AuditConfig. - * @implements IAuditConfig - * @constructor - * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set - */ - function AuditConfig(properties) { - this.auditLogConfigs = []; - 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]]; - } - - /** - * AuditConfig service. - * @member {string} service - * @memberof google.iam.v1.AuditConfig - * @instance - */ - AuditConfig.prototype.service = ""; - - /** - * AuditConfig auditLogConfigs. - * @member {Array.} auditLogConfigs - * @memberof google.iam.v1.AuditConfig - * @instance - */ - AuditConfig.prototype.auditLogConfigs = $util.emptyArray; - - /** - * Creates a new AuditConfig instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set - * @returns {google.iam.v1.AuditConfig} AuditConfig instance - */ - AuditConfig.create = function create(properties) { - return new AuditConfig(properties); - }; - - /** - * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - if (message.auditLogConfigs != null && message.auditLogConfigs.length) - for (var i = 0; i < message.auditLogConfigs.length; ++i) - $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditConfig message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditConfig} AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.service = reader.string(); - break; - } - case 3: { - if (!(message.auditLogConfigs && message.auditLogConfigs.length)) - message.auditLogConfigs = []; - message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditConfig} AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditConfig message. - * @function verify - * @memberof google.iam.v1.AuditConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { - if (!Array.isArray(message.auditLogConfigs)) - return "auditLogConfigs: array expected"; - for (var i = 0; i < message.auditLogConfigs.length; ++i) { - var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); - if (error) - return "auditLogConfigs." + error; - } - } - return null; - }; - - /** - * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditConfig - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditConfig} AuditConfig - */ - AuditConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditConfig) - return object; - var message = new $root.google.iam.v1.AuditConfig(); - if (object.service != null) - message.service = String(object.service); - if (object.auditLogConfigs) { - if (!Array.isArray(object.auditLogConfigs)) - throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); - message.auditLogConfigs = []; - for (var i = 0; i < object.auditLogConfigs.length; ++i) { - if (typeof object.auditLogConfigs[i] !== "object") - throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); - message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.AuditConfig} message AuditConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.auditLogConfigs = []; - if (options.defaults) - object.service = ""; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.auditLogConfigs && message.auditLogConfigs.length) { - object.auditLogConfigs = []; - for (var j = 0; j < message.auditLogConfigs.length; ++j) - object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); - } - return object; - }; - - /** - * Converts this AuditConfig to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditConfig - * @instance - * @returns {Object.} JSON object - */ - AuditConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditConfig - * @function getTypeUrl - * @memberof google.iam.v1.AuditConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditConfig"; - }; - - return AuditConfig; - })(); - - v1.AuditLogConfig = (function() { - - /** - * Properties of an AuditLogConfig. - * @memberof google.iam.v1 - * @interface IAuditLogConfig - * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType - * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers - */ - - /** - * Constructs a new AuditLogConfig. - * @memberof google.iam.v1 - * @classdesc Represents an AuditLogConfig. - * @implements IAuditLogConfig - * @constructor - * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set - */ - function AuditLogConfig(properties) { - this.exemptedMembers = []; - 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]]; - } - - /** - * AuditLogConfig logType. - * @member {google.iam.v1.AuditLogConfig.LogType} logType - * @memberof google.iam.v1.AuditLogConfig - * @instance - */ - AuditLogConfig.prototype.logType = 0; - - /** - * AuditLogConfig exemptedMembers. - * @member {Array.} exemptedMembers - * @memberof google.iam.v1.AuditLogConfig - * @instance - */ - AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; - - /** - * Creates a new AuditLogConfig instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance - */ - AuditLogConfig.create = function create(properties) { - return new AuditLogConfig(properties); - }; - - /** - * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditLogConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); - if (message.exemptedMembers != null && message.exemptedMembers.length) - for (var i = 0; i < message.exemptedMembers.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); - return writer; - }; - - /** - * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditLogConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.logType = reader.int32(); - break; - } - case 2: { - if (!(message.exemptedMembers && message.exemptedMembers.length)) - message.exemptedMembers = []; - message.exemptedMembers.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditLogConfig message. - * @function verify - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditLogConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logType != null && message.hasOwnProperty("logType")) - switch (message.logType) { - default: - return "logType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { - if (!Array.isArray(message.exemptedMembers)) - return "exemptedMembers: array expected"; - for (var i = 0; i < message.exemptedMembers.length; ++i) - if (!$util.isString(message.exemptedMembers[i])) - return "exemptedMembers: string[] expected"; - } - return null; - }; - - /** - * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - */ - AuditLogConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditLogConfig) - return object; - var message = new $root.google.iam.v1.AuditLogConfig(); - switch (object.logType) { - default: - if (typeof object.logType === "number") { - message.logType = object.logType; - break; - } - break; - case "LOG_TYPE_UNSPECIFIED": - case 0: - message.logType = 0; - break; - case "ADMIN_READ": - case 1: - message.logType = 1; - break; - case "DATA_WRITE": - case 2: - message.logType = 2; - break; - case "DATA_READ": - case 3: - message.logType = 3; - break; - } - if (object.exemptedMembers) { - if (!Array.isArray(object.exemptedMembers)) - throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); - message.exemptedMembers = []; - for (var i = 0; i < object.exemptedMembers.length; ++i) - message.exemptedMembers[i] = String(object.exemptedMembers[i]); - } - return message; - }; - - /** - * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditLogConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.exemptedMembers = []; - if (options.defaults) - object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; - if (message.logType != null && message.hasOwnProperty("logType")) - object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; - if (message.exemptedMembers && message.exemptedMembers.length) { - object.exemptedMembers = []; - for (var j = 0; j < message.exemptedMembers.length; ++j) - object.exemptedMembers[j] = message.exemptedMembers[j]; - } - return object; - }; - - /** - * Converts this AuditLogConfig to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditLogConfig - * @instance - * @returns {Object.} JSON object - */ - AuditLogConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditLogConfig - * @function getTypeUrl - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; - }; - - /** - * LogType enum. - * @name google.iam.v1.AuditLogConfig.LogType - * @enum {number} - * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value - * @property {number} ADMIN_READ=1 ADMIN_READ value - * @property {number} DATA_WRITE=2 DATA_WRITE value - * @property {number} DATA_READ=3 DATA_READ value - */ - AuditLogConfig.LogType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADMIN_READ"] = 1; - values[valuesById[2] = "DATA_WRITE"] = 2; - values[valuesById[3] = "DATA_READ"] = 3; - return values; - })(); - - return AuditLogConfig; - })(); - - v1.PolicyDelta = (function() { - - /** - * Properties of a PolicyDelta. - * @memberof google.iam.v1 - * @interface IPolicyDelta - * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas - * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas - */ - - /** - * Constructs a new PolicyDelta. - * @memberof google.iam.v1 - * @classdesc Represents a PolicyDelta. - * @implements IPolicyDelta - * @constructor - * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set - */ - function PolicyDelta(properties) { - this.bindingDeltas = []; - this.auditConfigDeltas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PolicyDelta bindingDeltas. - * @member {Array.} bindingDeltas - * @memberof google.iam.v1.PolicyDelta - * @instance - */ - PolicyDelta.prototype.bindingDeltas = $util.emptyArray; - - /** - * PolicyDelta auditConfigDeltas. - * @member {Array.} auditConfigDeltas - * @memberof google.iam.v1.PolicyDelta - * @instance - */ - PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; - - /** - * Creates a new PolicyDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set - * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance - */ - PolicyDelta.create = function create(properties) { - return new PolicyDelta(properties); - }; - - /** - * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bindingDeltas != null && message.bindingDeltas.length) - for (var i = 0; i < message.bindingDeltas.length; ++i) - $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) - for (var i = 0; i < message.auditConfigDeltas.length; ++i) - $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDelta.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.bindingDeltas && message.bindingDeltas.length)) - message.bindingDeltas = []; - message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) - message.auditConfigDeltas = []; - message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PolicyDelta message. - * @function verify - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PolicyDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { - if (!Array.isArray(message.bindingDeltas)) - return "bindingDeltas: array expected"; - for (var i = 0; i < message.bindingDeltas.length; ++i) { - var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); - if (error) - return "bindingDeltas." + error; - } - } - if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { - if (!Array.isArray(message.auditConfigDeltas)) - return "auditConfigDeltas: array expected"; - for (var i = 0; i < message.auditConfigDeltas.length; ++i) { - var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); - if (error) - return "auditConfigDeltas." + error; - } - } - return null; - }; - - /** - * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - */ - PolicyDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.PolicyDelta) - return object; - var message = new $root.google.iam.v1.PolicyDelta(); - if (object.bindingDeltas) { - if (!Array.isArray(object.bindingDeltas)) - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); - message.bindingDeltas = []; - for (var i = 0; i < object.bindingDeltas.length; ++i) { - if (typeof object.bindingDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); - message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); - } - } - if (object.auditConfigDeltas) { - if (!Array.isArray(object.auditConfigDeltas)) - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); - message.auditConfigDeltas = []; - for (var i = 0; i < object.auditConfigDeltas.length; ++i) { - if (typeof object.auditConfigDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); - message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.PolicyDelta} message PolicyDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PolicyDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bindingDeltas = []; - object.auditConfigDeltas = []; - } - if (message.bindingDeltas && message.bindingDeltas.length) { - object.bindingDeltas = []; - for (var j = 0; j < message.bindingDeltas.length; ++j) - object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); - } - if (message.auditConfigDeltas && message.auditConfigDeltas.length) { - object.auditConfigDeltas = []; - for (var j = 0; j < message.auditConfigDeltas.length; ++j) - object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); - } - return object; - }; - - /** - * Converts this PolicyDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.PolicyDelta - * @instance - * @returns {Object.} JSON object - */ - PolicyDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PolicyDelta - * @function getTypeUrl - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; - }; - - return PolicyDelta; - })(); - - v1.BindingDelta = (function() { - - /** - * Properties of a BindingDelta. - * @memberof google.iam.v1 - * @interface IBindingDelta - * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action - * @property {string|null} [role] BindingDelta role - * @property {string|null} [member] BindingDelta member - * @property {google.type.IExpr|null} [condition] BindingDelta condition - */ - - /** - * Constructs a new BindingDelta. - * @memberof google.iam.v1 - * @classdesc Represents a BindingDelta. - * @implements IBindingDelta - * @constructor - * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set - */ - function BindingDelta(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]]; - } - - /** - * BindingDelta action. - * @member {google.iam.v1.BindingDelta.Action} action - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.action = 0; - - /** - * BindingDelta role. - * @member {string} role - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.role = ""; - - /** - * BindingDelta member. - * @member {string} member - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.member = ""; - - /** - * BindingDelta condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.condition = null; - - /** - * Creates a new BindingDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set - * @returns {google.iam.v1.BindingDelta} BindingDelta instance - */ - BindingDelta.create = function create(properties) { - return new BindingDelta(properties); - }; - - /** - * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BindingDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); - if (message.member != null && Object.hasOwnProperty.call(message, "member")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BindingDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.BindingDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.BindingDelta} BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BindingDelta.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.action = reader.int32(); - break; - } - case 2: { - message.role = reader.string(); - break; - } - case 3: { - message.member = reader.string(); - break; - } - case 4: { - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BindingDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.BindingDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.BindingDelta} BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BindingDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BindingDelta message. - * @function verify - * @memberof google.iam.v1.BindingDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BindingDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.member != null && message.hasOwnProperty("member")) - if (!$util.isString(message.member)) - return "member: string expected"; - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; - } - return null; - }; - - /** - * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.BindingDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.BindingDelta} BindingDelta - */ - BindingDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.BindingDelta) - return object; - var message = new $root.google.iam.v1.BindingDelta(); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; - break; - } - if (object.role != null) - message.role = String(object.role); - if (object.member != null) - message.member = String(object.member); - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); - } - return message; - }; - - /** - * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.BindingDelta} message BindingDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BindingDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.role = ""; - object.member = ""; - object.condition = null; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.member != null && message.hasOwnProperty("member")) - object.member = message.member; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); - return object; - }; - - /** - * Converts this BindingDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.BindingDelta - * @instance - * @returns {Object.} JSON object - */ - BindingDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BindingDelta - * @function getTypeUrl - * @memberof google.iam.v1.BindingDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.BindingDelta"; - }; - - /** - * Action enum. - * @name google.iam.v1.BindingDelta.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - BindingDelta.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); - - return BindingDelta; - })(); - - v1.AuditConfigDelta = (function() { - - /** - * Properties of an AuditConfigDelta. - * @memberof google.iam.v1 - * @interface IAuditConfigDelta - * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action - * @property {string|null} [service] AuditConfigDelta service - * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember - * @property {string|null} [logType] AuditConfigDelta logType - */ - - /** - * Constructs a new AuditConfigDelta. - * @memberof google.iam.v1 - * @classdesc Represents an AuditConfigDelta. - * @implements IAuditConfigDelta - * @constructor - * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set - */ - function AuditConfigDelta(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]]; - } - - /** - * AuditConfigDelta action. - * @member {google.iam.v1.AuditConfigDelta.Action} action - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.action = 0; - - /** - * AuditConfigDelta service. - * @member {string} service - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.service = ""; - - /** - * AuditConfigDelta exemptedMember. - * @member {string} exemptedMember - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.exemptedMember = ""; - - /** - * AuditConfigDelta logType. - * @member {string} logType - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.logType = ""; - - /** - * Creates a new AuditConfigDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance - */ - AuditConfigDelta.create = function create(properties) { - return new AuditConfigDelta(properties); - }; - - /** - * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfigDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); - if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); - if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); - return writer; - }; - - /** - * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfigDelta.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.action = reader.int32(); - break; - } - case 2: { - message.service = reader.string(); - break; - } - case 3: { - message.exemptedMember = reader.string(); - break; - } - case 4: { - message.logType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditConfigDelta message. - * @function verify - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditConfigDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - if (!$util.isString(message.exemptedMember)) - return "exemptedMember: string expected"; - if (message.logType != null && message.hasOwnProperty("logType")) - if (!$util.isString(message.logType)) - return "logType: string expected"; - return null; - }; - - /** - * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - */ - AuditConfigDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditConfigDelta) - return object; - var message = new $root.google.iam.v1.AuditConfigDelta(); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; - break; - } - if (object.service != null) - message.service = String(object.service); - if (object.exemptedMember != null) - message.exemptedMember = String(object.exemptedMember); - if (object.logType != null) - message.logType = String(object.logType); - return message; - }; - - /** - * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditConfigDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.service = ""; - object.exemptedMember = ""; - object.logType = ""; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - object.exemptedMember = message.exemptedMember; - if (message.logType != null && message.hasOwnProperty("logType")) - object.logType = message.logType; - return object; - }; - - /** - * Converts this AuditConfigDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditConfigDelta - * @instance - * @returns {Object.} JSON object - */ - AuditConfigDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditConfigDelta - * @function getTypeUrl - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; - }; - - /** - * Action enum. - * @name google.iam.v1.AuditConfigDelta.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - AuditConfigDelta.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); - - return AuditConfigDelta; - })(); - - return v1; - })(); - - return iam; - })(); - - google.longrunning = (function() { - - /** - * Namespace longrunning. - * @memberof google - * @namespace - */ - var longrunning = {}; - - longrunning.Operations = (function() { - - /** - * Constructs a new Operations service. - * @memberof google.longrunning - * @classdesc Represents an Operations - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Operations(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; - - /** - * Creates new Operations service using the specified rpc implementation. - * @function create - * @memberof google.longrunning.Operations - * @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 {Operations} RPC service. Useful where requests and/or responses are streamed. - */ - Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @memberof google.longrunning.Operations - * @typedef ListOperationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse - */ - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { - return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); - }, "name", { value: "ListOperations" }); - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @memberof google.longrunning.Operations - * @typedef GetOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "GetOperation" }); - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @memberof google.longrunning.Operations - * @typedef DeleteOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { - return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteOperation" }); - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @memberof google.longrunning.Operations - * @typedef CancelOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { - return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelOperation" }); - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @memberof google.longrunning.Operations - * @typedef WaitOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { - return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "WaitOperation" }); - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Operations; - })(); - - longrunning.Operation = (function() { - - /** - * Properties of an Operation. - * @memberof google.longrunning - * @interface IOperation - * @property {string|null} [name] Operation name - * @property {google.protobuf.IAny|null} [metadata] Operation metadata - * @property {boolean|null} [done] Operation done - * @property {google.rpc.IStatus|null} [error] Operation error - * @property {google.protobuf.IAny|null} [response] Operation response - */ - - /** - * Constructs a new Operation. - * @memberof google.longrunning - * @classdesc Represents an Operation. - * @implements IOperation - * @constructor - * @param {google.longrunning.IOperation=} [properties] Properties to set - */ - function Operation(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]]; - } - - /** - * Operation name. - * @member {string} name - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.name = ""; - - /** - * Operation metadata. - * @member {google.protobuf.IAny|null|undefined} metadata - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.metadata = null; - - /** - * Operation done. - * @member {boolean} done - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.done = false; - - /** - * Operation error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.error = null; - - /** - * Operation response. - * @member {google.protobuf.IAny|null|undefined} response - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.response = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Operation result. - * @member {"error"|"response"|undefined} result - * @memberof google.longrunning.Operation - * @instance - */ - Object.defineProperty(Operation.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["error", "response"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Operation instance using the specified properties. - * @function create - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation=} [properties] Properties to set - * @returns {google.longrunning.Operation} Operation instance - */ - Operation.create = function create(properties) { - return new Operation(properties); - }; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encode - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.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.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.done != null && Object.hasOwnProperty.call(message, "done")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.response != null && Object.hasOwnProperty.call(message, "response")) - $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - case 3: { - message.done = reader.bool(); - break; - } - case 4: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Operation message. - * @function verify - * @memberof google.longrunning.Operation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Operation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Any.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.done != null && message.hasOwnProperty("done")) - if (typeof message.done !== "boolean") - return "done: boolean expected"; - if (message.error != null && message.hasOwnProperty("error")) { - properties.result = 1; - { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - } - if (message.response != null && message.hasOwnProperty("response")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.protobuf.Any.verify(message.response); - if (error) - return "response." + error; - } - } - return null; - }; - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.Operation - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.Operation} Operation - */ - Operation.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.Operation) - return object; - var message = new $root.google.longrunning.Operation(); - if (object.name != null) - message.name = String(object.name); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.longrunning.Operation.metadata: object expected"); - message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); - } - if (object.done != null) - message.done = Boolean(object.done); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.longrunning.Operation.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.response != null) { - if (typeof object.response !== "object") - throw TypeError(".google.longrunning.Operation.response: object expected"); - message.response = $root.google.protobuf.Any.fromObject(object.response); - } - return message; - }; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.Operation} message Operation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Operation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.metadata = null; - object.done = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); - if (message.done != null && message.hasOwnProperty("done")) - object.done = message.done; - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (options.oneofs) - object.result = "error"; - } - if (message.response != null && message.hasOwnProperty("response")) { - object.response = $root.google.protobuf.Any.toObject(message.response, options); - if (options.oneofs) - object.result = "response"; - } - return object; - }; - - /** - * Converts this Operation to JSON. - * @function toJSON - * @memberof google.longrunning.Operation - * @instance - * @returns {Object.} JSON object - */ - Operation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Operation - * @function getTypeUrl - * @memberof google.longrunning.Operation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.Operation"; - }; - - return Operation; - })(); - - longrunning.GetOperationRequest = (function() { - - /** - * Properties of a GetOperationRequest. - * @memberof google.longrunning - * @interface IGetOperationRequest - * @property {string|null} [name] GetOperationRequest name - */ - - /** - * Constructs a new GetOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a GetOperationRequest. - * @implements IGetOperationRequest - * @constructor - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - */ - function GetOperationRequest(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]]; - } - - /** - * GetOperationRequest name. - * @member {string} name - * @memberof google.longrunning.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.name = ""; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance - */ - GetOperationRequest.create = function create(properties) { - return new GetOperationRequest(properties); - }; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.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 GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOperationRequest message. - * @function verify - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOperationRequest.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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - */ - GetOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.GetOperationRequest) - return object; - var message = new $root.google.longrunning.GetOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.GetOperationRequest} message GetOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOperationRequest.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 GetOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.GetOperationRequest - * @instance - * @returns {Object.} JSON object - */ - GetOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; - }; - - return GetOperationRequest; - })(); - - longrunning.ListOperationsRequest = (function() { - - /** - * Properties of a ListOperationsRequest. - * @memberof google.longrunning - * @interface IListOperationsRequest - * @property {string|null} [name] ListOperationsRequest name - * @property {string|null} [filter] ListOperationsRequest filter - * @property {number|null} [pageSize] ListOperationsRequest pageSize - * @property {string|null} [pageToken] ListOperationsRequest pageToken - */ - - /** - * Constructs a new ListOperationsRequest. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsRequest. - * @implements IListOperationsRequest - * @constructor - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - */ - function ListOperationsRequest(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]]; - } - - /** - * ListOperationsRequest name. - * @member {string} name - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.name = ""; - - /** - * ListOperationsRequest filter. - * @member {string} filter - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.filter = ""; - - /** - * ListOperationsRequest pageSize. - * @member {number} pageSize - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageSize = 0; - - /** - * ListOperationsRequest pageToken. - * @member {string} pageToken - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance - */ - ListOperationsRequest.create = function create(properties) { - return new ListOperationsRequest(properties); - }; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - 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 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 4: { - message.name = reader.string(); - break; - } - case 1: { - message.filter = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsRequest message. - * @function verify - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsRequest.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.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 ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - */ - ListOperationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsRequest) - return object; - var message = new $root.google.longrunning.ListOperationsRequest(); - if (object.name != null) - message.name = String(object.name); - 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 ListOperationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.name = ""; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - 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; - return object; - }; - - /** - * Converts this ListOperationsRequest to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListOperationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsRequest - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; - }; - - return ListOperationsRequest; - })(); - - longrunning.ListOperationsResponse = (function() { - - /** - * Properties of a ListOperationsResponse. - * @memberof google.longrunning - * @interface IListOperationsResponse - * @property {Array.|null} [operations] ListOperationsResponse operations - * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken - */ - - /** - * Constructs a new ListOperationsResponse. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsResponse. - * @implements IListOperationsResponse - * @constructor - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - */ - function ListOperationsResponse(properties) { - this.operations = []; - 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]]; - } - - /** - * ListOperationsResponse operations. - * @member {Array.} operations - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.operations = $util.emptyArray; - - /** - * ListOperationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance - */ - ListOperationsResponse.create = function create(properties) { - return new ListOperationsResponse(properties); - }; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operations != null && message.operations.length) - for (var i = 0; i < message.operations.length; ++i) - $root.google.longrunning.Operation.encode(message.operations[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 ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsResponse message. - * @function verify - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operations != null && message.hasOwnProperty("operations")) { - if (!Array.isArray(message.operations)) - return "operations: array expected"; - for (var i = 0; i < message.operations.length; ++i) { - var error = $root.google.longrunning.Operation.verify(message.operations[i]); - if (error) - return "operations." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - */ - ListOperationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsResponse) - return object; - var message = new $root.google.longrunning.ListOperationsResponse(); - if (object.operations) { - if (!Array.isArray(object.operations)) - throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); - message.operations = []; - for (var i = 0; i < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") - throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); - message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.operations = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.operations && message.operations.length) { - object.operations = []; - for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListOperationsResponse to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListOperationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsResponse - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; - }; - - return ListOperationsResponse; - })(); - - longrunning.CancelOperationRequest = (function() { - - /** - * Properties of a CancelOperationRequest. - * @memberof google.longrunning - * @interface ICancelOperationRequest - * @property {string|null} [name] CancelOperationRequest name - */ - - /** - * Constructs a new CancelOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a CancelOperationRequest. - * @implements ICancelOperationRequest - * @constructor - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - */ - function CancelOperationRequest(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]]; - } - - /** - * CancelOperationRequest name. - * @member {string} name - * @memberof google.longrunning.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.name = ""; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance - */ - CancelOperationRequest.create = function create(properties) { - return new CancelOperationRequest(properties); - }; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.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 CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelOperationRequest message. - * @function verify - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelOperationRequest.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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - */ - CancelOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.CancelOperationRequest) - return object; - var message = new $root.google.longrunning.CancelOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelOperationRequest.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 CancelOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.CancelOperationRequest - * @instance - * @returns {Object.} JSON object - */ - CancelOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CancelOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; - }; - - return CancelOperationRequest; - })(); - - longrunning.DeleteOperationRequest = (function() { - - /** - * Properties of a DeleteOperationRequest. - * @memberof google.longrunning - * @interface IDeleteOperationRequest - * @property {string|null} [name] DeleteOperationRequest name - */ - - /** - * Constructs a new DeleteOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a DeleteOperationRequest. - * @implements IDeleteOperationRequest - * @constructor - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - */ - function DeleteOperationRequest(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]]; - } - - /** - * DeleteOperationRequest name. - * @member {string} name - * @memberof google.longrunning.DeleteOperationRequest - * @instance - */ - DeleteOperationRequest.prototype.name = ""; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance - */ - DeleteOperationRequest.create = function create(properties) { - return new DeleteOperationRequest(properties); - }; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.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 DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteOperationRequest message. - * @function verify - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteOperationRequest.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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - */ - DeleteOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.DeleteOperationRequest) - return object; - var message = new $root.google.longrunning.DeleteOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteOperationRequest.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 DeleteOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.DeleteOperationRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; - }; - - return DeleteOperationRequest; - })(); - - longrunning.WaitOperationRequest = (function() { - - /** - * Properties of a WaitOperationRequest. - * @memberof google.longrunning - * @interface IWaitOperationRequest - * @property {string|null} [name] WaitOperationRequest name - * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout - */ - - /** - * Constructs a new WaitOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a WaitOperationRequest. - * @implements IWaitOperationRequest - * @constructor - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - */ - function WaitOperationRequest(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]]; - } - - /** - * WaitOperationRequest name. - * @member {string} name - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.name = ""; - - /** - * WaitOperationRequest timeout. - * @member {google.protobuf.IDuration|null|undefined} timeout - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.timeout = null; - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance - */ - WaitOperationRequest.create = function create(properties) { - return new WaitOperationRequest(properties); - }; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.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.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WaitOperationRequest message. - * @function verify - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WaitOperationRequest.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.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); - if (error) - return "timeout." + error; - } - return null; - }; - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - */ - WaitOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.WaitOperationRequest) - return object; - var message = new $root.google.longrunning.WaitOperationRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.timeout != null) { - if (typeof object.timeout !== "object") - throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); - message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); - } - return message; - }; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WaitOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.timeout = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); - return object; - }; - - /** - * Converts this WaitOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.WaitOperationRequest - * @instance - * @returns {Object.} JSON object - */ - WaitOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WaitOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; - }; - - return WaitOperationRequest; - })(); - - longrunning.OperationInfo = (function() { - - /** - * Properties of an OperationInfo. - * @memberof google.longrunning - * @interface IOperationInfo - * @property {string|null} [responseType] OperationInfo responseType - * @property {string|null} [metadataType] OperationInfo metadataType - */ - - /** - * Constructs a new OperationInfo. - * @memberof google.longrunning - * @classdesc Represents an OperationInfo. - * @implements IOperationInfo - * @constructor - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - */ - function OperationInfo(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]]; - } - - /** - * OperationInfo responseType. - * @member {string} responseType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.responseType = ""; - - /** - * OperationInfo metadataType. - * @member {string} metadataType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.metadataType = ""; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @function create - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - * @returns {google.longrunning.OperationInfo} OperationInfo instance - */ - OperationInfo.create = function create(properties) { - return new OperationInfo(properties); - }; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encode - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); - if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); - return writer; - }; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.responseType = reader.string(); - break; - } - case 2: { - message.metadataType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationInfo message. - * @function verify - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.responseType != null && message.hasOwnProperty("responseType")) - if (!$util.isString(message.responseType)) - return "responseType: string expected"; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - if (!$util.isString(message.metadataType)) - return "metadataType: string expected"; - return null; - }; - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.OperationInfo} OperationInfo - */ - OperationInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.OperationInfo) - return object; - var message = new $root.google.longrunning.OperationInfo(); - if (object.responseType != null) - message.responseType = String(object.responseType); - if (object.metadataType != null) - message.metadataType = String(object.metadataType); - return message; - }; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.OperationInfo} message OperationInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.responseType = ""; - object.metadataType = ""; - } - if (message.responseType != null && message.hasOwnProperty("responseType")) - object.responseType = message.responseType; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - object.metadataType = message.metadataType; - return object; - }; - - /** - * Converts this OperationInfo to JSON. - * @function toJSON - * @memberof google.longrunning.OperationInfo - * @instance - * @returns {Object.} JSON object - */ - OperationInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationInfo - * @function getTypeUrl - * @memberof google.longrunning.OperationInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.OperationInfo"; - }; - - return OperationInfo; - })(); - - return longrunning; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-devtools-artifactregistry/protos/protos.json b/owl-bot-staging/google-devtools-artifactregistry/protos/protos.json deleted file mode 100644 index dc9bdac4d2d..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/protos/protos.json +++ /dev/null @@ -1,7531 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "devtools": { - "nested": { - "artifactregistry": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.ArtifactRegistry.V1", - "go_package": "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb", - "java_multiple_files": true, - "java_outer_classname": "YumArtifactProto", - "java_package": "com.google.devtools.artifactregistry.v1", - "php_namespace": "Google\\Cloud\\ArtifactRegistry\\V1", - "ruby_package": "Google::Cloud::ArtifactRegistry::V1", - "(google.api.resource_definition).type": "servicedirectory.googleapis.com/Service", - "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}" - }, - "nested": { - "AptArtifact": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/AptArtifact", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "packageName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "packageType": { - "type": "PackageType", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "architecture": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "component": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "controlFile": { - "type": "bytes", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "PackageType": { - "values": { - "PACKAGE_TYPE_UNSPECIFIED": 0, - "BINARY": 1, - "SOURCE": 2 - } - } - } - }, - "ImportAptArtifactsGcsSource": { - "fields": { - "uris": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "useWildcards": { - "type": "bool", - "id": 2 - } - } - }, - "ImportAptArtifactsRequest": { - "oneofs": { - "source": { - "oneof": [ - "gcsSource" - ] - } - }, - "fields": { - "gcsSource": { - "type": "ImportAptArtifactsGcsSource", - "id": 2 - }, - "parent": { - "type": "string", - "id": 1 - } - } - }, - "ImportAptArtifactsErrorInfo": { - "oneofs": { - "source": { - "oneof": [ - "gcsSource" - ] - } - }, - "fields": { - "gcsSource": { - "type": "ImportAptArtifactsGcsSource", - "id": 1 - }, - "error": { - "type": "google.rpc.Status", - "id": 2 - } - } - }, - "ImportAptArtifactsResponse": { - "fields": { - "aptArtifacts": { - "rule": "repeated", - "type": "AptArtifact", - "id": 1 - }, - "errors": { - "rule": "repeated", - "type": "ImportAptArtifactsErrorInfo", - "id": 2 - } - } - }, - "ImportAptArtifactsMetadata": { - "fields": {} - }, - "DockerImage": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/DockerImage", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "uri": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "tags": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "imageSizeBytes": { - "type": "int64", - "id": 4 - }, - "uploadTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "mediaType": { - "type": "string", - "id": 6 - }, - "buildTime": { - "type": "google.protobuf.Timestamp", - "id": 7 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "artifactType": { - "type": "string", - "id": 9 - }, - "imageManifests": { - "rule": "repeated", - "type": "ImageManifest", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ImageManifest": { - "fields": { - "architecture": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "os": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "digest": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "mediaType": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "osVersion": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "osFeatures": { - "rule": "repeated", - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "variant": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDockerImagesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "orderBy": { - "type": "string", - "id": 4 - } - } - }, - "ListDockerImagesResponse": { - "fields": { - "dockerImages": { - "rule": "repeated", - "type": "DockerImage", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetDockerImageRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/DockerImage" - } - } - } - }, - "MavenArtifact": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/MavenArtifact", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "pomUri": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "groupId": { - "type": "string", - "id": 3 - }, - "artifactId": { - "type": "string", - "id": 4 - }, - "version": { - "type": "string", - "id": 5 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ListMavenArtifactsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/MavenArtifact" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListMavenArtifactsResponse": { - "fields": { - "mavenArtifacts": { - "rule": "repeated", - "type": "MavenArtifact", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetMavenArtifactRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/MavenArtifact" - } - } - } - }, - "NpmPackage": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/NpmPackage", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "packageName": { - "type": "string", - "id": 3 - }, - "version": { - "type": "string", - "id": 4 - }, - "tags": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ListNpmPackagesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/NpmPackage" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListNpmPackagesResponse": { - "fields": { - "npmPackages": { - "rule": "repeated", - "type": "NpmPackage", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetNpmPackageRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/NpmPackage" - } - } - } - }, - "PythonPackage": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/PythonPackage", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "uri": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "packageName": { - "type": "string", - "id": 3 - }, - "version": { - "type": "string", - "id": 4 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ListPythonPackagesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/PythonPackage" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListPythonPackagesResponse": { - "fields": { - "pythonPackages": { - "rule": "repeated", - "type": "PythonPackage", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetPythonPackageRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/PythonPackage" - } - } - } - }, - "Attachment": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/Attachment", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/attachments/{attachment}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "target": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "type": { - "type": "string", - "id": 3 - }, - "attachmentNamespace": { - "type": "string", - "id": 4 - }, - "annotations": { - "keyType": "string", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "files": { - "rule": "repeated", - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/File" - } - }, - "ociVersionName": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ListAttachmentsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Attachment" - } - }, - "filter": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageSize": { - "type": "int32", - "id": 3 - }, - "pageToken": { - "type": "string", - "id": 4 - } - } - }, - "ListAttachmentsResponse": { - "fields": { - "attachments": { - "rule": "repeated", - "type": "Attachment", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetAttachmentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Attachment" - } - } - } - }, - "CreateAttachmentRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Attachment" - } - }, - "attachmentId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "attachment": { - "type": "Attachment", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteAttachmentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Attachment" - } - } - } - }, - "ExportArtifactRequest": { - "oneofs": { - "sourceArtifact": { - "oneof": [ - "sourceVersion", - "sourceTag" - ] - }, - "destination": { - "oneof": [ - "gcsPath" - ] - } - }, - "fields": { - "sourceVersion": { - "type": "string", - "id": 2, - "options": { - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Version" - } - }, - "sourceTag": { - "type": "string", - "id": 4, - "options": { - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Tag" - } - }, - "gcsPath": { - "type": "string", - "id": 3 - }, - "repository": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" - } - } - } - }, - "ExportArtifactResponse": { - "fields": { - "exportedVersion": { - "type": "Version", - "id": 1 - } - } - }, - "ExportArtifactMetadata": { - "fields": { - "exportedFiles": { - "rule": "repeated", - "type": "ExportedFile", - "id": 1 - } - }, - "nested": { - "ExportedFile": { - "oneofs": { - "destination": { - "oneof": [ - "gcsObjectPath" - ] - } - }, - "fields": { - "gcsObjectPath": { - "type": "string", - "id": 2 - }, - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/File" - } - }, - "hashes": { - "rule": "repeated", - "type": "Hash", - "id": 3 - } - } - } - } - }, - "Hash": { - "fields": { - "type": { - "type": "HashType", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - }, - "nested": { - "HashType": { - "values": { - "HASH_TYPE_UNSPECIFIED": 0, - "SHA256": 1, - "MD5": 2 - } - } - } - }, - "File": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/File", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/files/{file}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "sizeBytes": { - "type": "int64", - "id": 3 - }, - "hashes": { - "rule": "repeated", - "type": "Hash", - "id": 4 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "owner": { - "type": "string", - "id": 7 - }, - "fetchTime": { - "type": "google.protobuf.Timestamp", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "annotations": { - "keyType": "string", - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListFilesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/File" - } - }, - "filter": { - "type": "string", - "id": 4 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListFilesResponse": { - "fields": { - "files": { - "rule": "repeated", - "type": "File", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetFileRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/File" - } - } - } - }, - "DeleteFileRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/File" - } - } - } - }, - "UpdateFileRequest": { - "fields": { - "file": { - "type": "File", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "VersionView": { - "values": { - "VERSION_VIEW_UNSPECIFIED": 0, - "BASIC": 1, - "FULL": 2 - } - }, - "Version": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/Version", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 3 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - }, - "relatedTags": { - "rule": "repeated", - "type": "Tag", - "id": 7 - }, - "metadata": { - "type": "google.protobuf.Struct", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "annotations": { - "keyType": "string", - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "fingerprints": { - "rule": "repeated", - "type": "Hash", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ListVersionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "view": { - "type": "VersionView", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListVersionsResponse": { - "fields": { - "versions": { - "rule": "repeated", - "type": "Version", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetVersionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "view": { - "type": "VersionView", - "id": 2 - } - } - }, - "DeleteVersionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "force": { - "type": "bool", - "id": 2 - } - } - }, - "BatchDeleteVersionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Version" - } - }, - "names": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Version" - } - }, - "validateOnly": { - "type": "bool", - "id": 3 - } - } - }, - "BatchDeleteVersionsMetadata": { - "fields": { - "failedVersions": { - "rule": "repeated", - "type": "string", - "id": 2 - } - } - }, - "UpdateVersionRequest": { - "fields": { - "version": { - "type": "Version", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "Tag": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/Tag", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "version": { - "type": "string", - "id": 2 - } - } - }, - "ListTagsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "filter": { - "type": "string", - "id": 4 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListTagsResponse": { - "fields": { - "tags": { - "rule": "repeated", - "type": "Tag", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetTagRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "CreateTagRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "tagId": { - "type": "string", - "id": 2 - }, - "tag": { - "type": "Tag", - "id": 3 - } - } - }, - "UpdateTagRequest": { - "fields": { - "tag": { - "type": "Tag", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "DeleteTagRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "GenericArtifact": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/GenericArtifact", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/genericArtifacts/{generic_artifact}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "version": { - "type": "string", - "id": 2 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "GoModule": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/GoModule", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/goModules/{go_module}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "version": { - "type": "string", - "id": 2 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "KfpArtifact": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/KfpArtifact", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/kfpArtifacts/{kfp_artifact}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "version": { - "type": "string", - "id": 2 - } - } - }, - "Package": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/Package", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - }, - "annotations": { - "keyType": "string", - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListPackagesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Package" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListPackagesResponse": { - "fields": { - "packages": { - "rule": "repeated", - "type": "Package", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetPackageRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Package" - } - } - } - }, - "DeletePackageRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Package" - } - } - } - }, - "UpdatePackageRequest": { - "fields": { - "package": { - "type": "Package", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "UpstreamPolicy": { - "fields": { - "id": { - "type": "string", - "id": 1 - }, - "repository": { - "type": "string", - "id": 2, - "options": { - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" - } - }, - "priority": { - "type": "int32", - "id": 3 - } - } - }, - "CleanupPolicyCondition": { - "oneofs": { - "_tagState": { - "oneof": [ - "tagState" - ] - }, - "_olderThan": { - "oneof": [ - "olderThan" - ] - }, - "_newerThan": { - "oneof": [ - "newerThan" - ] - } - }, - "fields": { - "tagState": { - "type": "TagState", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "tagPrefixes": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "versionNamePrefixes": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "packageNamePrefixes": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "olderThan": { - "type": "google.protobuf.Duration", - "id": 6, - "options": { - "proto3_optional": true - } - }, - "newerThan": { - "type": "google.protobuf.Duration", - "id": 7, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "TagState": { - "values": { - "TAG_STATE_UNSPECIFIED": 0, - "TAGGED": 1, - "UNTAGGED": 2, - "ANY": 3 - } - } - } - }, - "CleanupPolicyMostRecentVersions": { - "oneofs": { - "_keepCount": { - "oneof": [ - "keepCount" - ] - } - }, - "fields": { - "packageNamePrefixes": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "keepCount": { - "type": "int32", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "CleanupPolicy": { - "oneofs": { - "conditionType": { - "oneof": [ - "condition", - "mostRecentVersions" - ] - } - }, - "fields": { - "condition": { - "type": "CleanupPolicyCondition", - "id": 2 - }, - "mostRecentVersions": { - "type": "CleanupPolicyMostRecentVersions", - "id": 4 - }, - "id": { - "type": "string", - "id": 1 - }, - "action": { - "type": "Action", - "id": 3 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "DELETE": 1, - "KEEP": 2 - } - } - } - }, - "VirtualRepositoryConfig": { - "fields": { - "upstreamPolicies": { - "rule": "repeated", - "type": "UpstreamPolicy", - "id": 1 - } - } - }, - "RemoteRepositoryConfig": { - "oneofs": { - "remoteSource": { - "oneof": [ - "dockerRepository", - "mavenRepository", - "npmRepository", - "pythonRepository", - "aptRepository", - "yumRepository", - "commonRepository" - ] - } - }, - "fields": { - "dockerRepository": { - "type": "DockerRepository", - "id": 2 - }, - "mavenRepository": { - "type": "MavenRepository", - "id": 3 - }, - "npmRepository": { - "type": "NpmRepository", - "id": 4 - }, - "pythonRepository": { - "type": "PythonRepository", - "id": 5 - }, - "aptRepository": { - "type": "AptRepository", - "id": 6 - }, - "yumRepository": { - "type": "YumRepository", - "id": 7 - }, - "commonRepository": { - "type": "CommonRemoteRepository", - "id": 14 - }, - "description": { - "type": "string", - "id": 1 - }, - "upstreamCredentials": { - "type": "UpstreamCredentials", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "disableUpstreamValidation": { - "type": "bool", - "id": 12, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - } - }, - "nested": { - "UpstreamCredentials": { - "oneofs": { - "credentials": { - "oneof": [ - "usernamePasswordCredentials" - ] - } - }, - "fields": { - "usernamePasswordCredentials": { - "type": "UsernamePasswordCredentials", - "id": 1 - } - }, - "nested": { - "UsernamePasswordCredentials": { - "fields": { - "username": { - "type": "string", - "id": 1 - }, - "passwordSecretVersion": { - "type": "string", - "id": 2, - "options": { - "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" - } - } - } - } - } - }, - "DockerRepository": { - "oneofs": { - "upstream": { - "oneof": [ - "publicRepository", - "customRepository" - ] - } - }, - "fields": { - "publicRepository": { - "type": "PublicRepository", - "id": 1 - }, - "customRepository": { - "type": "CustomRepository", - "id": 3 - } - }, - "nested": { - "CustomRepository": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, - "PublicRepository": { - "values": { - "PUBLIC_REPOSITORY_UNSPECIFIED": 0, - "DOCKER_HUB": 1 - } - } - } - }, - "MavenRepository": { - "oneofs": { - "upstream": { - "oneof": [ - "publicRepository", - "customRepository" - ] - } - }, - "fields": { - "publicRepository": { - "type": "PublicRepository", - "id": 1 - }, - "customRepository": { - "type": "CustomRepository", - "id": 3 - } - }, - "nested": { - "CustomRepository": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, - "PublicRepository": { - "values": { - "PUBLIC_REPOSITORY_UNSPECIFIED": 0, - "MAVEN_CENTRAL": 1 - } - } - } - }, - "NpmRepository": { - "oneofs": { - "upstream": { - "oneof": [ - "publicRepository", - "customRepository" - ] - } - }, - "fields": { - "publicRepository": { - "type": "PublicRepository", - "id": 1 - }, - "customRepository": { - "type": "CustomRepository", - "id": 3 - } - }, - "nested": { - "CustomRepository": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, - "PublicRepository": { - "values": { - "PUBLIC_REPOSITORY_UNSPECIFIED": 0, - "NPMJS": 1 - } - } - } - }, - "PythonRepository": { - "oneofs": { - "upstream": { - "oneof": [ - "publicRepository", - "customRepository" - ] - } - }, - "fields": { - "publicRepository": { - "type": "PublicRepository", - "id": 1 - }, - "customRepository": { - "type": "CustomRepository", - "id": 3 - } - }, - "nested": { - "CustomRepository": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, - "PublicRepository": { - "values": { - "PUBLIC_REPOSITORY_UNSPECIFIED": 0, - "PYPI": 1 - } - } - } - }, - "AptRepository": { - "oneofs": { - "upstream": { - "oneof": [ - "publicRepository", - "customRepository" - ] - } - }, - "fields": { - "publicRepository": { - "type": "PublicRepository", - "id": 1 - }, - "customRepository": { - "type": "CustomRepository", - "id": 3 - } - }, - "nested": { - "PublicRepository": { - "fields": { - "repositoryBase": { - "type": "RepositoryBase", - "id": 1 - }, - "repositoryPath": { - "type": "string", - "id": 2 - } - }, - "nested": { - "RepositoryBase": { - "values": { - "REPOSITORY_BASE_UNSPECIFIED": 0, - "DEBIAN": 1, - "UBUNTU": 2, - "DEBIAN_SNAPSHOT": 3 - } - } - } - }, - "CustomRepository": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - } - } - }, - "YumRepository": { - "oneofs": { - "upstream": { - "oneof": [ - "publicRepository", - "customRepository" - ] - } - }, - "fields": { - "publicRepository": { - "type": "PublicRepository", - "id": 1 - }, - "customRepository": { - "type": "CustomRepository", - "id": 3 - } - }, - "nested": { - "PublicRepository": { - "fields": { - "repositoryBase": { - "type": "RepositoryBase", - "id": 1 - }, - "repositoryPath": { - "type": "string", - "id": 2 - } - }, - "nested": { - "RepositoryBase": { - "values": { - "REPOSITORY_BASE_UNSPECIFIED": 0, - "CENTOS": 1, - "CENTOS_DEBUG": 2, - "CENTOS_VAULT": 3, - "CENTOS_STREAM": 4, - "ROCKY": 5, - "EPEL": 6 - } - } - } - }, - "CustomRepository": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - } - } - }, - "CommonRemoteRepository": { - "fields": { - "uri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - } - } - }, - "Repository": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/Repository", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}" - }, - "oneofs": { - "formatConfig": { - "oneof": [ - "mavenConfig", - "dockerConfig" - ] - }, - "modeConfig": { - "oneof": [ - "virtualRepositoryConfig", - "remoteRepositoryConfig" - ] - } - }, - "fields": { - "mavenConfig": { - "type": "MavenRepositoryConfig", - "id": 9 - }, - "dockerConfig": { - "type": "DockerRepositoryConfig", - "id": 17 - }, - "virtualRepositoryConfig": { - "type": "VirtualRepositoryConfig", - "id": 14 - }, - "remoteRepositoryConfig": { - "type": "RemoteRepositoryConfig", - "id": 15 - }, - "name": { - "type": "string", - "id": 1 - }, - "format": { - "type": "Format", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 3 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "kmsKeyName": { - "type": "string", - "id": 8 - }, - "mode": { - "type": "Mode", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cleanupPolicies": { - "keyType": "string", - "type": "CleanupPolicy", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "sizeBytes": { - "type": "int64", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "satisfiesPzs": { - "type": "bool", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "cleanupPolicyDryRun": { - "type": "bool", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "vulnerabilityScanningConfig": { - "type": "VulnerabilityScanningConfig", - "id": 19, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "disallowUnspecifiedMode": { - "type": "bool", - "id": 21, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "satisfiesPzi": { - "type": "bool", - "id": 22, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "registryUri": { - "type": "string", - "id": 26, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "MavenRepositoryConfig": { - "fields": { - "allowSnapshotOverwrites": { - "type": "bool", - "id": 1 - }, - "versionPolicy": { - "type": "VersionPolicy", - "id": 2 - } - }, - "nested": { - "VersionPolicy": { - "values": { - "VERSION_POLICY_UNSPECIFIED": 0, - "RELEASE": 1, - "SNAPSHOT": 2 - } - } - } - }, - "DockerRepositoryConfig": { - "fields": { - "immutableTags": { - "type": "bool", - "id": 1 - } - } - }, - "VulnerabilityScanningConfig": { - "fields": { - "enablementConfig": { - "type": "EnablementConfig", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "lastEnableTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "enablementState": { - "type": "EnablementState", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "enablementStateReason": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "EnablementConfig": { - "values": { - "ENABLEMENT_CONFIG_UNSPECIFIED": 0, - "INHERITED": 1, - "DISABLED": 2 - } - }, - "EnablementState": { - "values": { - "ENABLEMENT_STATE_UNSPECIFIED": 0, - "SCANNING_UNSUPPORTED": 1, - "SCANNING_DISABLED": 2, - "SCANNING_ACTIVE": 3 - } - } - } - }, - "Format": { - "values": { - "FORMAT_UNSPECIFIED": 0, - "DOCKER": 1, - "MAVEN": 2, - "NPM": 3, - "APT": 5, - "YUM": 6, - "PYTHON": 8, - "KFP": 9, - "GO": 10, - "GENERIC": 11, - "RUBY": 12 - } - }, - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "STANDARD_REPOSITORY": 1, - "VIRTUAL_REPOSITORY": 2, - "REMOTE_REPOSITORY": 3 - } - } - } - }, - "ListRepositoriesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Repository" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListRepositoriesResponse": { - "fields": { - "repositories": { - "rule": "repeated", - "type": "Repository", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetRepositoryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" - } - } - } - }, - "CreateRepositoryRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Repository" - } - }, - "repositoryId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "repository": { - "type": "Repository", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateRepositoryRequest": { - "fields": { - "repository": { - "type": "Repository", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "DeleteRepositoryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" - } - } - } - }, - "Rule": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/Rule", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/rules/{rule}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "action": { - "type": "Action", - "id": 2 - }, - "operation": { - "type": "Operation", - "id": 3 - }, - "condition": { - "type": "google.type.Expr", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "packageId": { - "type": "string", - "id": 5 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ALLOW": 1, - "DENY": 2 - } - }, - "Operation": { - "values": { - "OPERATION_UNSPECIFIED": 0, - "DOWNLOAD": 1 - } - } - } - }, - "ListRulesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Rule" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListRulesResponse": { - "fields": { - "rules": { - "rule": "repeated", - "type": "Rule", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetRuleRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Rule" - } - } - } - }, - "CreateRuleRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Rule" - } - }, - "ruleId": { - "type": "string", - "id": 2 - }, - "rule": { - "type": "Rule", - "id": 3 - } - } - }, - "UpdateRuleRequest": { - "fields": { - "rule": { - "type": "Rule", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "DeleteRuleRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Rule" - } - } - } - }, - "ArtifactRegistry": { - "options": { - "(google.api.default_host)": "artifactregistry.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only" - }, - "methods": { - "ListDockerImages": { - "requestType": "ListDockerImagesRequest", - "responseType": "ListDockerImagesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetDockerImage": { - "requestType": "GetDockerImageRequest", - "responseType": "DockerImage", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListMavenArtifacts": { - "requestType": "ListMavenArtifactsRequest", - "responseType": "ListMavenArtifactsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/mavenArtifacts", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/repositories/*}/mavenArtifacts" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetMavenArtifact": { - "requestType": "GetMavenArtifactRequest", - "responseType": "MavenArtifact", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/mavenArtifacts/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/repositories/*/mavenArtifacts/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListNpmPackages": { - "requestType": "ListNpmPackagesRequest", - "responseType": "ListNpmPackagesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/npmPackages", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/repositories/*}/npmPackages" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetNpmPackage": { - "requestType": "GetNpmPackageRequest", - "responseType": "NpmPackage", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/npmPackages/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/repositories/*/npmPackages/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListPythonPackages": { - "requestType": "ListPythonPackagesRequest", - "responseType": "ListPythonPackagesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/pythonPackages", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/repositories/*}/pythonPackages" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetPythonPackage": { - "requestType": "GetPythonPackageRequest", - "responseType": "PythonPackage", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/pythonPackages/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/repositories/*/pythonPackages/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ImportAptArtifacts": { - "requestType": "ImportAptArtifactsRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1.ImportAptArtifactsResponse", - "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.devtools.artifactregistry.v1.ImportAptArtifactsResponse", - "metadata_type": "google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata" - } - } - ] - }, - "ImportYumArtifacts": { - "requestType": "ImportYumArtifactsRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1.ImportYumArtifactsResponse", - "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.devtools.artifactregistry.v1.ImportYumArtifactsResponse", - "metadata_type": "google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata" - } - } - ] - }, - "ListRepositories": { - "requestType": "ListRepositoriesRequest", - "responseType": "ListRepositoriesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/repositories", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/repositories" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetRepository": { - "requestType": "GetRepositoryRequest", - "responseType": "Repository", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/repositories/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateRepository": { - "requestType": "CreateRepositoryRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/repositories", - "(google.api.http).body": "repository", - "(google.api.method_signature)": "parent,repository,repository_id", - "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1.Repository", - "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/repositories", - "body": "repository" - } - }, - { - "(google.api.method_signature)": "parent,repository,repository_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.devtools.artifactregistry.v1.Repository", - "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" - } - } - ] - }, - "UpdateRepository": { - "requestType": "UpdateRepositoryRequest", - "responseType": "Repository", - "options": { - "(google.api.http).patch": "/v1/{repository.name=projects/*/locations/*/repositories/*}", - "(google.api.http).body": "repository", - "(google.api.method_signature)": "repository,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{repository.name=projects/*/locations/*/repositories/*}", - "body": "repository" - } - }, - { - "(google.api.method_signature)": "repository,update_mask" - } - ] - }, - "DeleteRepository": { - "requestType": "DeleteRepositoryRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/repositories/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" - } - } - ] - }, - "ListPackages": { - "requestType": "ListPackagesRequest", - "responseType": "ListPackagesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/packages", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/repositories/*}/packages" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetPackage": { - "requestType": "GetPackageRequest", - "responseType": "Package", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeletePackage": { - "requestType": "DeletePackageRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" - } - } - ] - }, - "ListVersions": { - "requestType": "ListVersionsRequest", - "responseType": "ListVersionsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetVersion": { - "requestType": "GetVersionRequest", - "responseType": "Version", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeleteVersion": { - "requestType": "DeleteVersionRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" - } - } - ] - }, - "BatchDeleteVersions": { - "requestType": "BatchDeleteVersionsRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions:batchDelete", - "(google.api.http).body": "*", - "(google.api.method_signature)": "parent,names", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions:batchDelete", - "body": "*" - } - }, - { - "(google.api.method_signature)": "parent,names" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata" - } - } - ] - }, - "UpdateVersion": { - "requestType": "UpdateVersionRequest", - "responseType": "Version", - "options": { - "(google.api.http).patch": "/v1/{version.name=projects/*/locations/*/repositories/*/packages/*/versions/*}", - "(google.api.http).body": "version", - "(google.api.method_signature)": "version,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{version.name=projects/*/locations/*/repositories/*/packages/*/versions/*}", - "body": "version" - } - }, - { - "(google.api.method_signature)": "version,update_mask" - } - ] - }, - "ListFiles": { - "requestType": "ListFilesRequest", - "responseType": "ListFilesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/files", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/repositories/*}/files" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetFile": { - "requestType": "GetFileRequest", - "responseType": "File", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/files/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/repositories/*/files/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeleteFile": { - "requestType": "DeleteFileRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/files/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/repositories/*/files/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" - } - } - ] - }, - "UpdateFile": { - "requestType": "UpdateFileRequest", - "responseType": "File", - "options": { - "(google.api.http).patch": "/v1/{file.name=projects/*/locations/*/repositories/*/files/*}", - "(google.api.http).body": "file", - "(google.api.method_signature)": "file,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{file.name=projects/*/locations/*/repositories/*/files/*}", - "body": "file" - } - }, - { - "(google.api.method_signature)": "file,update_mask" - } - ] - }, - "ListTags": { - "requestType": "ListTagsRequest", - "responseType": "ListTagsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetTag": { - "requestType": "GetTagRequest", - "responseType": "Tag", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateTag": { - "requestType": "CreateTagRequest", - "responseType": "Tag", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", - "(google.api.http).body": "tag", - "(google.api.method_signature)": "parent,tag,tag_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", - "body": "tag" - } - }, - { - "(google.api.method_signature)": "parent,tag,tag_id" - } - ] - }, - "UpdateTag": { - "requestType": "UpdateTagRequest", - "responseType": "Tag", - "options": { - "(google.api.http).patch": "/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}", - "(google.api.http).body": "tag", - "(google.api.method_signature)": "tag,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}", - "body": "tag" - } - }, - { - "(google.api.method_signature)": "tag,update_mask" - } - ] - }, - "DeleteTag": { - "requestType": "DeleteTagRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateRule": { - "requestType": "CreateRuleRequest", - "responseType": "Rule", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*}/rules", - "(google.api.http).body": "rule", - "(google.api.method_signature)": "parent,rule,rule_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/repositories/*}/rules", - "body": "rule" - } - }, - { - "(google.api.method_signature)": "parent,rule,rule_id" - } - ] - }, - "ListRules": { - "requestType": "ListRulesRequest", - "responseType": "ListRulesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/rules", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/repositories/*}/rules" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetRule": { - "requestType": "GetRuleRequest", - "responseType": "Rule", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/rules/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/repositories/*/rules/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateRule": { - "requestType": "UpdateRuleRequest", - "responseType": "Rule", - "options": { - "(google.api.http).patch": "/v1/{rule.name=projects/*/locations/*/repositories/*/rules/*}", - "(google.api.http).body": "rule", - "(google.api.method_signature)": "rule,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{rule.name=projects/*/locations/*/repositories/*/rules/*}", - "body": "rule" - } - }, - { - "(google.api.method_signature)": "rule,update_mask" - } - ] - }, - "DeleteRule": { - "requestType": "DeleteRuleRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/rules/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/repositories/*/rules/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "SetIamPolicy": { - "requestType": "google.iam.v1.SetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy", - "body": "*" - } - } - ] - }, - "GetIamPolicy": { - "requestType": "google.iam.v1.GetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).get": "/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" - } - } - ] - }, - "TestIamPermissions": { - "requestType": "google.iam.v1.TestIamPermissionsRequest", - "responseType": "google.iam.v1.TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions", - "body": "*" - } - } - ] - }, - "GetProjectSettings": { - "requestType": "GetProjectSettingsRequest", - "responseType": "ProjectSettings", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/projectSettings}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/projectSettings}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateProjectSettings": { - "requestType": "UpdateProjectSettingsRequest", - "responseType": "ProjectSettings", - "options": { - "(google.api.http).patch": "/v1/{project_settings.name=projects/*/projectSettings}", - "(google.api.http).body": "project_settings", - "(google.api.method_signature)": "project_settings,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{project_settings.name=projects/*/projectSettings}", - "body": "project_settings" - } - }, - { - "(google.api.method_signature)": "project_settings,update_mask" - } - ] - }, - "GetVPCSCConfig": { - "requestType": "GetVPCSCConfigRequest", - "responseType": "VPCSCConfig", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/vpcscConfig}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/vpcscConfig}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateVPCSCConfig": { - "requestType": "UpdateVPCSCConfigRequest", - "responseType": "VPCSCConfig", - "options": { - "(google.api.http).patch": "/v1/{vpcsc_config.name=projects/*/locations/*/vpcscConfig}", - "(google.api.http).body": "vpcsc_config", - "(google.api.method_signature)": "vpcsc_config,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{vpcsc_config.name=projects/*/locations/*/vpcscConfig}", - "body": "vpcsc_config" - } - }, - { - "(google.api.method_signature)": "vpcsc_config,update_mask" - } - ] - }, - "UpdatePackage": { - "requestType": "UpdatePackageRequest", - "responseType": "Package", - "options": { - "(google.api.http).patch": "/v1/{package.name=projects/*/locations/*/repositories/*/packages/*}", - "(google.api.http).body": "package", - "(google.api.method_signature)": "package,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{package.name=projects/*/locations/*/repositories/*/packages/*}", - "body": "package" - } - }, - { - "(google.api.method_signature)": "package,update_mask" - } - ] - }, - "ListAttachments": { - "requestType": "ListAttachmentsRequest", - "responseType": "ListAttachmentsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/attachments", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/repositories/*}/attachments" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetAttachment": { - "requestType": "GetAttachmentRequest", - "responseType": "Attachment", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/attachments/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/repositories/*/attachments/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateAttachment": { - "requestType": "CreateAttachmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*}/attachments", - "(google.api.http).body": "attachment", - "(google.api.method_signature)": "parent,attachment,attachment_id", - "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1.Attachment", - "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/repositories/*}/attachments", - "body": "attachment" - } - }, - { - "(google.api.method_signature)": "parent,attachment,attachment_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.devtools.artifactregistry.v1.Attachment", - "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" - } - } - ] - }, - "DeleteAttachment": { - "requestType": "DeleteAttachmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/attachments/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/repositories/*/attachments/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" - } - } - ] - }, - "ExportArtifact": { - "requestType": "ExportArtifactRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{repository=projects/*/locations/*/repositories/*}:exportArtifact", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1.ExportArtifactResponse", - "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.ExportArtifactMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{repository=projects/*/locations/*/repositories/*}:exportArtifact", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.devtools.artifactregistry.v1.ExportArtifactResponse", - "metadata_type": "google.devtools.artifactregistry.v1.ExportArtifactMetadata" - } - } - ] - } - } - }, - "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 - }, - "pullPercent": { - "type": "int32", - "id": 3 - } - }, - "nested": { - "RedirectionState": { - "valuesOptions": { - "REDIRECTION_FROM_GCR_IO_FINALIZED": { - "deprecated": true - } - }, - "values": { - "REDIRECTION_STATE_UNSPECIFIED": 0, - "REDIRECTION_FROM_GCR_IO_DISABLED": 1, - "REDIRECTION_FROM_GCR_IO_ENABLED": 2, - "REDIRECTION_FROM_GCR_IO_FINALIZED": 3, - "REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING": 5, - "REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING": 6 - } - } - } - }, - "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 - } - } - }, - "VPCSCConfig": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/VpcscConfig", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/vpcscConfig" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "vpcscPolicy": { - "type": "VPCSCPolicy", - "id": 2 - } - }, - "nested": { - "VPCSCPolicy": { - "values": { - "VPCSC_POLICY_UNSPECIFIED": 0, - "DENY": 1, - "ALLOW": 2 - } - } - } - }, - "GetVPCSCConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/VpcscConfig" - } - } - } - }, - "UpdateVPCSCConfigRequest": { - "fields": { - "vpcscConfig": { - "type": "VPCSCConfig", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "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": {} - } - } - }, - "v1beta2": { - "options": { - "csharp_namespace": "Google.Cloud.ArtifactRegistry.V1Beta2", - "go_package": "cloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb", - "java_multiple_files": true, - "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": { - "type": "HashType", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - }, - "nested": { - "HashType": { - "values": { - "HASH_TYPE_UNSPECIFIED": 0, - "SHA256": 1, - "MD5": 2 - } - } - } - }, - "File": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/File", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/files/{file}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "sizeBytes": { - "type": "int64", - "id": 3 - }, - "hashes": { - "rule": "repeated", - "type": "Hash", - "id": 4 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - }, - "owner": { - "type": "string", - "id": 7 - } - } - }, - "ListFilesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "filter": { - "type": "string", - "id": 4 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListFilesResponse": { - "fields": { - "files": { - "rule": "repeated", - "type": "File", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetFileRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "Package": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - } - } - }, - "ListPackagesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListPackagesResponse": { - "fields": { - "packages": { - "rule": "repeated", - "type": "Package", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetPackageRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "DeletePackageRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "Repository": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/Repository", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}" - }, - "oneofs": { - "formatConfig": { - "oneof": [ - "mavenConfig" - ] - } - }, - "fields": { - "mavenConfig": { - "type": "MavenRepositoryConfig", - "id": 9 - }, - "name": { - "type": "string", - "id": 1 - }, - "format": { - "type": "Format", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - }, - "kmsKeyName": { - "type": "string", - "id": 8 - } - }, - "nested": { - "MavenRepositoryConfig": { - "fields": { - "allowSnapshotOverwrites": { - "type": "bool", - "id": 1 - }, - "versionPolicy": { - "type": "VersionPolicy", - "id": 2 - } - }, - "nested": { - "VersionPolicy": { - "values": { - "VERSION_POLICY_UNSPECIFIED": 0, - "RELEASE": 1, - "SNAPSHOT": 2 - } - } - } - }, - "Format": { - "values": { - "FORMAT_UNSPECIFIED": 0, - "DOCKER": 1, - "MAVEN": 2, - "NPM": 3, - "APT": 5, - "YUM": 6, - "PYTHON": 8 - } - } - } - }, - "ListRepositoriesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Repository" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListRepositoriesResponse": { - "fields": { - "repositories": { - "rule": "repeated", - "type": "Repository", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetRepositoryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" - } - } - } - }, - "CreateRepositoryRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Repository" - } - }, - "repositoryId": { - "type": "string", - "id": 2 - }, - "repository": { - "type": "Repository", - "id": 3 - } - } - }, - "UpdateRepositoryRequest": { - "fields": { - "repository": { - "type": "Repository", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "DeleteRepositoryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" - } - } - } - }, - "ArtifactRegistry": { - "options": { - "(google.api.default_host)": "artifactregistry.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only" - }, - "methods": { - "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", - "options": { - "(google.api.http).get": "/v1beta2/{parent=projects/*/locations/*}/repositories", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta2/{parent=projects/*/locations/*}/repositories" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetRepository": { - "requestType": "GetRepositoryRequest", - "responseType": "Repository", - "options": { - "(google.api.http).get": "/v1beta2/{name=projects/*/locations/*/repositories/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta2/{name=projects/*/locations/*/repositories/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateRepository": { - "requestType": "CreateRepositoryRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(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": "google.devtools.artifactregistry.v1beta2.Repository", - "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta2/{parent=projects/*/locations/*}/repositories", - "body": "repository" - } - }, - { - "(google.api.method_signature)": "parent,repository,repository_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.devtools.artifactregistry.v1beta2.Repository", - "metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" - } - } - ] - }, - "UpdateRepository": { - "requestType": "UpdateRepositoryRequest", - "responseType": "Repository", - "options": { - "(google.api.http).patch": "/v1beta2/{repository.name=projects/*/locations/*/repositories/*}", - "(google.api.http).body": "repository", - "(google.api.method_signature)": "repository,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1beta2/{repository.name=projects/*/locations/*/repositories/*}", - "body": "repository" - } - }, - { - "(google.api.method_signature)": "repository,update_mask" - } - ] - }, - "DeleteRepository": { - "requestType": "DeleteRepositoryRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/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": "google.devtools.artifactregistry.v1beta2.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta2/{name=projects/*/locations/*/repositories/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" - } - } - ] - }, - "ListPackages": { - "requestType": "ListPackagesRequest", - "responseType": "ListPackagesResponse", - "options": { - "(google.api.http).get": "/v1beta2/{parent=projects/*/locations/*/repositories/*}/packages", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta2/{parent=projects/*/locations/*/repositories/*}/packages" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetPackage": { - "requestType": "GetPackageRequest", - "responseType": "Package", - "options": { - "(google.api.http).get": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeletePackage": { - "requestType": "DeletePackageRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(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": "google.devtools.artifactregistry.v1beta2.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" - } - } - ] - }, - "ListVersions": { - "requestType": "ListVersionsRequest", - "responseType": "ListVersionsResponse", - "options": { - "(google.api.http).get": "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/versions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/versions" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetVersion": { - "requestType": "GetVersionRequest", - "responseType": "Version", - "options": { - "(google.api.http).get": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeleteVersion": { - "requestType": "DeleteVersionRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(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": "google.devtools.artifactregistry.v1beta2.OperationMetadata" - }, - "parsedOptions": [ - { - "(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", - "metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" - } - } - ] - }, - "ListFiles": { - "requestType": "ListFilesRequest", - "responseType": "ListFilesResponse", - "options": { - "(google.api.http).get": "/v1beta2/{parent=projects/*/locations/*/repositories/*}/files", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta2/{parent=projects/*/locations/*/repositories/*}/files" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetFile": { - "requestType": "GetFileRequest", - "responseType": "File", - "options": { - "(google.api.http).get": "/v1beta2/{name=projects/*/locations/*/repositories/*/files/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta2/{name=projects/*/locations/*/repositories/*/files/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListTags": { - "requestType": "ListTagsRequest", - "responseType": "ListTagsResponse", - "options": { - "(google.api.http).get": "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetTag": { - "requestType": "GetTagRequest", - "responseType": "Tag", - "options": { - "(google.api.http).get": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateTag": { - "requestType": "CreateTagRequest", - "responseType": "Tag", - "options": { - "(google.api.http).post": "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", - "(google.api.http).body": "tag", - "(google.api.method_signature)": "parent,tag,tag_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", - "body": "tag" - } - }, - { - "(google.api.method_signature)": "parent,tag,tag_id" - } - ] - }, - "UpdateTag": { - "requestType": "UpdateTagRequest", - "responseType": "Tag", - "options": { - "(google.api.http).patch": "/v1beta2/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}", - "(google.api.http).body": "tag", - "(google.api.method_signature)": "tag,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1beta2/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}", - "body": "tag" - } - }, - { - "(google.api.method_signature)": "tag,update_mask" - } - ] - }, - "DeleteTag": { - "requestType": "DeleteTagRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "SetIamPolicy": { - "requestType": "google.iam.v1.SetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1beta2/{resource=projects/*/locations/*/repositories/*}:setIamPolicy", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta2/{resource=projects/*/locations/*/repositories/*}:setIamPolicy", - "body": "*" - } - } - ] - }, - "GetIamPolicy": { - "requestType": "google.iam.v1.GetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).get": "/v1beta2/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta2/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" - } - } - ] - }, - "TestIamPermissions": { - "requestType": "google.iam.v1.TestIamPermissionsRequest", - "responseType": "google.iam.v1.TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1beta2/{resource=projects/*/locations/*/repositories/*}:testIamPermissions", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta2/{resource=projects/*/locations/*/repositories/*}:testIamPermissions", - "body": "*" - } - } - ] - }, - "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", - "id": 1 - }, - "version": { - "type": "string", - "id": 2 - } - } - }, - "ListTagsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "filter": { - "type": "string", - "id": 4 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListTagsResponse": { - "fields": { - "tags": { - "rule": "repeated", - "type": "Tag", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetTagRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "CreateTagRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "tagId": { - "type": "string", - "id": 2 - }, - "tag": { - "type": "Tag", - "id": 3 - } - } - }, - "UpdateTagRequest": { - "fields": { - "tag": { - "type": "Tag", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "DeleteTagRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "VersionView": { - "values": { - "VERSION_VIEW_UNSPECIFIED": 0, - "BASIC": 1, - "FULL": 2 - } - }, - "Version": { - "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/Version", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 3 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - }, - "relatedTags": { - "rule": "repeated", - "type": "Tag", - "id": 7 - }, - "metadata": { - "type": "google.protobuf.Struct", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ListVersionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "view": { - "type": "VersionView", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListVersionsResponse": { - "fields": { - "versions": { - "rule": "repeated", - "type": "Version", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetVersionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "view": { - "type": "VersionView", - "id": 2 - } - } - }, - "DeleteVersionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "force": { - "type": "bool", - "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": {} - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api;api", - "java_multiple_files": true, - "java_outer_classname": "LaunchStageProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "apiVersion": { - "type": "string", - "id": 525000001, - "extend": "google.protobuf.ServiceOptions" - }, - "CommonLanguageSettings": { - "fields": { - "referenceDocsUri": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 - }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 - }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 - }, - "rubySettings": { - "type": "RubySettings", - "id": 27 - }, - "goSettings": { - "type": "GoSettings", - "id": 28 - } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 - }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 - }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 - }, - "protoReferenceDocumentationUri": { - "type": "string", - "id": 110 - }, - "restReferenceDocumentationUri": { - "type": "string", - "id": 111 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 - }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "DotnetSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "renamedResources": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "ignoredResources": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "forcedNamespaceAliases": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "handwrittenSignatures": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "GoSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "MethodSettings": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - }, - "autoPopulatedFields": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "LongRunning": { - "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "pollDelayMultiplier": { - "type": "float", - "id": 2 - }, - "maxPollDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - } - } - }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - } - } - }, - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "edition": "proto2", - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "edition": "proto2", - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10 - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11 - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "edition": "proto2", - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 - }, - "fullName": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "reserved": { - "type": "bool", - "id": 5 - }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "edition": "proto2", - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false - } - }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true - } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "edition": "proto2", - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "edition": "proto2", - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "unverifiedLazy": { - "type": "bool", - "id": 15, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19 - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - } - } - }, - "OneofOptions": { - "edition": "proto2", - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "edition": "proto2", - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "edition": "proto2", - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "edition": "proto2", - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "edition": "proto2", - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "edition": "proto2", - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "FeatureSet": { - "edition": "proto2", - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 9995, - 9999 - ], - [ - 10000, - 10000 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "edition": "proto2", - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "edition": "proto2", - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1, - "options": { - "packed": true - } - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2, - "options": { - "packed": true - } - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "edition": "proto2", - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1, - "options": { - "packed": true - } - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "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 - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - } - } - }, - "rpc": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - }, - "type": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", - "java_multiple_files": true, - "java_outer_classname": "ExprProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "Expr": { - "fields": { - "expression": { - "type": "string", - "id": 1 - }, - "title": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "location": { - "type": "string", - "id": 4 - } - } - } - } - }, - "iam": { - "nested": { - "v1": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.Iam.V1", - "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", - "java_multiple_files": true, - "java_outer_classname": "PolicyProto", - "java_package": "com.google.iam.v1", - "php_namespace": "Google\\Cloud\\Iam\\V1" - }, - "nested": { - "IAMPolicy": { - "options": { - "(google.api.default_host)": "iam-meta-api.googleapis.com" - }, - "methods": { - "SetIamPolicy": { - "requestType": "SetIamPolicyRequest", - "responseType": "Policy", - "options": { - "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:setIamPolicy", - "body": "*" - } - } - ] - }, - "GetIamPolicy": { - "requestType": "GetIamPolicyRequest", - "responseType": "Policy", - "options": { - "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:getIamPolicy", - "body": "*" - } - } - ] - }, - "TestIamPermissions": { - "requestType": "TestIamPermissionsRequest", - "responseType": "TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:testIamPermissions", - "body": "*" - } - } - ] - } - } - }, - "SetIamPolicyRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "policy": { - "type": "Policy", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3 - } - } - }, - "GetIamPolicyRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "options": { - "type": "GetPolicyOptions", - "id": 2 - } - } - }, - "TestIamPermissionsRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "permissions": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "TestIamPermissionsResponse": { - "fields": { - "permissions": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "GetPolicyOptions": { - "fields": { - "requestedPolicyVersion": { - "type": "int32", - "id": 1 - } - } - }, - "Policy": { - "fields": { - "version": { - "type": "int32", - "id": 1 - }, - "bindings": { - "rule": "repeated", - "type": "Binding", - "id": 4 - }, - "auditConfigs": { - "rule": "repeated", - "type": "AuditConfig", - "id": 6 - }, - "etag": { - "type": "bytes", - "id": 3 - } - } - }, - "Binding": { - "fields": { - "role": { - "type": "string", - "id": 1 - }, - "members": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "condition": { - "type": "google.type.Expr", - "id": 3 - } - } - }, - "AuditConfig": { - "fields": { - "service": { - "type": "string", - "id": 1 - }, - "auditLogConfigs": { - "rule": "repeated", - "type": "AuditLogConfig", - "id": 3 - } - } - }, - "AuditLogConfig": { - "fields": { - "logType": { - "type": "LogType", - "id": 1 - }, - "exemptedMembers": { - "rule": "repeated", - "type": "string", - "id": 2 - } - }, - "nested": { - "LogType": { - "values": { - "LOG_TYPE_UNSPECIFIED": 0, - "ADMIN_READ": 1, - "DATA_WRITE": 2, - "DATA_READ": 3 - } - } - } - }, - "PolicyDelta": { - "fields": { - "bindingDeltas": { - "rule": "repeated", - "type": "BindingDelta", - "id": 1 - }, - "auditConfigDeltas": { - "rule": "repeated", - "type": "AuditConfigDelta", - "id": 2 - } - } - }, - "BindingDelta": { - "fields": { - "action": { - "type": "Action", - "id": 1 - }, - "role": { - "type": "string", - "id": 2 - }, - "member": { - "type": "string", - "id": 3 - }, - "condition": { - "type": "google.type.Expr", - "id": 4 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - }, - "AuditConfigDelta": { - "fields": { - "action": { - "type": "Action", - "id": 1 - }, - "service": { - "type": "string", - "id": 2 - }, - "exemptedMember": { - "type": "string", - "id": 3 - }, - "logType": { - "type": "string", - "id": 4 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - } - } - } - } - }, - "longrunning": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.LongRunning", - "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", - "java_multiple_files": true, - "java_outer_classname": "OperationsProto", - "java_package": "com.google.longrunning", - "php_namespace": "Google\\LongRunning" - }, - "nested": { - "operationInfo": { - "type": "google.longrunning.OperationInfo", - "id": 1049, - "extend": "google.protobuf.MethodOptions" - }, - "Operations": { - "options": { - "(google.api.default_host)": "longrunning.googleapis.com" - }, - "methods": { - "ListOperations": { - "requestType": "ListOperationsRequest", - "responseType": "ListOperationsResponse", - "options": { - "(google.api.http).get": "/v1/{name=operations}", - "(google.api.method_signature)": "name,filter" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations}" - } - }, - { - "(google.api.method_signature)": "name,filter" - } - ] - }, - "GetOperation": { - "requestType": "GetOperationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).get": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeleteOperation": { - "requestType": "DeleteOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CancelOperation": { - "requestType": "CancelOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=operations/**}:cancel", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=operations/**}:cancel", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "WaitOperation": { - "requestType": "WaitOperationRequest", - "responseType": "Operation" - } - } - }, - "Operation": { - "oneofs": { - "result": { - "oneof": [ - "error", - "response" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "metadata": { - "type": "google.protobuf.Any", - "id": 2 - }, - "done": { - "type": "bool", - "id": 3 - }, - "error": { - "type": "google.rpc.Status", - "id": 4 - }, - "response": { - "type": "google.protobuf.Any", - "id": 5 - } - } - }, - "GetOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "ListOperationsRequest": { - "fields": { - "name": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListOperationsResponse": { - "fields": { - "operations": { - "rule": "repeated", - "type": "Operation", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CancelOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "DeleteOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "WaitOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "timeout": { - "type": "google.protobuf.Duration", - "id": 2 - } - } - }, - "OperationInfo": { - "fields": { - "responseType": { - "type": "string", - "id": 1 - }, - "metadataType": { - "type": "string", - "id": 2 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.batch_delete_versions.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.batch_delete_versions.js deleted file mode 100644 index c129fb47c4f..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.batch_delete_versions.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2025 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(names) { - // [START artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the repository holding all requested versions. - */ - // const parent = 'abc123' - /** - * Required. The names of the versions to delete. - * The maximum number of versions deleted per batch is determined by the - * service and is dependent on the available resources in the region. - */ - // const names = ['abc','def'] - /** - * If true, the request is performed without deleting data, following AIP-163. - */ - // const validateOnly = true - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callBatchDeleteVersions() { - // Construct request - const request = { - names, - }; - - // Run request - const [operation] = await artifactregistryClient.batchDeleteVersions(request); - const [response] = await operation.promise(); - console.log(response); - } - - callBatchDeleteVersions(); - // [END artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_attachment.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_attachment.js deleted file mode 100644 index db6ba5317c5..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_attachment.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, attachmentId, attachment) { - // [START artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent resource where the attachment will be - * created. - */ - // const parent = 'abc123' - /** - * Required. The attachment id to use for this attachment. - */ - // const attachmentId = 'abc123' - /** - * Required. The attachment to be created. - */ - // const attachment = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callCreateAttachment() { - // Construct request - const request = { - parent, - attachmentId, - attachment, - }; - - // Run request - const [operation] = await artifactregistryClient.createAttachment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateAttachment(); - // [END artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_repository.js deleted file mode 100644 index c0d281f76a0..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_repository.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, repositoryId, repository) { - // [START artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent resource where the repository will be - * created. - */ - // const parent = 'abc123' - /** - * Required. The repository id to use for this repository. - */ - // const repositoryId = 'abc123' - /** - * Required. The repository to be created. - */ - // const repository = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callCreateRepository() { - // Construct request - const request = { - parent, - repositoryId, - repository, - }; - - // Run request - const [operation] = await artifactregistryClient.createRepository(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateRepository(); - // [END artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_rule.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_rule.js deleted file mode 100644 index c708e095c47..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_rule.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START artifactregistry_v1_generated_ArtifactRegistry_CreateRule_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent resource where the rule will be created. - */ - // const parent = 'abc123' - /** - * The rule id to use for this repository. - */ - // const ruleId = 'abc123' - /** - * The rule to be created. - */ - // const rule = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callCreateRule() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await artifactregistryClient.createRule(request); - console.log(response); - } - - callCreateRule(); - // [END artifactregistry_v1_generated_ArtifactRegistry_CreateRule_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_tag.js deleted file mode 100644 index 7d8973cadbe..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_tag.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the parent resource where the tag will be created. - */ - // const parent = 'abc123' - /** - * The tag id to use for this repository. - */ - // const tagId = 'abc123' - /** - * The tag to be created. - */ - // const tag = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callCreateTag() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.createTag(request); - console.log(response); - } - - callCreateTag(); - // [END artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_attachment.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_attachment.js deleted file mode 100644 index 48f92cde27c..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_attachment.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the attachment to delete. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callDeleteAttachment() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await artifactregistryClient.deleteAttachment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteAttachment(); - // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_file.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_file.js deleted file mode 100644 index c08f79c2112..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_file.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the file to delete. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callDeleteFile() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await artifactregistryClient.deleteFile(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteFile(); - // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_package.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_package.js deleted file mode 100644 index 4bff2421198..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_package.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the package to delete. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callDeletePackage() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await artifactregistryClient.deletePackage(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeletePackage(); - // [END artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_repository.js deleted file mode 100644 index f358eb1d876..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_repository.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the repository to delete. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callDeleteRepository() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await artifactregistryClient.deleteRepository(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteRepository(); - // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_rule.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_rule.js deleted file mode 100644 index 67934a2ed6b..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_rule.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the rule to delete. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callDeleteRule() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await artifactregistryClient.deleteRule(request); - console.log(response); - } - - callDeleteRule(); - // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_tag.js deleted file mode 100644 index a4543173c68..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_tag.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the tag to delete. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callDeleteTag() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.deleteTag(request); - console.log(response); - } - - callDeleteTag(); - // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_version.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_version.js deleted file mode 100644 index a90d9010b88..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_version.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the version to delete. - */ - // const name = 'abc123' - /** - * By default, a version that is tagged may not be deleted. If force=true, the - * version and any tags pointing to the version are deleted. - */ - // const force = true - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callDeleteVersion() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await artifactregistryClient.deleteVersion(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteVersion(); - // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.export_artifact.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.export_artifact.js deleted file mode 100644 index c00bfb6caa3..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.export_artifact.js +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2025 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(repository) { - // [START artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The artifact version to export. - * Format: - * projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version} - */ - // const sourceVersion = 'abc123' - /** - * The artifact tag to export. - * Format:projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag} - */ - // const sourceTag = 'abc123' - /** - * The Cloud Storage path to export the artifact to. Should start with the - * bucket name, and optionally have a directory path. Examples: - * `dst_bucket`, `dst_bucket/sub_dir`. - * Existing objects with the same path will be overwritten. - */ - // const gcsPath = 'abc123' - /** - * Required. The repository of the artifact to export. - * Format: projects/{project}/locations/{location}/repositories/{repository} - */ - // const repository = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callExportArtifact() { - // Construct request - const request = { - repository, - }; - - // Run request - const [operation] = await artifactregistryClient.exportArtifact(request); - const [response] = await operation.promise(); - console.log(response); - } - - callExportArtifact(); - // [END artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_attachment.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_attachment.js deleted file mode 100644 index 8f26f77f2c7..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_attachment.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the attachment to retrieve. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetAttachment() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await artifactregistryClient.getAttachment(request); - console.log(response); - } - - callGetAttachment(); - // [END artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_docker_image.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_docker_image.js deleted file mode 100644 index 9e4cc34921d..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_docker_image.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the docker images. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetDockerImage() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await artifactregistryClient.getDockerImage(request); - console.log(response); - } - - callGetDockerImage(); - // [END artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_file.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_file.js deleted file mode 100644 index 5243c918b26..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_file.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_GetFile_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the file to retrieve. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetFile() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await artifactregistryClient.getFile(request); - console.log(response); - } - - callGetFile(); - // [END artifactregistry_v1_generated_ArtifactRegistry_GetFile_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_iam_policy.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_iam_policy.js deleted file mode 100644 index 894c9f6dad7..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_iam_policy.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource) { - // [START artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - */ - // const options = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetIamPolicy() { - // Construct request - const request = { - resource, - }; - - // Run request - const response = await artifactregistryClient.getIamPolicy(request); - console.log(response); - } - - callGetIamPolicy(); - // [END artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_maven_artifact.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_maven_artifact.js deleted file mode 100644 index 4d40455814d..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_maven_artifact.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the maven artifact. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetMavenArtifact() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await artifactregistryClient.getMavenArtifact(request); - console.log(response); - } - - callGetMavenArtifact(); - // [END artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_npm_package.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_npm_package.js deleted file mode 100644 index 79f11e76a4a..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_npm_package.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the npm package. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetNpmPackage() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await artifactregistryClient.getNpmPackage(request); - console.log(response); - } - - callGetNpmPackage(); - // [END artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_package.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_package.js deleted file mode 100644 index 9a8f9b5b95c..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_package.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_GetPackage_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the package to retrieve. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetPackage() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await artifactregistryClient.getPackage(request); - console.log(response); - } - - callGetPackage(); - // [END artifactregistry_v1_generated_ArtifactRegistry_GetPackage_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_project_settings.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_project_settings.js deleted file mode 100644 index 64ea59f24d2..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_project_settings.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the projectSettings resource. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetProjectSettings() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await artifactregistryClient.getProjectSettings(request); - console.log(response); - } - - callGetProjectSettings(); - // [END artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_python_package.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_python_package.js deleted file mode 100644 index 80dd50b699a..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_python_package.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the python package. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetPythonPackage() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await artifactregistryClient.getPythonPackage(request); - console.log(response); - } - - callGetPythonPackage(); - // [END artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_repository.js deleted file mode 100644 index ed33370df1a..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_repository.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_GetRepository_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the repository to retrieve. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetRepository() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await artifactregistryClient.getRepository(request); - console.log(response); - } - - callGetRepository(); - // [END artifactregistry_v1_generated_ArtifactRegistry_GetRepository_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_rule.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_rule.js deleted file mode 100644 index 575d3554436..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_rule.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_GetRule_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the rule to retrieve. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetRule() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await artifactregistryClient.getRule(request); - console.log(response); - } - - callGetRule(); - // [END artifactregistry_v1_generated_ArtifactRegistry_GetRule_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_tag.js deleted file mode 100644 index d4b78ce093d..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_tag.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_GetTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the tag to retrieve. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetTag() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.getTag(request); - console.log(response); - } - - callGetTag(); - // [END artifactregistry_v1_generated_ArtifactRegistry_GetTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_v_p_c_s_c_config.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_v_p_c_s_c_config.js deleted file mode 100644 index 37bd3b49156..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_v_p_c_s_c_config.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the VPCSCConfig resource. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetVPCSCConfig() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await artifactregistryClient.getVPCSCConfig(request); - console.log(response); - } - - callGetVPCSCConfig(); - // [END artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_version.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_version.js deleted file mode 100644 index 46b353978b6..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_version.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the version to retrieve. - */ - // const name = 'abc123' - /** - * The view that should be returned in the response. - */ - // const view = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetVersion() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.getVersion(request); - console.log(response); - } - - callGetVersion(); - // [END artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_apt_artifacts.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_apt_artifacts.js deleted file mode 100644 index 15925534853..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_apt_artifacts.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Google Cloud Storage location where input content is located. - */ - // const gcsSource = {} - /** - * The name of the parent resource where the artifacts will be imported. - */ - // const parent = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callImportAptArtifacts() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await artifactregistryClient.importAptArtifacts(request); - const [response] = await operation.promise(); - console.log(response); - } - - callImportAptArtifacts(); - // [END artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_yum_artifacts.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_yum_artifacts.js deleted file mode 100644 index f2311011039..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_yum_artifacts.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Google Cloud Storage location where input content is located. - */ - // const gcsSource = {} - /** - * The name of the parent resource where the artifacts will be imported. - */ - // const parent = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callImportYumArtifacts() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await artifactregistryClient.importYumArtifacts(request); - const [response] = await operation.promise(); - console.log(response); - } - - callImportYumArtifacts(); - // [END artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_attachments.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_attachments.js deleted file mode 100644 index b85fd44a651..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_attachments.js +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent resource whose attachments will be listed. - */ - // const parent = 'abc123' - /** - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * * `target` - * * `type` - * * `attachment_namespace` - */ - // const filter = 'abc123' - /** - * The maximum number of attachments to return. Maximum page size is 1,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListAttachments() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = artifactregistryClient.listAttachmentsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListAttachments(); - // [END artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_docker_images.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_docker_images.js deleted file mode 100644 index f9c3fd90a92..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_docker_images.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent resource whose docker images will be - * listed. - */ - // const parent = 'abc123' - /** - * The maximum number of artifacts to return. Maximum page size is 1,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - /** - * The field to order the results by. - */ - // const orderBy = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListDockerImages() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = artifactregistryClient.listDockerImagesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDockerImages(); - // [END artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_files.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_files.js deleted file mode 100644 index 332b3461bdc..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_files.js +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the repository whose files will be listed. For - * example: "projects/p1/locations/us-central1/repositories/repo1 - */ - // const parent = 'abc123' - /** - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * * `name` - * * `owner` - * * `annotations` - * Examples of using a filter: - * To filter the results of your request to files with the name `my_file.txt` - * in project `my-project` in the `us-central` region, in repository - * `my-repo`, append the following filter expression to your request: - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` - * You can also use wildcards to match any number of characters before or - * after the value: - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` - * To filter the results of your request to files owned by the version `1.0` - * in package `pkg1`, append the following filter expression to your request: - * * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - * To filter the results of your request to files with the annotation - * key-value pair `external_link`: `external_link_value`, append the - * following filter expression to your request: - * * `"annotations.external_link:external_link_value"` - * To filter just for a specific annotation key `external_link`, append the - * following filter expression to your request: - * * `"annotations.external_link"` - * If the annotation key or value contains special characters, you can escape - * them by surrounding the value with backticks. For example, to filter the - * results of your request to files with the annotation key-value pair - * `external.link`:`https://example.com/my-file`, append the following - * filter expression to your request: - * * `` "annotations.`external.link`:`https://example.com/my-file`" `` - * You can also filter with annotations with a wildcard to - * match any number of characters before or after the value: - * * `` "annotations.*_link:`*example.com*`" `` - */ - // const filter = 'abc123' - /** - * The maximum number of files to return. Maximum page size is 1,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - /** - * The field to order the results by. - */ - // const orderBy = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListFiles() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = artifactregistryClient.listFilesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListFiles(); - // [END artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_maven_artifacts.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_maven_artifacts.js deleted file mode 100644 index e74f4adcd85..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_maven_artifacts.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent resource whose maven artifacts will be - * listed. - */ - // const parent = 'abc123' - /** - * The maximum number of artifacts to return. Maximum page size is 1,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListMavenArtifacts() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = artifactregistryClient.listMavenArtifactsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListMavenArtifacts(); - // [END artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_npm_packages.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_npm_packages.js deleted file mode 100644 index 2daaee7b937..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_npm_packages.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent resource whose npm packages will be - * listed. - */ - // const parent = 'abc123' - /** - * The maximum number of artifacts to return. Maximum page size is 1,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListNpmPackages() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = artifactregistryClient.listNpmPackagesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListNpmPackages(); - // [END artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_packages.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_packages.js deleted file mode 100644 index ea3db2c3ee5..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_packages.js +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent resource whose packages will be listed. - */ - // const parent = 'abc123' - /** - * The maximum number of packages to return. Maximum page size is 1,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - /** - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * * `name` - * * `annotations` - * Examples of using a filter: - * To filter the results of your request to packages with the name - * `my-package` in project `my-project` in the `us-central` region, in - * repository `my-repo`, append the following filter expression to your - * request: - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` - * You can also use wildcards to match any number of characters before or - * after the value: - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` - * To filter the results of your request to packages with the annotation - * key-value pair `external_link`: `external_link_value`, append the - * following filter expression to your request": - * * `"annotations.external_link:external_link_value"` - * To filter the results just for a specific annotation key `external_link`, - * append the following filter expression to your request: - * * `"annotations.external_link"` - * If the annotation key or value contains special characters, you can escape - * them by surrounding the value with backticks. For example, to filter the - * results of your request to packages with the annotation key-value pair - * `external.link`:`https://example.com/my-package`, append the following - * filter expression to your request: - * * `` "annotations.`external.link`:`https://example.com/my-package`" `` - * You can also filter with annotations with a wildcard to - * match any number of characters before or after the value: - * * `` "annotations.*_link:`*example.com*`" `` - */ - // const filter = 'abc123' - /** - * Optional. The field to order the results by. - */ - // const orderBy = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListPackages() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = artifactregistryClient.listPackagesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListPackages(); - // [END artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_python_packages.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_python_packages.js deleted file mode 100644 index 6dce37328e7..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_python_packages.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent resource whose python packages will be - * listed. - */ - // const parent = 'abc123' - /** - * The maximum number of artifacts to return. Maximum page size is 1,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListPythonPackages() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = artifactregistryClient.listPythonPackagesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListPythonPackages(); - // [END artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js deleted file mode 100644 index 63ef48d93ad..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent resource whose repositories will be - * listed. - */ - // const parent = 'abc123' - /** - * The maximum number of repositories to return. Maximum page size is 1,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - /** - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * * `name` - * Examples of using a filter: - * To filter the results of your request to repositories with the name - * `my-repo` in project `my-project` in the `us-central` region, append the - * following filter expression to your request: - * * `name="projects/my-project/locations/us-central1/repositories/my-repo"` - * You can also use wildcards to match any number of characters before or - * after the value: - * * `name="projects/my-project/locations/us-central1/repositories/my-*"` - * * `name="projects/my-project/locations/us-central1/repositories/*repo"` - * * `name="projects/my-project/locations/us-central1/repositories/*repo*"` - */ - // const filter = 'abc123' - /** - * Optional. The field to order the results by. - */ - // const orderBy = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListRepositories() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = artifactregistryClient.listRepositoriesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListRepositories(); - // [END artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_rules.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_rules.js deleted file mode 100644 index eccf07ebd11..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_rules.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START artifactregistry_v1_generated_ArtifactRegistry_ListRules_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent repository whose rules will be listed. - * For example: - * `projects/p1/locations/us-central1/repositories/repo1`. - */ - // const parent = 'abc123' - /** - * The maximum number of rules to return. Maximum page size is 1,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListRules() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = artifactregistryClient.listRulesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListRules(); - // [END artifactregistry_v1_generated_ArtifactRegistry_ListRules_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_tags.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_tags.js deleted file mode 100644 index c0197c250c3..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_tags.js +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_ListTags_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the parent package whose tags will be listed. - * For example: - * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. - */ - // const parent = 'abc123' - /** - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * * `name` - * * `version` - * Examples of using a filter: - * To filter the results of your request to tags with the name `my-tag` in - * package `my-package` in repository `my-repo` in project "`y-project` in - * the us-central region, append the following filter expression to your - * request: - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` - * You can also use wildcards to match any number of characters before or - * after the value: - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` - * To filter the results of your request to tags applied to the version - * `1.0` in package `my-package`, append the following filter expression to - * your request: - * * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - */ - // const filter = 'abc123' - /** - * The maximum number of tags to return. Maximum page size is 1,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListTags() { - // Construct request - const request = { - }; - - // Run request - const iterable = artifactregistryClient.listTagsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTags(); - // [END artifactregistry_v1_generated_ArtifactRegistry_ListTags_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_versions.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_versions.js deleted file mode 100644 index 29674b2e3d9..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_versions.js +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the parent resource whose versions will be listed. - */ - // const parent = 'abc123' - /** - * The maximum number of versions to return. Maximum page size is 1,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - /** - * The view that should be returned in the response. - */ - // const view = {} - /** - * Optional. The field to order the results by. - */ - // const orderBy = 'abc123' - /** - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * * `name` - * * `annotations` - * Examples of using a filter: - * To filter the results of your request to versions with the name - * `my-version` in project `my-project` in the `us-central` region, in - * repository `my-repo`, append the following filter expression to your - * request: - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` - * You can also use wildcards to match any number of characters before or - * after the value: - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` - * To filter the results of your request to versions with the annotation - * key-value pair `external_link`: `external_link_value`, append the - * following filter expression to your request: - * * `"annotations.external_link:external_link_value"` - * To filter just for a specific annotation key `external_link`, append the - * following filter expression to your request: - * * `"annotations.external_link"` - * If the annotation key or value contains special characters, you can escape - * them by surrounding the value with backticks. For example, to filter the - * results of your request to versions with the annotation key-value pair - * `external.link`:`https://example.com/my-version`, append the following - * filter expression to your request: - * * `` "annotations.`external.link`:`https://example.com/my-version`" `` - * You can also filter with annotations with a wildcard to - * match any number of characters before or after the value: - * * `` "annotations.*_link:`*example.com*`" `` - */ - // const filter = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListVersions() { - // Construct request - const request = { - }; - - // Run request - const iterable = artifactregistryClient.listVersionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListVersions(); - // [END artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.set_iam_policy.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.set_iam_policy.js deleted file mode 100644 index a5ef179ba23..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.set_iam_policy.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource, policy) { - // [START artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - */ - // const policy = {} - /** - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * `paths: "bindings, etag"` - */ - // const updateMask = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callSetIamPolicy() { - // Construct request - const request = { - resource, - policy, - }; - - // Run request - const response = await artifactregistryClient.setIamPolicy(request); - console.log(response); - } - - callSetIamPolicy(); - // [END artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.test_iam_permissions.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.test_iam_permissions.js deleted file mode 100644 index aeee15f724f..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.test_iam_permissions.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource, permissions) { - // [START artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). - */ - // const permissions = ['abc','def'] - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callTestIamPermissions() { - // Construct request - const request = { - resource, - permissions, - }; - - // Run request - const response = await artifactregistryClient.testIamPermissions(request); - console.log(response); - } - - callTestIamPermissions(); - // [END artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_file.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_file.js deleted file mode 100644 index 9c85e991392..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_file.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2025 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(file, updateMask) { - // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The File that replaces the resource on the server. - */ - // const file = {} - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - */ - // const updateMask = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callUpdateFile() { - // Construct request - const request = { - file, - updateMask, - }; - - // Run request - const response = await artifactregistryClient.updateFile(request); - console.log(response); - } - - callUpdateFile(); - // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_package.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_package.js deleted file mode 100644 index 803ed2926a7..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_package.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The package that replaces the resource on the server. - */ - // const package = {} - /** - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - */ - // const updateMask = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callUpdatePackage() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.updatePackage(request); - console.log(response); - } - - callUpdatePackage(); - // [END artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_project_settings.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_project_settings.js deleted file mode 100644 index a74d8d24b72..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_project_settings.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The project settings. - */ - // const projectSettings = {} - /** - * Field mask to support partial updates. - */ - // const updateMask = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callUpdateProjectSettings() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.updateProjectSettings(request); - console.log(response); - } - - callUpdateProjectSettings(); - // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_repository.js deleted file mode 100644 index c9017b0da64..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_repository.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The repository that replaces the resource on the server. - */ - // const repository = {} - /** - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - */ - // const updateMask = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callUpdateRepository() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.updateRepository(request); - console.log(response); - } - - callUpdateRepository(); - // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_rule.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_rule.js deleted file mode 100644 index 91e95b1fb0f..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_rule.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The rule that replaces the resource on the server. - */ - // const rule = {} - /** - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - */ - // const updateMask = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callUpdateRule() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.updateRule(request); - console.log(response); - } - - callUpdateRule(); - // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_tag.js deleted file mode 100644 index d18f893e356..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_tag.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The tag that replaces the resource on the server. - */ - // const tag = {} - /** - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - */ - // const updateMask = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callUpdateTag() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.updateTag(request); - console.log(response); - } - - callUpdateTag(); - // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_v_p_c_s_c_config.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_v_p_c_s_c_config.js deleted file mode 100644 index 3bfb32ef9a9..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_v_p_c_s_c_config.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The project config. - */ - // const vpcscConfig = {} - /** - * Field mask to support partial updates. - */ - // const updateMask = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callUpdateVPCSCConfig() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.updateVPCSCConfig(request); - console.log(response); - } - - callUpdateVPCSCConfig(); - // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_version.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_version.js deleted file mode 100644 index ad50d44f239..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_version.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2025 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(version) { - // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Version that replaces the resource on the server. - */ - // const version = {} - /** - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - */ - // const updateMask = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callUpdateVersion() { - // Construct request - const request = { - version, - }; - - // Run request - const response = await artifactregistryClient.updateVersion(request); - console.log(response); - } - - callUpdateVersion(); - // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json deleted file mode 100644 index a8ffbe34418..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json +++ /dev/null @@ -1,2267 +0,0 @@ -{ - "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": 68, - "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" - }, - { - "name": "order_by", - "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_GetDockerImage_async", - "title": "ArtifactRegistry getDockerImage Sample", - "origin": "API_DEFINITION", - "description": " Gets a docker image.", - "canonical": true, - "file": "artifact_registry.get_docker_image.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDockerImage", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImage", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.DockerImage", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "GetDockerImage", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImage", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_async", - "title": "ArtifactRegistry listMavenArtifacts Sample", - "origin": "API_DEFINITION", - "description": " Lists maven artifacts.", - "canonical": true, - "file": "artifact_registry.list_maven_artifacts.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListMavenArtifacts", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListMavenArtifacts", - "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.ListMavenArtifactsResponse", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "ListMavenArtifacts", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListMavenArtifacts", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_async", - "title": "ArtifactRegistry getMavenArtifact Sample", - "origin": "API_DEFINITION", - "description": " Gets a maven artifact.", - "canonical": true, - "file": "artifact_registry.get_maven_artifact.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetMavenArtifact", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetMavenArtifact", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.MavenArtifact", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "GetMavenArtifact", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetMavenArtifact", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_async", - "title": "ArtifactRegistry listNpmPackages Sample", - "origin": "API_DEFINITION", - "description": " Lists npm packages.", - "canonical": true, - "file": "artifact_registry.list_npm_packages.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListNpmPackages", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListNpmPackages", - "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.ListNpmPackagesResponse", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "ListNpmPackages", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListNpmPackages", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_async", - "title": "ArtifactRegistry getNpmPackage Sample", - "origin": "API_DEFINITION", - "description": " Gets a npm package.", - "canonical": true, - "file": "artifact_registry.get_npm_package.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetNpmPackage", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetNpmPackage", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.NpmPackage", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "GetNpmPackage", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetNpmPackage", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_async", - "title": "ArtifactRegistry listPythonPackages Sample", - "origin": "API_DEFINITION", - "description": " Lists python packages.", - "canonical": true, - "file": "artifact_registry.list_python_packages.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListPythonPackages", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPythonPackages", - "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.ListPythonPackagesResponse", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "ListPythonPackages", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPythonPackages", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_async", - "title": "ArtifactRegistry getPythonPackage Sample", - "origin": "API_DEFINITION", - "description": " Gets a python package.", - "canonical": true, - "file": "artifact_registry.get_python_package.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPythonPackage", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPythonPackage", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.PythonPackage", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "GetPythonPackage", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPythonPackage", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async", - "title": "ArtifactRegistry importAptArtifacts Sample", - "origin": "API_DEFINITION", - "description": " Imports Apt artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.", - "canonical": true, - "file": "artifact_registry.import_apt_artifacts.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ImportAptArtifacts", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifacts", - "async": true, - "parameters": [ - { - "name": "gcs_source", - "type": ".google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource" - }, - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "ImportAptArtifacts", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifacts", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async", - "title": "ArtifactRegistry importYumArtifacts Sample", - "origin": "API_DEFINITION", - "description": " Imports Yum (RPM) artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.", - "canonical": true, - "file": "artifact_registry.import_yum_artifacts.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ImportYumArtifacts", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifacts", - "async": true, - "parameters": [ - { - "name": "gcs_source", - "type": ".google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource" - }, - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "ImportYumArtifacts", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifacts", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async", - "title": "ArtifactRegistry listRepositories Sample", - "origin": "API_DEFINITION", - "description": " Lists repositories.", - "canonical": true, - "file": "artifact_registry.list_repositories.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 84, - "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" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "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": 53, - "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" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async", - "title": "ArtifactRegistry createRepository Sample", - "origin": "API_DEFINITION", - "description": " Creates a repository. The returned Operation will finish once the repository has been created. Its response will be the created Repository.", - "canonical": true, - "file": "artifact_registry.create_repository.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateRepository", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepository", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "repository_id", - "type": "TYPE_STRING" - }, - { - "name": "repository", - "type": ".google.devtools.artifactregistry.v1.Repository" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "CreateRepository", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepository", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async", - "title": "ArtifactRegistry updateRepository Sample", - "origin": "API_DEFINITION", - "description": " Updates a repository.", - "canonical": true, - "file": "artifact_registry.update_repository.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateRepository", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepository", - "async": true, - "parameters": [ - { - "name": "repository", - "type": ".google.devtools.artifactregistry.v1.Repository" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.Repository", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "UpdateRepository", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepository", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async", - "title": "ArtifactRegistry deleteRepository Sample", - "origin": "API_DEFINITION", - "description": " Deletes a repository and all of its contents. The returned Operation will finish once the repository has been deleted. It will not have any Operation metadata and will return a google.protobuf.Empty response.", - "canonical": true, - "file": "artifact_registry.delete_repository.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteRepository", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepository", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "DeleteRepository", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepository", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async", - "title": "ArtifactRegistry listPackages Sample", - "origin": "API_DEFINITION", - "description": " Lists packages.", - "canonical": true, - "file": "artifact_registry.list_packages.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 101, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListPackages", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackages", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.ListPackagesResponse", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "ListPackages", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackages", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetPackage_async", - "title": "ArtifactRegistry getPackage Sample", - "origin": "API_DEFINITION", - "description": " Gets a package.", - "canonical": true, - "file": "artifact_registry.get_package.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPackage", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackage", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.Package", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "GetPackage", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackage", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async", - "title": "ArtifactRegistry deletePackage Sample", - "origin": "API_DEFINITION", - "description": " Deletes a package and all of its versions and tags. The returned operation will complete once the package has been deleted.", - "canonical": true, - "file": "artifact_registry.delete_package.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeletePackage", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackage", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "DeletePackage", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackage", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async", - "title": "ArtifactRegistry listVersions Sample", - "origin": "API_DEFINITION", - "description": " Lists versions.", - "canonical": true, - "file": "artifact_registry.list_versions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 104, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListVersions", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.devtools.artifactregistry.v1.VersionView" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.ListVersionsResponse", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "ListVersions", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersions", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async", - "title": "ArtifactRegistry getVersion Sample", - "origin": "API_DEFINITION", - "description": " Gets a version", - "canonical": true, - "file": "artifact_registry.get_version.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetVersion", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersion", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.devtools.artifactregistry.v1.VersionView" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.Version", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "GetVersion", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersion", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async", - "title": "ArtifactRegistry deleteVersion Sample", - "origin": "API_DEFINITION", - "description": " Deletes a version and all of its content. The returned operation will complete once the version has been deleted.", - "canonical": true, - "file": "artifact_registry.delete_version.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteVersion", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersion", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "DeleteVersion", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersion", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_async", - "title": "ArtifactRegistry batchDeleteVersions Sample", - "origin": "API_DEFINITION", - "description": " Deletes multiple versions across a repository. The returned operation will complete once the versions have been deleted.", - "canonical": true, - "file": "artifact_registry.batch_delete_versions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchDeleteVersions", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.BatchDeleteVersions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "names", - "type": "TYPE_STRING[]" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "BatchDeleteVersions", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.BatchDeleteVersions", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_async", - "title": "ArtifactRegistry updateVersion Sample", - "origin": "API_DEFINITION", - "description": " Updates a version.", - "canonical": true, - "file": "artifact_registry.update_version.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateVersion", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVersion", - "async": true, - "parameters": [ - { - "name": "version", - "type": ".google.devtools.artifactregistry.v1.Version" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.Version", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "UpdateVersion", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVersion", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async", - "title": "ArtifactRegistry listFiles Sample", - "origin": "API_DEFINITION", - "description": " Lists files.", - "canonical": true, - "file": "artifact_registry.list_files.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 105, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListFiles", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListFiles", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.ListFilesResponse", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "ListFiles", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListFiles", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetFile_async", - "title": "ArtifactRegistry getFile Sample", - "origin": "API_DEFINITION", - "description": " Gets a file.", - "canonical": true, - "file": "artifact_registry.get_file.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetFile", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetFile", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.File", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "GetFile", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetFile", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_async", - "title": "ArtifactRegistry deleteFile Sample", - "origin": "API_DEFINITION", - "description": " Deletes a file and all of its content. It is only allowed on generic repositories. The returned operation will complete once the file has been deleted.", - "canonical": true, - "file": "artifact_registry.delete_file.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteFile", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteFile", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "DeleteFile", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteFile", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_async", - "title": "ArtifactRegistry updateFile Sample", - "origin": "API_DEFINITION", - "description": " Updates a file.", - "canonical": true, - "file": "artifact_registry.update_file.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateFile", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateFile", - "async": true, - "parameters": [ - { - "name": "file", - "type": ".google.devtools.artifactregistry.v1.File" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.File", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "UpdateFile", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateFile", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListTags_async", - "title": "ArtifactRegistry listTags Sample", - "origin": "API_DEFINITION", - "description": " Lists tags.", - "canonical": true, - "file": "artifact_registry.list_tags.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 86, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTags", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListTags", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.ListTagsResponse", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "ListTags", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListTags", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetTag_async", - "title": "ArtifactRegistry getTag Sample", - "origin": "API_DEFINITION", - "description": " Gets a tag.", - "canonical": true, - "file": "artifact_registry.get_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTag", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetTag", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.Tag", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "GetTag", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetTag", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async", - "title": "ArtifactRegistry createTag Sample", - "origin": "API_DEFINITION", - "description": " Creates a tag.", - "canonical": true, - "file": "artifact_registry.create_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTag", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTag", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tag_id", - "type": "TYPE_STRING" - }, - { - "name": "tag", - "type": ".google.devtools.artifactregistry.v1.Tag" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.Tag", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "CreateTag", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTag", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async", - "title": "ArtifactRegistry updateTag Sample", - "origin": "API_DEFINITION", - "description": " Updates a tag.", - "canonical": true, - "file": "artifact_registry.update_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTag", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTag", - "async": true, - "parameters": [ - { - "name": "tag", - "type": ".google.devtools.artifactregistry.v1.Tag" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.Tag", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "UpdateTag", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTag", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async", - "title": "ArtifactRegistry deleteTag Sample", - "origin": "API_DEFINITION", - "description": " Deletes a tag.", - "canonical": true, - "file": "artifact_registry.delete_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTag", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTag", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "DeleteTag", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTag", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRule_async", - "title": "ArtifactRegistry createRule Sample", - "origin": "API_DEFINITION", - "description": " Creates a rule.", - "canonical": true, - "file": "artifact_registry.create_rule.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateRule", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRule", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "rule_id", - "type": "TYPE_STRING" - }, - { - "name": "rule", - "type": ".google.devtools.artifactregistry.v1.Rule" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.Rule", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "CreateRule", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRule", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListRules_async", - "title": "ArtifactRegistry listRules Sample", - "origin": "API_DEFINITION", - "description": " Lists rules.", - "canonical": true, - "file": "artifact_registry.list_rules.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListRules", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRules", - "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.ListRulesResponse", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "ListRules", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRules", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetRule_async", - "title": "ArtifactRegistry getRule Sample", - "origin": "API_DEFINITION", - "description": " Gets a rule.", - "canonical": true, - "file": "artifact_registry.get_rule.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetRule", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRule", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.Rule", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "GetRule", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRule", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_async", - "title": "ArtifactRegistry updateRule Sample", - "origin": "API_DEFINITION", - "description": " Updates a rule.", - "canonical": true, - "file": "artifact_registry.update_rule.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateRule", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRule", - "async": true, - "parameters": [ - { - "name": "rule", - "type": ".google.devtools.artifactregistry.v1.Rule" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.Rule", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "UpdateRule", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRule", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_async", - "title": "ArtifactRegistry deleteRule Sample", - "origin": "API_DEFINITION", - "description": " Deletes a rule.", - "canonical": true, - "file": "artifact_registry.delete_rule.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteRule", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRule", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "DeleteRule", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRule", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async", - "title": "ArtifactRegistry setIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Updates the IAM policy for a given resource.", - "canonical": true, - "file": "artifact_registry.set_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetIamPolicy", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "policy", - "type": ".google.iam.v1.Policy" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "SetIamPolicy", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicy", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async", - "title": "ArtifactRegistry getIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Gets the IAM policy for a given resource.", - "canonical": true, - "file": "artifact_registry.get_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIamPolicy", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "options", - "type": ".google.iam.v1.GetPolicyOptions" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "GetIamPolicy", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicy", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async", - "title": "ArtifactRegistry testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Tests if the caller has a list of permissions on a resource.", - "canonical": true, - "file": "artifact_registry.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissions", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_async", - "title": "ArtifactRegistry getProjectSettings Sample", - "origin": "API_DEFINITION", - "description": " Retrieves the Settings for the Project.", - "canonical": true, - "file": "artifact_registry.get_project_settings.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetProjectSettings", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettings", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.ProjectSettings", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "GetProjectSettings", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettings", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async", - "title": "ArtifactRegistry updateProjectSettings Sample", - "origin": "API_DEFINITION", - "description": " Updates the Settings for the Project.", - "canonical": true, - "file": "artifact_registry.update_project_settings.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateProjectSettings", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettings", - "async": true, - "parameters": [ - { - "name": "project_settings", - "type": ".google.devtools.artifactregistry.v1.ProjectSettings" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.ProjectSettings", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "UpdateProjectSettings", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettings", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_async", - "title": "ArtifactRegistry getVPCSCConfig Sample", - "origin": "API_DEFINITION", - "description": " Retrieves the VPCSC Config for the Project.", - "canonical": true, - "file": "artifact_registry.get_v_p_c_s_c_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetVPCSCConfig", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVPCSCConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.VPCSCConfig", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "GetVPCSCConfig", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVPCSCConfig", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_async", - "title": "ArtifactRegistry updateVPCSCConfig Sample", - "origin": "API_DEFINITION", - "description": " Updates the VPCSC Config for the Project.", - "canonical": true, - "file": "artifact_registry.update_v_p_c_s_c_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateVPCSCConfig", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVPCSCConfig", - "async": true, - "parameters": [ - { - "name": "vpcsc_config", - "type": ".google.devtools.artifactregistry.v1.VPCSCConfig" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.VPCSCConfig", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "UpdateVPCSCConfig", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVPCSCConfig", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_async", - "title": "ArtifactRegistry updatePackage Sample", - "origin": "API_DEFINITION", - "description": " Updates a package.", - "canonical": true, - "file": "artifact_registry.update_package.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdatePackage", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdatePackage", - "async": true, - "parameters": [ - { - "name": "package", - "type": ".google.devtools.artifactregistry.v1.Package" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.Package", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "UpdatePackage", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdatePackage", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_async", - "title": "ArtifactRegistry listAttachments Sample", - "origin": "API_DEFINITION", - "description": " Lists attachments.", - "canonical": true, - "file": "artifact_registry.list_attachments.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAttachments", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListAttachments", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.ListAttachmentsResponse", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "ListAttachments", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListAttachments", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_async", - "title": "ArtifactRegistry getAttachment Sample", - "origin": "API_DEFINITION", - "description": " Gets an attachment.", - "canonical": true, - "file": "artifact_registry.get_attachment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAttachment", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetAttachment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.artifactregistry.v1.Attachment", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "GetAttachment", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetAttachment", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_async", - "title": "ArtifactRegistry createAttachment Sample", - "origin": "API_DEFINITION", - "description": " Creates an attachment. The returned Operation will finish once the attachment has been created. Its response will be the created attachment.", - "canonical": true, - "file": "artifact_registry.create_attachment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAttachment", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateAttachment", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "attachment_id", - "type": "TYPE_STRING" - }, - { - "name": "attachment", - "type": ".google.devtools.artifactregistry.v1.Attachment" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "CreateAttachment", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateAttachment", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_async", - "title": "ArtifactRegistry deleteAttachment Sample", - "origin": "API_DEFINITION", - "description": " Deletes an attachment. The returned Operation will finish once the attachments has been deleted. It will not have any Operation metadata and will return a `google.protobuf.Empty` response.", - "canonical": true, - "file": "artifact_registry.delete_attachment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAttachment", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteAttachment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "DeleteAttachment", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteAttachment", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - }, - { - "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_async", - "title": "ArtifactRegistry exportArtifact Sample", - "origin": "API_DEFINITION", - "description": " Exports an artifact to a Cloud Storage bucket.", - "canonical": true, - "file": "artifact_registry.export_artifact.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportArtifact", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ExportArtifact", - "async": true, - "parameters": [ - { - "name": "source_version", - "type": "TYPE_STRING" - }, - { - "name": "source_tag", - "type": "TYPE_STRING" - }, - { - "name": "gcs_path", - "type": "TYPE_STRING" - }, - { - "name": "repository", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ArtifactRegistryClient", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" - }, - "method": { - "shortName": "ExportArtifact", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ExportArtifact", - "service": { - "shortName": "ArtifactRegistry", - "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_repository.js deleted file mode 100644 index 30fec0fcc3a..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_repository.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent resource where the repository will be created. - */ - // const parent = 'abc123' - /** - * The repository id to use for this repository. - */ - // const repositoryId = 'abc123' - /** - * The repository to be created. - */ - // const repository = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callCreateRepository() { - // Construct request - const request = { - parent, - }; - - // Run request - const [operation] = await artifactregistryClient.createRepository(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateRepository(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_tag.js deleted file mode 100644 index b89ebda0596..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.create_tag.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2025 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_CreateTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the parent resource where the tag will be created. - */ - // const parent = 'abc123' - /** - * The tag id to use for this repository. - */ - // const tagId = 'abc123' - /** - * The tag to be created. - */ - // const tag = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callCreateTag() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.createTag(request); - console.log(response); - } - - callCreateTag(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_package.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_package.js deleted file mode 100644 index 5d76d786420..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_package.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 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_DeletePackage_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the package to delete. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callDeletePackage() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await artifactregistryClient.deletePackage(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeletePackage(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_repository.js deleted file mode 100644 index c8114b1ca80..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_repository.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2025 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_DeleteRepository_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the repository to delete. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callDeleteRepository() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await artifactregistryClient.deleteRepository(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteRepository(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_tag.js deleted file mode 100644 index 9978d2c366f..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_tag.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2025 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_DeleteTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the tag to delete. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callDeleteTag() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.deleteTag(request); - console.log(response); - } - - callDeleteTag(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_version.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_version.js deleted file mode 100644 index 33ce3aaf395..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.delete_version.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2025 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_DeleteVersion_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the version to delete. - */ - // const name = 'abc123' - /** - * By default, a version that is tagged may not be deleted. If force=true, the - * version and any tags pointing to the version are deleted. - */ - // const force = true - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callDeleteVersion() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await artifactregistryClient.deleteVersion(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteVersion(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_file.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_file.js deleted file mode 100644 index 7cbd738db0d..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_file.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2025 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_GetFile_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the file to retrieve. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetFile() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.getFile(request); - console.log(response); - } - - callGetFile(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_iam_policy.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_iam_policy.js deleted file mode 100644 index 30fed02a494..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_iam_policy.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource) { - // [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - */ - // const options = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetIamPolicy() { - // Construct request - const request = { - resource, - }; - - // Run request - const response = await artifactregistryClient.getIamPolicy(request); - console.log(response); - } - - callGetIamPolicy(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_package.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_package.js deleted file mode 100644 index 135f58689c4..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_package.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2025 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_GetPackage_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the package to retrieve. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetPackage() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.getPackage(request); - console.log(response); - } - - callGetPackage(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_project_settings.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_project_settings.js deleted file mode 100644 index c77c05f4db9..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_project_settings.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 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] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the 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/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_repository.js deleted file mode 100644 index 5989b7a273b..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_repository.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 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_GetRepository_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the repository to retrieve. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetRepository() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await artifactregistryClient.getRepository(request); - console.log(response); - } - - callGetRepository(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_tag.js deleted file mode 100644 index 1770bc9f358..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_tag.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2025 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_GetTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the tag to retrieve. - */ - // const name = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetTag() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.getTag(request); - console.log(response); - } - - callGetTag(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_version.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_version.js deleted file mode 100644 index 12de2aac873..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.get_version.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2025 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_GetVersion_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the version to retrieve. - */ - // const name = 'abc123' - /** - * The view that should be returned in the response. - */ - // const view = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callGetVersion() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.getVersion(request); - console.log(response); - } - - callGetVersion(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_apt_artifacts.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_apt_artifacts.js deleted file mode 100644 index 2ddbd0e6671..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_apt_artifacts.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2025 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] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * 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/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_yum_artifacts.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_yum_artifacts.js deleted file mode 100644 index 79b826fdfd5..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.import_yum_artifacts.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2025 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] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * 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/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_files.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_files.js deleted file mode 100644 index a721f756cb5..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_files.js +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2025 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_ListFiles_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the repository whose files will be listed. For example: - * "projects/p1/locations/us-central1/repositories/repo1 - */ - // const parent = 'abc123' - /** - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * * `name` - * * `owner` - * An example of using a filter: - * * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an - * ID starting with "a/b/". - * * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> - * Files owned by the version `1.0` in package `pkg1`. - */ - // const filter = 'abc123' - /** - * The maximum number of files to return. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListFiles() { - // Construct request - const request = { - }; - - // Run request - const iterable = artifactregistryClient.listFilesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListFiles(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_packages.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_packages.js deleted file mode 100644 index b663fc504a6..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_packages.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2025 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_ListPackages_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the parent resource whose packages will be listed. - */ - // const parent = 'abc123' - /** - * The maximum number of packages to return. - * Maximum page size is 10,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListPackages() { - // Construct request - const request = { - }; - - // Run request - const iterable = artifactregistryClient.listPackagesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListPackages(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_repositories.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_repositories.js deleted file mode 100644 index b9cd6340bc5..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_repositories.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent resource whose repositories will be listed. - */ - // const parent = 'abc123' - /** - * The maximum number of repositories to return. Maximum page size is 1,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListRepositories() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = artifactregistryClient.listRepositoriesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListRepositories(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_tags.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_tags.js deleted file mode 100644 index eb53062c293..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_tags.js +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2025 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_ListTags_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the parent resource whose tags will be listed. - */ - // const parent = 'abc123' - /** - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * * `version` - * An example of using a filter: - * * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` - * --> Tags that are applied to the version `1.0` in package `pkg1`. - */ - // const filter = 'abc123' - /** - * The maximum number of tags to return. Maximum page size is 10,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListTags() { - // Construct request - const request = { - }; - - // Run request - const iterable = artifactregistryClient.listTagsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTags(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_versions.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_versions.js deleted file mode 100644 index 2ddb1a887e0..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.list_versions.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2025 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_ListVersions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The name of the parent resource whose versions will be listed. - */ - // const parent = 'abc123' - /** - * The maximum number of versions to return. Maximum page size is 1,000. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. - */ - // const pageToken = 'abc123' - /** - * The view that should be returned in the response. - */ - // const view = {} - /** - * Optional. The field to order the results by. - */ - // const orderBy = 'abc123' - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callListVersions() { - // Construct request - const request = { - }; - - // Run request - const iterable = artifactregistryClient.listVersionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListVersions(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.set_iam_policy.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.set_iam_policy.js deleted file mode 100644 index 67410fb8ab4..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.set_iam_policy.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource, policy) { - // [START artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - */ - // const policy = {} - /** - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * `paths: "bindings, etag"` - */ - // const updateMask = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callSetIamPolicy() { - // Construct request - const request = { - resource, - policy, - }; - - // Run request - const response = await artifactregistryClient.setIamPolicy(request); - console.log(response); - } - - callSetIamPolicy(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js deleted file mode 100644 index 09dfb247caa..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource, permissions) { - // [START artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). - */ - // const permissions = ['abc','def'] - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callTestIamPermissions() { - // Construct request - const request = { - resource, - permissions, - }; - - // Run request - const response = await artifactregistryClient.testIamPermissions(request); - console.log(response); - } - - callTestIamPermissions(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_project_settings.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_project_settings.js deleted file mode 100644 index 62d4b45c5e1..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_project_settings.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2025 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] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * 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/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_repository.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_repository.js deleted file mode 100644 index dc3a1818b47..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_repository.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2025 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_UpdateRepository_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The repository that replaces the resource on the server. - */ - // const repository = {} - /** - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - */ - // const updateMask = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callUpdateRepository() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.updateRepository(request); - console.log(response); - } - - callUpdateRepository(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_tag.js b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_tag.js deleted file mode 100644 index 209ff76b8cb..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/artifact_registry.update_tag.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2025 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_UpdateTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * The tag that replaces the resource on the server. - */ - // const tag = {} - /** - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - */ - // const updateMask = {} - - // Imports the Artifactregistry library - const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1beta2; - - // Instantiates a client - const artifactregistryClient = new ArtifactRegistryClient(); - - async function callUpdateTag() { - // Construct request - const request = { - }; - - // Run request - const response = await artifactregistryClient.updateTag(request); - console.log(response); - } - - callUpdateTag(); - // [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json b/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json deleted file mode 100644 index e51d58b7b1b..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json +++ /dev/null @@ -1,1131 +0,0 @@ -{ - "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": 57, - "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": 57, - "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": 63, - "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": 53, - "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": 62, - "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": 58, - "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": 54, - "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": 63, - "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": 52, - "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": 53, - "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": 70, - "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": 56, - "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": 58, - "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": 75, - "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": 52, - "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": 71, - "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": 52, - "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": 60, - "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": 58, - "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": 52, - "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": 69, - "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" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "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": 59, - "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": 62, - "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": 53, - "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": 56, - "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/owl-bot-staging/google-devtools-artifactregistry/src/index.ts b/owl-bot-staging/google-devtools-artifactregistry/src/index.ts deleted file mode 100644 index 8348feb7be0..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/src/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2025 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 synthtool. ** -// ** https://github.com/googleapis/synthtool ** -// ** All changes to this file may be overwritten. ** - -import * as v1 from './v1'; -import * as v1beta2 from './v1beta2'; - -const ArtifactRegistryClient = v1.ArtifactRegistryClient; -type ArtifactRegistryClient = v1.ArtifactRegistryClient; - -export {v1, v1beta2, ArtifactRegistryClient}; -export default {v1, v1beta2, ArtifactRegistryClient}; -import * as protos from '../protos/protos'; -export {protos}; diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts b/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts deleted file mode 100644 index 18a7ea0ae36..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts +++ /dev/null @@ -1,8608 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; - -/** - * Client JSON configuration object, loaded from - * `src/v1/artifact_registry_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './artifact_registry_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The Artifact Registry API service. - * - * Artifact Registry is an artifact management system for storing artifacts - * from different package management systems. - * - * The resources managed by this API are: - * - * * Repositories, which group packages and their data. - * * Packages, which group versions and their tags. - * * Versions, which are specific forms of a package. - * * Tags, which represent alternative names for versions. - * * Files, which contain content and are optionally associated with a Package - * or Version. - * @class - * @memberof v1 - */ -export class ArtifactRegistryClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - private _universeDomain: string; - private _servicePath: string; - private _log = logging.log('artifact-registry'); - - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - artifactRegistryStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of ArtifactRegistryClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new ArtifactRegistryClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof ArtifactRegistryClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'artifactregistry.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - aptArtifactPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}' - ), - attachmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repository}/attachments/{attachment}' - ), - dockerImagePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}' - ), - filePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repository}/files/{file}' - ), - genericArtifactPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repository}/genericArtifacts/{generic_artifact}' - ), - goModulePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repository}/goModules/{go_module}' - ), - kfpArtifactPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repository}/kfpArtifacts/{kfp_artifact}' - ), - mavenArtifactPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}' - ), - npmPackagePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}' - ), - packagePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repository}/packages/{package}' - ), - projectSettingsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/projectSettings' - ), - pythonPackagePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}' - ), - repositoryPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repository}' - ), - rulePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repository}/rules/{rule}' - ), - 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}' - ), - vpcscConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/vpcscConfig' - ), - yumArtifactPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}' - ), - }; - - // Some of the methods on this service return "paged" results, - // (e.g. 50 results at a time, with tokens to get subsequent - // pages). Denote the keys used for pagination and results. - this.descriptors.page = { - listDockerImages: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dockerImages'), - listMavenArtifacts: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'mavenArtifacts'), - listNpmPackages: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'npmPackages'), - listPythonPackages: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'pythonPackages'), - listRepositories: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'repositories'), - listPackages: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'packages'), - listVersions: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'versions'), - listFiles: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'files'), - listTags: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'tags'), - listRules: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'rules'), - listAttachments: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'attachments') - }; - - const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - const lroOptions: GrpcClientOptions = { - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }; - if (opts.fallback) { - lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const importAptArtifactsResponse = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.ImportAptArtifactsResponse') as gax.protobuf.Type; - const importAptArtifactsMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata') as gax.protobuf.Type; - const importYumArtifactsResponse = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.ImportYumArtifactsResponse') as gax.protobuf.Type; - const importYumArtifactsMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata') as gax.protobuf.Type; - const createRepositoryResponse = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.Repository') as gax.protobuf.Type; - const createRepositoryMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.OperationMetadata') as gax.protobuf.Type; - const deleteRepositoryResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteRepositoryMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.OperationMetadata') as gax.protobuf.Type; - const deletePackageResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deletePackageMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.OperationMetadata') as gax.protobuf.Type; - const deleteVersionResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteVersionMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.OperationMetadata') as gax.protobuf.Type; - const batchDeleteVersionsResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const batchDeleteVersionsMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata') as gax.protobuf.Type; - const deleteFileResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteFileMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.OperationMetadata') as gax.protobuf.Type; - const createAttachmentResponse = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.Attachment') as gax.protobuf.Type; - const createAttachmentMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.OperationMetadata') as gax.protobuf.Type; - const deleteAttachmentResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteAttachmentMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.OperationMetadata') as gax.protobuf.Type; - const exportArtifactResponse = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.ExportArtifactResponse') as gax.protobuf.Type; - const exportArtifactMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1.ExportArtifactMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - importAptArtifacts: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - importAptArtifactsResponse.decode.bind(importAptArtifactsResponse), - importAptArtifactsMetadata.decode.bind(importAptArtifactsMetadata)), - importYumArtifacts: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - importYumArtifactsResponse.decode.bind(importYumArtifactsResponse), - importYumArtifactsMetadata.decode.bind(importYumArtifactsMetadata)), - createRepository: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createRepositoryResponse.decode.bind(createRepositoryResponse), - createRepositoryMetadata.decode.bind(createRepositoryMetadata)), - deleteRepository: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteRepositoryResponse.decode.bind(deleteRepositoryResponse), - deleteRepositoryMetadata.decode.bind(deleteRepositoryMetadata)), - deletePackage: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deletePackageResponse.decode.bind(deletePackageResponse), - deletePackageMetadata.decode.bind(deletePackageMetadata)), - deleteVersion: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteVersionResponse.decode.bind(deleteVersionResponse), - deleteVersionMetadata.decode.bind(deleteVersionMetadata)), - batchDeleteVersions: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - batchDeleteVersionsResponse.decode.bind(batchDeleteVersionsResponse), - batchDeleteVersionsMetadata.decode.bind(batchDeleteVersionsMetadata)), - deleteFile: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteFileResponse.decode.bind(deleteFileResponse), - deleteFileMetadata.decode.bind(deleteFileMetadata)), - createAttachment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createAttachmentResponse.decode.bind(createAttachmentResponse), - createAttachmentMetadata.decode.bind(createAttachmentMetadata)), - deleteAttachment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteAttachmentResponse.decode.bind(deleteAttachmentResponse), - deleteAttachmentMetadata.decode.bind(deleteAttachmentMetadata)), - exportArtifact: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - exportArtifactResponse.decode.bind(exportArtifactResponse), - exportArtifactMetadata.decode.bind(exportArtifactMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.devtools.artifactregistry.v1.ArtifactRegistry', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.artifactRegistryStub) { - return this.artifactRegistryStub; - } - - // Put together the "service stub" for - // google.devtools.artifactregistry.v1.ArtifactRegistry. - this.artifactRegistryStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.devtools.artifactregistry.v1.ArtifactRegistry') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.devtools.artifactregistry.v1.ArtifactRegistry, - this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const artifactRegistryStubMethods = - ['listDockerImages', 'getDockerImage', 'listMavenArtifacts', 'getMavenArtifact', 'listNpmPackages', 'getNpmPackage', 'listPythonPackages', 'getPythonPackage', 'importAptArtifacts', 'importYumArtifacts', 'listRepositories', 'getRepository', 'createRepository', 'updateRepository', 'deleteRepository', 'listPackages', 'getPackage', 'deletePackage', 'listVersions', 'getVersion', 'deleteVersion', 'batchDeleteVersions', 'updateVersion', 'listFiles', 'getFile', 'deleteFile', 'updateFile', 'listTags', 'getTag', 'createTag', 'updateTag', 'deleteTag', 'createRule', 'listRules', 'getRule', 'updateRule', 'deleteRule', 'setIamPolicy', 'getIamPolicy', 'testIamPermissions', 'getProjectSettings', 'updateProjectSettings', 'getVpcscConfig', 'updateVpcscConfig', 'updatePackage', 'listAttachments', 'getAttachment', 'createAttachment', 'deleteAttachment', 'exportArtifact']; - for (const methodName of artifactRegistryStubMethods) { - const callPromise = this.artifactRegistryStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - this.descriptors.page[methodName] || - this.descriptors.longrunning[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.artifactRegistryStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'artifactregistry.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'artifactregistry.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only' - ]; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId(callback?: Callback): - Promise|void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- -/** - * Gets a docker image. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the docker images. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.DockerImage|DockerImage}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.get_docker_image.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_async - */ - getDockerImage( - request?: protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IDockerImage, - protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|undefined, {}|undefined - ]>; - getDockerImage( - request: protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IDockerImage, - protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|null|undefined, - {}|null|undefined>): void; - getDockerImage( - request: protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IDockerImage, - protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|null|undefined, - {}|null|undefined>): void; - getDockerImage( - request?: protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IDockerImage, - protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IDockerImage, - protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IDockerImage, - protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getDockerImage request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IDockerImage, - protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getDockerImage response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getDockerImage(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IDockerImage, - protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest|undefined, - {}|undefined - ]) => { - this._log.info('getDockerImage response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets a maven artifact. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the maven artifact. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.MavenArtifact|MavenArtifact}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.get_maven_artifact.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_async - */ - getMavenArtifact( - request?: protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IMavenArtifact, - protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|undefined, {}|undefined - ]>; - getMavenArtifact( - request: protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IMavenArtifact, - protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|null|undefined, - {}|null|undefined>): void; - getMavenArtifact( - request: protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IMavenArtifact, - protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|null|undefined, - {}|null|undefined>): void; - getMavenArtifact( - request?: protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IMavenArtifact, - protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IMavenArtifact, - protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IMavenArtifact, - protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getMavenArtifact request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IMavenArtifact, - protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getMavenArtifact response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getMavenArtifact(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IMavenArtifact, - protos.google.devtools.artifactregistry.v1.IGetMavenArtifactRequest|undefined, - {}|undefined - ]) => { - this._log.info('getMavenArtifact response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets a npm package. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the npm package. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.NpmPackage|NpmPackage}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.get_npm_package.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_async - */ - getNpmPackage( - request?: protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.INpmPackage, - protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|undefined, {}|undefined - ]>; - getNpmPackage( - request: protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.INpmPackage, - protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|null|undefined, - {}|null|undefined>): void; - getNpmPackage( - request: protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.INpmPackage, - protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|null|undefined, - {}|null|undefined>): void; - getNpmPackage( - request?: protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.INpmPackage, - protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.INpmPackage, - protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.INpmPackage, - protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getNpmPackage request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.INpmPackage, - protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getNpmPackage response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getNpmPackage(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.INpmPackage, - protos.google.devtools.artifactregistry.v1.IGetNpmPackageRequest|undefined, - {}|undefined - ]) => { - this._log.info('getNpmPackage response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets a python package. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the python package. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.PythonPackage|PythonPackage}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.get_python_package.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_async - */ - getPythonPackage( - request?: protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IPythonPackage, - protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|undefined, {}|undefined - ]>; - getPythonPackage( - request: protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IPythonPackage, - protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|null|undefined, - {}|null|undefined>): void; - getPythonPackage( - request: protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IPythonPackage, - protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|null|undefined, - {}|null|undefined>): void; - getPythonPackage( - request?: protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IPythonPackage, - protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IPythonPackage, - protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IPythonPackage, - protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getPythonPackage request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IPythonPackage, - protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getPythonPackage response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getPythonPackage(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IPythonPackage, - protos.google.devtools.artifactregistry.v1.IGetPythonPackageRequest|undefined, - {}|undefined - ]) => { - this._log.info('getPythonPackage response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets a repository. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * 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. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Repository|Repository}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.get_repository.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetRepository_async - */ - getRepository( - request?: protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|undefined, {}|undefined - ]>; - getRepository( - request: protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|null|undefined, - {}|null|undefined>): void; - getRepository( - request: protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|null|undefined, - {}|null|undefined>): void; - getRepository( - request?: protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getRepository request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getRepository response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getRepository(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IGetRepositoryRequest|undefined, - {}|undefined - ]) => { - this._log.info('getRepository response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Updates a repository. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.devtools.artifactregistry.v1.Repository} request.repository - * The repository that replaces the resource on the server. - * @param {google.protobuf.FieldMask} request.updateMask - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Repository|Repository}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.update_repository.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async - */ - updateRepository( - request?: protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|undefined, {}|undefined - ]>; - updateRepository( - request: protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|null|undefined, - {}|null|undefined>): void; - updateRepository( - request: protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|null|undefined, - {}|null|undefined>): void; - updateRepository( - request?: protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'repository.name': request.repository!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('updateRepository request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('updateRepository response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.updateRepository(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IRepository, - protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest|undefined, - {}|undefined - ]) => { - this._log.info('updateRepository response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets a package. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the package to retrieve. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Package|Package}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.get_package.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetPackage_async - */ - getPackage( - request?: protos.google.devtools.artifactregistry.v1.IGetPackageRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IGetPackageRequest|undefined, {}|undefined - ]>; - getPackage( - request: protos.google.devtools.artifactregistry.v1.IGetPackageRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IGetPackageRequest|null|undefined, - {}|null|undefined>): void; - getPackage( - request: protos.google.devtools.artifactregistry.v1.IGetPackageRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IGetPackageRequest|null|undefined, - {}|null|undefined>): void; - getPackage( - request?: protos.google.devtools.artifactregistry.v1.IGetPackageRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IGetPackageRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IGetPackageRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IGetPackageRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getPackage request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IGetPackageRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getPackage response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getPackage(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IGetPackageRequest|undefined, - {}|undefined - ]) => { - this._log.info('getPackage response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets a version - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the version to retrieve. - * @param {google.devtools.artifactregistry.v1.VersionView} request.view - * The view that should be returned in the response. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Version|Version}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.get_version.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async - */ - getVersion( - request?: protos.google.devtools.artifactregistry.v1.IGetVersionRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IGetVersionRequest|undefined, {}|undefined - ]>; - getVersion( - request: protos.google.devtools.artifactregistry.v1.IGetVersionRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IGetVersionRequest|null|undefined, - {}|null|undefined>): void; - getVersion( - request: protos.google.devtools.artifactregistry.v1.IGetVersionRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IGetVersionRequest|null|undefined, - {}|null|undefined>): void; - getVersion( - request?: protos.google.devtools.artifactregistry.v1.IGetVersionRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IGetVersionRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IGetVersionRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IGetVersionRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getVersion request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IGetVersionRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getVersion response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getVersion(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IGetVersionRequest|undefined, - {}|undefined - ]) => { - this._log.info('getVersion response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Updates a version. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.devtools.artifactregistry.v1.Version} request.version - * Required. The Version that replaces the resource on the server. - * @param {google.protobuf.FieldMask} request.updateMask - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Version|Version}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.update_version.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_async - */ - updateVersion( - request?: protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|undefined, {}|undefined - ]>; - updateVersion( - request: protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|null|undefined, - {}|null|undefined>): void; - updateVersion( - request: protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|null|undefined, - {}|null|undefined>): void; - updateVersion( - request?: protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'version.name': request.version!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('updateVersion request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('updateVersion response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.updateVersion(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IVersion, - protos.google.devtools.artifactregistry.v1.IUpdateVersionRequest|undefined, - {}|undefined - ]) => { - this._log.info('updateVersion response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets a file. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the file to retrieve. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.File|File}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.get_file.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetFile_async - */ - getFile( - request?: protos.google.devtools.artifactregistry.v1.IGetFileRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IGetFileRequest|undefined, {}|undefined - ]>; - getFile( - request: protos.google.devtools.artifactregistry.v1.IGetFileRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IGetFileRequest|null|undefined, - {}|null|undefined>): void; - getFile( - request: protos.google.devtools.artifactregistry.v1.IGetFileRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IGetFileRequest|null|undefined, - {}|null|undefined>): void; - getFile( - request?: protos.google.devtools.artifactregistry.v1.IGetFileRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IGetFileRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IGetFileRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IGetFileRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getFile request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IGetFileRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getFile response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getFile(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IGetFileRequest|undefined, - {}|undefined - ]) => { - this._log.info('getFile response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Updates a file. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.devtools.artifactregistry.v1.File} request.file - * Required. The File that replaces the resource on the server. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.File|File}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.update_file.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_async - */ - updateFile( - request?: protos.google.devtools.artifactregistry.v1.IUpdateFileRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|undefined, {}|undefined - ]>; - updateFile( - request: protos.google.devtools.artifactregistry.v1.IUpdateFileRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|null|undefined, - {}|null|undefined>): void; - updateFile( - request: protos.google.devtools.artifactregistry.v1.IUpdateFileRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|null|undefined, - {}|null|undefined>): void; - updateFile( - request?: protos.google.devtools.artifactregistry.v1.IUpdateFileRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'file.name': request.file!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('updateFile request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('updateFile response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.updateFile(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IFile, - protos.google.devtools.artifactregistry.v1.IUpdateFileRequest|undefined, - {}|undefined - ]) => { - this._log.info('updateFile response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets a tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the tag to retrieve. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Tag|Tag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.get_tag.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetTag_async - */ - getTag( - request?: protos.google.devtools.artifactregistry.v1.IGetTagRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IGetTagRequest|undefined, {}|undefined - ]>; - getTag( - request: protos.google.devtools.artifactregistry.v1.IGetTagRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IGetTagRequest|null|undefined, - {}|null|undefined>): void; - getTag( - request: protos.google.devtools.artifactregistry.v1.IGetTagRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IGetTagRequest|null|undefined, - {}|null|undefined>): void; - getTag( - request?: protos.google.devtools.artifactregistry.v1.IGetTagRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IGetTagRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IGetTagRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IGetTagRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getTag request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IGetTagRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getTag response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getTag(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IGetTagRequest|undefined, - {}|undefined - ]) => { - this._log.info('getTag response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Creates a tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent resource where the tag will be created. - * @param {string} request.tagId - * The tag id to use for this repository. - * @param {google.devtools.artifactregistry.v1.Tag} request.tag - * The tag to be created. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Tag|Tag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.create_tag.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async - */ - createTag( - request?: protos.google.devtools.artifactregistry.v1.ICreateTagRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.ICreateTagRequest|undefined, {}|undefined - ]>; - createTag( - request: protos.google.devtools.artifactregistry.v1.ICreateTagRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.ICreateTagRequest|null|undefined, - {}|null|undefined>): void; - createTag( - request: protos.google.devtools.artifactregistry.v1.ICreateTagRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.ICreateTagRequest|null|undefined, - {}|null|undefined>): void; - createTag( - request?: protos.google.devtools.artifactregistry.v1.ICreateTagRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.ICreateTagRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.ICreateTagRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.ICreateTagRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('createTag request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.ICreateTagRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('createTag response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.createTag(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.ICreateTagRequest|undefined, - {}|undefined - ]) => { - this._log.info('createTag response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Updates a tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.devtools.artifactregistry.v1.Tag} request.tag - * The tag that replaces the resource on the server. - * @param {google.protobuf.FieldMask} request.updateMask - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Tag|Tag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.update_tag.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async - */ - updateTag( - request?: protos.google.devtools.artifactregistry.v1.IUpdateTagRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|undefined, {}|undefined - ]>; - updateTag( - request: protos.google.devtools.artifactregistry.v1.IUpdateTagRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|null|undefined, - {}|null|undefined>): void; - updateTag( - request: protos.google.devtools.artifactregistry.v1.IUpdateTagRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|null|undefined, - {}|null|undefined>): void; - updateTag( - request?: protos.google.devtools.artifactregistry.v1.IUpdateTagRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'tag.name': request.tag!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('updateTag request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('updateTag response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.updateTag(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.ITag, - protos.google.devtools.artifactregistry.v1.IUpdateTagRequest|undefined, - {}|undefined - ]) => { - this._log.info('updateTag response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Deletes a tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the tag to delete. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.delete_tag.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async - */ - deleteTag( - request?: protos.google.devtools.artifactregistry.v1.IDeleteTagRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|undefined, {}|undefined - ]>; - deleteTag( - request: protos.google.devtools.artifactregistry.v1.IDeleteTagRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|null|undefined, - {}|null|undefined>): void; - deleteTag( - request: protos.google.devtools.artifactregistry.v1.IDeleteTagRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|null|undefined, - {}|null|undefined>): void; - deleteTag( - request?: protos.google.devtools.artifactregistry.v1.IDeleteTagRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('deleteTag request %j', request); - const wrappedCallback: Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('deleteTag response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.deleteTag(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteTagRequest|undefined, - {}|undefined - ]) => { - this._log.info('deleteTag response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Creates a rule. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource where the rule will be created. - * @param {string} request.ruleId - * The rule id to use for this repository. - * @param {google.devtools.artifactregistry.v1.Rule} request.rule - * The rule to be created. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Rule|Rule}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.create_rule.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateRule_async - */ - createRule( - request?: protos.google.devtools.artifactregistry.v1.ICreateRuleRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|undefined, {}|undefined - ]>; - createRule( - request: protos.google.devtools.artifactregistry.v1.ICreateRuleRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|null|undefined, - {}|null|undefined>): void; - createRule( - request: protos.google.devtools.artifactregistry.v1.ICreateRuleRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|null|undefined, - {}|null|undefined>): void; - createRule( - request?: protos.google.devtools.artifactregistry.v1.ICreateRuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('createRule request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('createRule response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.createRule(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.ICreateRuleRequest|undefined, - {}|undefined - ]) => { - this._log.info('createRule response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets a rule. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the rule to retrieve. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Rule|Rule}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.get_rule.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetRule_async - */ - getRule( - request?: protos.google.devtools.artifactregistry.v1.IGetRuleRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IGetRuleRequest|undefined, {}|undefined - ]>; - getRule( - request: protos.google.devtools.artifactregistry.v1.IGetRuleRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IGetRuleRequest|null|undefined, - {}|null|undefined>): void; - getRule( - request: protos.google.devtools.artifactregistry.v1.IGetRuleRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IGetRuleRequest|null|undefined, - {}|null|undefined>): void; - getRule( - request?: protos.google.devtools.artifactregistry.v1.IGetRuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IGetRuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IGetRuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IGetRuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getRule request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IGetRuleRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getRule response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getRule(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IGetRuleRequest|undefined, - {}|undefined - ]) => { - this._log.info('getRule response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Updates a rule. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.devtools.artifactregistry.v1.Rule} request.rule - * The rule that replaces the resource on the server. - * @param {google.protobuf.FieldMask} request.updateMask - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Rule|Rule}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.update_rule.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_async - */ - updateRule( - request?: protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|undefined, {}|undefined - ]>; - updateRule( - request: protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|null|undefined, - {}|null|undefined>): void; - updateRule( - request: protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|null|undefined, - {}|null|undefined>): void; - updateRule( - request?: protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'rule.name': request.rule!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('updateRule request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('updateRule response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.updateRule(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IRule, - protos.google.devtools.artifactregistry.v1.IUpdateRuleRequest|undefined, - {}|undefined - ]) => { - this._log.info('updateRule response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Deletes a rule. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the rule to delete. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.delete_rule.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_async - */ - deleteRule( - request?: protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|undefined, {}|undefined - ]>; - deleteRule( - request: protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|null|undefined, - {}|null|undefined>): void; - deleteRule( - request: protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|null|undefined, - {}|null|undefined>): void; - deleteRule( - request?: protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('deleteRule request %j', request); - const wrappedCallback: Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('deleteRule response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.deleteRule(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1.IDeleteRuleRequest|undefined, - {}|undefined - ]) => { - this._log.info('deleteRule response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Updates the IAM policy for a given resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.Policy} request.policy - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param {google.protobuf.FieldMask} request.updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.set_iam_policy.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async - */ - setIamPolicy( - request?: protos.google.iam.v1.ISetIamPolicyRequest, - options?: CallOptions): - Promise<[ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined - ]>; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, - {}|null|undefined>): void; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, - {}|null|undefined>): void; - setIamPolicy( - request?: protos.google.iam.v1.ISetIamPolicyRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'resource': request.resource ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('setIamPolicy request %j', request); - const wrappedCallback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('setIamPolicy response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.setIamPolicy(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|undefined, - {}|undefined - ]) => { - this._log.info('setIamPolicy response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets the IAM policy for a given resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.GetPolicyOptions} request.options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.get_iam_policy.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async - */ - getIamPolicy( - request?: protos.google.iam.v1.IGetIamPolicyRequest, - options?: CallOptions): - Promise<[ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined - ]>; - getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, - {}|null|undefined>): void; - getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, - {}|null|undefined>): void; - getIamPolicy( - request?: protos.google.iam.v1.IGetIamPolicyRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'resource': request.resource ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getIamPolicy request %j', request); - const wrappedCallback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getIamPolicy response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getIamPolicy(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|undefined, - {}|undefined - ]) => { - this._log.info('getIamPolicy response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Tests if the caller has a list of permissions on a resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.test_iam_permissions.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async - */ - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: CallOptions): - Promise<[ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined - ]>; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): void; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): void; - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'resource': request.resource ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('testIamPermissions request %j', request); - const wrappedCallback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('testIamPermissions response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.testIamPermissions(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|undefined, - {}|undefined - ]) => { - this._log.info('testIamPermissions response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * 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 {@link protos.google.devtools.artifactregistry.v1.ProjectSettings|ProjectSettings}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.get_project_settings.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_async - */ - getProjectSettings( - request?: protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|undefined, {}|undefined - ]>; - getProjectSettings( - request: protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|null|undefined, - {}|null|undefined>): void; - getProjectSettings( - request: protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|null|undefined, - {}|null|undefined>): void; - getProjectSettings( - request?: protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getProjectSettings request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getProjectSettings response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getProjectSettings(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest|undefined, - {}|undefined - ]) => { - this._log.info('getProjectSettings response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Updates the Settings for the Project. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.devtools.artifactregistry.v1.ProjectSettings} request.projectSettings - * The project settings. - * @param {google.protobuf.FieldMask} request.updateMask - * Field mask to support partial updates. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.ProjectSettings|ProjectSettings}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.update_project_settings.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async - */ - updateProjectSettings( - request?: protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|undefined, {}|undefined - ]>; - updateProjectSettings( - request: protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|null|undefined, - {}|null|undefined>): void; - updateProjectSettings( - request: protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|null|undefined, - {}|null|undefined>): void; - updateProjectSettings( - request?: protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'project_settings.name': request.projectSettings!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('updateProjectSettings request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('updateProjectSettings response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.updateProjectSettings(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IProjectSettings, - protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest|undefined, - {}|undefined - ]) => { - this._log.info('updateProjectSettings response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Retrieves the VPCSC Config for the Project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the VPCSCConfig 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 {@link protos.google.devtools.artifactregistry.v1.VPCSCConfig|VPCSCConfig}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.get_v_p_c_s_c_config.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_async - */ - getVPCSCConfig( - request?: protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|undefined, {}|undefined - ]>; - getVPCSCConfig( - request: protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|null|undefined, - {}|null|undefined>): void; - getVPCSCConfig( - request: protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|null|undefined, - {}|null|undefined>): void; - getVPCSCConfig( - request?: protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getVPCSCConfig request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getVPCSCConfig response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getVpcscConfig(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IGetVPCSCConfigRequest|undefined, - {}|undefined - ]) => { - this._log.info('getVPCSCConfig response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Updates the VPCSC Config for the Project. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.devtools.artifactregistry.v1.VPCSCConfig} request.vpcscConfig - * The project config. - * @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 {@link protos.google.devtools.artifactregistry.v1.VPCSCConfig|VPCSCConfig}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.update_v_p_c_s_c_config.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_async - */ - updateVPCSCConfig( - request?: protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|undefined, {}|undefined - ]>; - updateVPCSCConfig( - request: protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|null|undefined, - {}|null|undefined>): void; - updateVPCSCConfig( - request: protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|null|undefined, - {}|null|undefined>): void; - updateVPCSCConfig( - request?: protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'vpcsc_config.name': request.vpcscConfig!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('updateVPCSCConfig request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('updateVPCSCConfig response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.updateVpcscConfig(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IVPCSCConfig, - protos.google.devtools.artifactregistry.v1.IUpdateVPCSCConfigRequest|undefined, - {}|undefined - ]) => { - this._log.info('updateVPCSCConfig response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Updates a package. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.devtools.artifactregistry.v1.Package} request.package - * The package that replaces the resource on the server. - * @param {google.protobuf.FieldMask} request.updateMask - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Package|Package}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.update_package.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_async - */ - updatePackage( - request?: protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|undefined, {}|undefined - ]>; - updatePackage( - request: protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|null|undefined, - {}|null|undefined>): void; - updatePackage( - request: protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|null|undefined, - {}|null|undefined>): void; - updatePackage( - request?: protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'package.name': request.package!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('updatePackage request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('updatePackage response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.updatePackage(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IPackage, - protos.google.devtools.artifactregistry.v1.IUpdatePackageRequest|undefined, - {}|undefined - ]) => { - this._log.info('updatePackage response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets an attachment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the attachment to retrieve. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1.Attachment|Attachment}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.get_attachment.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_async - */ - getAttachment( - request?: protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IAttachment, - protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|undefined, {}|undefined - ]>; - getAttachment( - request: protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IAttachment, - protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|null|undefined, - {}|null|undefined>): void; - getAttachment( - request: protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1.IAttachment, - protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|null|undefined, - {}|null|undefined>): void; - getAttachment( - request?: protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1.IAttachment, - protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1.IAttachment, - protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IAttachment, - protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getAttachment request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1.IAttachment, - protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getAttachment response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getAttachment(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1.IAttachment, - protos.google.devtools.artifactregistry.v1.IGetAttachmentRequest|undefined, - {}|undefined - ]) => { - this._log.info('getAttachment response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } - -/** - * Imports Apt artifacts. The returned Operation will complete once the - * resources are imported. Package, Version, and File resources are created - * based on the imported artifacts. Imported artifacts that conflict with - * existing resources are ignored. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} request.gcsSource - * Google Cloud Storage location where input content is located. - * @param {string} request.parent - * The name of the parent resource where the artifacts will be imported. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.import_apt_artifacts.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async - */ - importAptArtifacts( - request?: protos.google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - importAptArtifacts( - request: protos.google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - importAptArtifacts( - request: protos.google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - importAptArtifacts( - request?: protos.google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('importAptArtifacts response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('importAptArtifacts request %j', request); - return this.innerApiCalls.importAptArtifacts(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('importAptArtifacts response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.import_apt_artifacts.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async - */ - async checkImportAptArtifactsProgress(name: string): Promise>{ - this._log.info('importAptArtifacts long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importAptArtifacts, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Imports Yum (RPM) artifacts. The returned Operation will complete once the - * resources are imported. Package, Version, and File resources are created - * based on the imported artifacts. Imported artifacts that conflict with - * existing resources are ignored. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} request.gcsSource - * Google Cloud Storage location where input content is located. - * @param {string} request.parent - * The name of the parent resource where the artifacts will be imported. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.import_yum_artifacts.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async - */ - importYumArtifacts( - request?: protos.google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - importYumArtifacts( - request: protos.google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - importYumArtifacts( - request: protos.google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - importYumArtifacts( - request?: protos.google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('importYumArtifacts response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('importYumArtifacts request %j', request); - return this.innerApiCalls.importYumArtifacts(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('importYumArtifacts response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.import_yum_artifacts.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async - */ - async checkImportYumArtifactsProgress(name: string): Promise>{ - this._log.info('importYumArtifacts long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importYumArtifacts, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a repository. The returned Operation will finish once the - * repository has been created. Its response will be the created Repository. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource where the repository will be - * created. - * @param {string} request.repositoryId - * Required. The repository id to use for this repository. - * @param {google.devtools.artifactregistry.v1.Repository} request.repository - * Required. The repository to be created. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.create_repository.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async - */ - createRepository( - request?: protos.google.devtools.artifactregistry.v1.ICreateRepositoryRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createRepository( - request: protos.google.devtools.artifactregistry.v1.ICreateRepositoryRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createRepository( - request: protos.google.devtools.artifactregistry.v1.ICreateRepositoryRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createRepository( - request?: protos.google.devtools.artifactregistry.v1.ICreateRepositoryRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createRepository response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createRepository request %j', request); - return this.innerApiCalls.createRepository(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createRepository response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createRepository()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.create_repository.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async - */ - async checkCreateRepositoryProgress(name: string): Promise>{ - this._log.info('createRepository long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createRepository, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a repository and all of its contents. The returned Operation will - * finish once the repository has been deleted. It will not have any Operation - * metadata and will return a google.protobuf.Empty response. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the repository to delete. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.delete_repository.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async - */ - deleteRepository( - request?: protos.google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteRepository( - request: protos.google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteRepository( - request: protos.google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteRepository( - request?: protos.google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteRepository response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteRepository request %j', request); - return this.innerApiCalls.deleteRepository(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteRepository response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteRepository()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.delete_repository.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async - */ - async checkDeleteRepositoryProgress(name: string): Promise>{ - this._log.info('deleteRepository long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteRepository, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a package and all of its versions and tags. The returned operation - * will complete once the package has been deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the package to delete. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.delete_package.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async - */ - deletePackage( - request?: protos.google.devtools.artifactregistry.v1.IDeletePackageRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deletePackage( - request: protos.google.devtools.artifactregistry.v1.IDeletePackageRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deletePackage( - request: protos.google.devtools.artifactregistry.v1.IDeletePackageRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deletePackage( - request?: protos.google.devtools.artifactregistry.v1.IDeletePackageRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deletePackage response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deletePackage request %j', request); - return this.innerApiCalls.deletePackage(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deletePackage response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deletePackage()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.delete_package.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async - */ - async checkDeletePackageProgress(name: string): Promise>{ - this._log.info('deletePackage long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deletePackage, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a version and all of its content. The returned operation will - * complete once the version has been deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the version to delete. - * @param {boolean} request.force - * By default, a version that is tagged may not be deleted. If force=true, the - * version and any tags pointing to the version are deleted. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.delete_version.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async - */ - deleteVersion( - request?: protos.google.devtools.artifactregistry.v1.IDeleteVersionRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteVersion( - request: protos.google.devtools.artifactregistry.v1.IDeleteVersionRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteVersion( - request: protos.google.devtools.artifactregistry.v1.IDeleteVersionRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteVersion( - request?: protos.google.devtools.artifactregistry.v1.IDeleteVersionRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteVersion response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteVersion request %j', request); - return this.innerApiCalls.deleteVersion(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteVersion response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteVersion()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.delete_version.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async - */ - async checkDeleteVersionProgress(name: string): Promise>{ - this._log.info('deleteVersion long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteVersion, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes multiple versions across a repository. The returned operation will - * complete once the versions have been deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the repository holding all requested versions. - * @param {string[]} request.names - * Required. The names of the versions to delete. - * The maximum number of versions deleted per batch is determined by the - * service and is dependent on the available resources in the region. - * @param {boolean} request.validateOnly - * If true, the request is performed without deleting data, following AIP-163. - * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.batch_delete_versions.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_async - */ - batchDeleteVersions( - request?: protos.google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - batchDeleteVersions( - request: protos.google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - batchDeleteVersions( - request: protos.google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - batchDeleteVersions( - request?: protos.google.devtools.artifactregistry.v1.IBatchDeleteVersionsRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('batchDeleteVersions response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('batchDeleteVersions request %j', request); - return this.innerApiCalls.batchDeleteVersions(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('batchDeleteVersions response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `batchDeleteVersions()`. - * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.batch_delete_versions.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_async - */ - async checkBatchDeleteVersionsProgress(name: string): Promise>{ - this._log.info('batchDeleteVersions long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.batchDeleteVersions, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a file and all of its content. It is only allowed on generic - * repositories. The returned operation will complete once the file has been - * deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the file to delete. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.delete_file.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_async - */ - deleteFile( - request?: protos.google.devtools.artifactregistry.v1.IDeleteFileRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteFile( - request: protos.google.devtools.artifactregistry.v1.IDeleteFileRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteFile( - request: protos.google.devtools.artifactregistry.v1.IDeleteFileRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteFile( - request?: protos.google.devtools.artifactregistry.v1.IDeleteFileRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteFile response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteFile request %j', request); - return this.innerApiCalls.deleteFile(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteFile response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteFile()`. - * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.delete_file.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_async - */ - async checkDeleteFileProgress(name: string): Promise>{ - this._log.info('deleteFile long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteFile, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates an attachment. The returned Operation will finish once the - * attachment has been created. Its response will be the created attachment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource where the attachment will be - * created. - * @param {string} request.attachmentId - * Required. The attachment id to use for this attachment. - * @param {google.devtools.artifactregistry.v1.Attachment} request.attachment - * Required. The attachment to be created. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.create_attachment.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_async - */ - createAttachment( - request?: protos.google.devtools.artifactregistry.v1.ICreateAttachmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createAttachment( - request: protos.google.devtools.artifactregistry.v1.ICreateAttachmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAttachment( - request: protos.google.devtools.artifactregistry.v1.ICreateAttachmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAttachment( - request?: protos.google.devtools.artifactregistry.v1.ICreateAttachmentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createAttachment response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createAttachment request %j', request); - return this.innerApiCalls.createAttachment(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createAttachment response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createAttachment()`. - * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.create_attachment.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_async - */ - async checkCreateAttachmentProgress(name: string): Promise>{ - this._log.info('createAttachment long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createAttachment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes an attachment. The returned Operation will - * finish once the attachments has been deleted. It will not have any - * Operation metadata and will return a `google.protobuf.Empty` response. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the attachment to delete. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.delete_attachment.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_async - */ - deleteAttachment( - request?: protos.google.devtools.artifactregistry.v1.IDeleteAttachmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteAttachment( - request: protos.google.devtools.artifactregistry.v1.IDeleteAttachmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAttachment( - request: protos.google.devtools.artifactregistry.v1.IDeleteAttachmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAttachment( - request?: protos.google.devtools.artifactregistry.v1.IDeleteAttachmentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteAttachment response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteAttachment request %j', request); - return this.innerApiCalls.deleteAttachment(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteAttachment response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteAttachment()`. - * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.delete_attachment.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_async - */ - async checkDeleteAttachmentProgress(name: string): Promise>{ - this._log.info('deleteAttachment long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteAttachment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Exports an artifact to a Cloud Storage bucket. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.sourceVersion - * The artifact version to export. - * Format: - * projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version} - * @param {string} request.sourceTag - * The artifact tag to export. - * Format:projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag} - * @param {string} request.gcsPath - * The Cloud Storage path to export the artifact to. Should start with the - * bucket name, and optionally have a directory path. Examples: - * `dst_bucket`, `dst_bucket/sub_dir`. - * Existing objects with the same path will be overwritten. - * @param {string} request.repository - * Required. The repository of the artifact to export. - * Format: projects/{project}/locations/{location}/repositories/{repository} - * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.export_artifact.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_async - */ - exportArtifact( - request?: protos.google.devtools.artifactregistry.v1.IExportArtifactRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - exportArtifact( - request: protos.google.devtools.artifactregistry.v1.IExportArtifactRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - exportArtifact( - request: protos.google.devtools.artifactregistry.v1.IExportArtifactRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - exportArtifact( - request?: protos.google.devtools.artifactregistry.v1.IExportArtifactRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'repository': request.repository ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('exportArtifact response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('exportArtifact request %j', request); - return this.innerApiCalls.exportArtifact(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('exportArtifact response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `exportArtifact()`. - * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.export_artifact.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_async - */ - async checkExportArtifactProgress(name: string): Promise>{ - this._log.info('exportArtifact long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.exportArtifact, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists docker images. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose docker images will be - * listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {string} request.orderBy - * The field to order the results by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.DockerImage|DockerImage}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listDockerImagesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listDockerImages( - request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IDockerImage[], - protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest|null, - protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse - ]>; - listDockerImages( - request: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IDockerImage>): void; - listDockerImages( - request: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IDockerImage>): void; - listDockerImages( - request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IDockerImage>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IDockerImage>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IDockerImage[], - protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest|null, - protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IDockerImage>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listDockerImages values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listDockerImages request %j', request); - return this.innerApiCalls - .listDockerImages(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1.IDockerImage[], - protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest|null, - protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse - ]) => { - this._log.info('listDockerImages values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listDockerImages`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose docker images will be - * listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {string} request.orderBy - * The field to order the results by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.DockerImage|DockerImage} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listDockerImagesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listDockerImagesStream( - request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listDockerImages']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listDockerImages stream %j', request); - return this.descriptors.page.listDockerImages.createStream( - this.innerApiCalls.listDockerImages as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listDockerImages`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose docker images will be - * listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {string} request.orderBy - * The field to order the results by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1.DockerImage|DockerImage}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.list_docker_images.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_async - */ - listDockerImagesAsync( - request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listDockerImages']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listDockerImages iterate %j', request); - return this.descriptors.page.listDockerImages.asyncIterate( - this.innerApiCalls['listDockerImages'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists maven artifacts. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose maven artifacts will be - * listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.MavenArtifact|MavenArtifact}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listMavenArtifactsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listMavenArtifacts( - request?: protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IMavenArtifact[], - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest|null, - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse - ]>; - listMavenArtifacts( - request: protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IMavenArtifact>): void; - listMavenArtifacts( - request: protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IMavenArtifact>): void; - listMavenArtifacts( - request?: protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IMavenArtifact>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IMavenArtifact>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IMavenArtifact[], - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest|null, - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IMavenArtifact>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listMavenArtifacts values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listMavenArtifacts request %j', request); - return this.innerApiCalls - .listMavenArtifacts(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1.IMavenArtifact[], - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest|null, - protos.google.devtools.artifactregistry.v1.IListMavenArtifactsResponse - ]) => { - this._log.info('listMavenArtifacts values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listMavenArtifacts`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose maven artifacts will be - * listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.MavenArtifact|MavenArtifact} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listMavenArtifactsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listMavenArtifactsStream( - request?: protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listMavenArtifacts']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listMavenArtifacts stream %j', request); - return this.descriptors.page.listMavenArtifacts.createStream( - this.innerApiCalls.listMavenArtifacts as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listMavenArtifacts`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose maven artifacts will be - * listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1.MavenArtifact|MavenArtifact}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.list_maven_artifacts.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_async - */ - listMavenArtifactsAsync( - request?: protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listMavenArtifacts']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listMavenArtifacts iterate %j', request); - return this.descriptors.page.listMavenArtifacts.asyncIterate( - this.innerApiCalls['listMavenArtifacts'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists npm packages. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose npm packages will be - * listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.NpmPackage|NpmPackage}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listNpmPackagesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listNpmPackages( - request?: protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.INpmPackage[], - protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest|null, - protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse - ]>; - listNpmPackages( - request: protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.INpmPackage>): void; - listNpmPackages( - request: protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.INpmPackage>): void; - listNpmPackages( - request?: protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.INpmPackage>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.INpmPackage>): - Promise<[ - protos.google.devtools.artifactregistry.v1.INpmPackage[], - protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest|null, - protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.INpmPackage>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listNpmPackages values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listNpmPackages request %j', request); - return this.innerApiCalls - .listNpmPackages(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1.INpmPackage[], - protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest|null, - protos.google.devtools.artifactregistry.v1.IListNpmPackagesResponse - ]) => { - this._log.info('listNpmPackages values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listNpmPackages`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose npm packages will be - * listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.NpmPackage|NpmPackage} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listNpmPackagesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listNpmPackagesStream( - request?: protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listNpmPackages']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listNpmPackages stream %j', request); - return this.descriptors.page.listNpmPackages.createStream( - this.innerApiCalls.listNpmPackages as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listNpmPackages`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose npm packages will be - * listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1.NpmPackage|NpmPackage}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.list_npm_packages.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_async - */ - listNpmPackagesAsync( - request?: protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listNpmPackages']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listNpmPackages iterate %j', request); - return this.descriptors.page.listNpmPackages.asyncIterate( - this.innerApiCalls['listNpmPackages'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists python packages. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose python packages will be - * listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.PythonPackage|PythonPackage}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listPythonPackagesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listPythonPackages( - request?: protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IPythonPackage[], - protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest|null, - protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse - ]>; - listPythonPackages( - request: protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IPythonPackage>): void; - listPythonPackages( - request: protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IPythonPackage>): void; - listPythonPackages( - request?: protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IPythonPackage>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IPythonPackage>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IPythonPackage[], - protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest|null, - protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IPythonPackage>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listPythonPackages values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listPythonPackages request %j', request); - return this.innerApiCalls - .listPythonPackages(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1.IPythonPackage[], - protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest|null, - protos.google.devtools.artifactregistry.v1.IListPythonPackagesResponse - ]) => { - this._log.info('listPythonPackages values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listPythonPackages`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose python packages will be - * listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.PythonPackage|PythonPackage} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listPythonPackagesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listPythonPackagesStream( - request?: protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listPythonPackages']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listPythonPackages stream %j', request); - return this.descriptors.page.listPythonPackages.createStream( - this.innerApiCalls.listPythonPackages as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listPythonPackages`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose python packages will be - * listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1.PythonPackage|PythonPackage}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.list_python_packages.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_async - */ - listPythonPackagesAsync( - request?: protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listPythonPackages']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listPythonPackages iterate %j', request); - return this.descriptors.page.listPythonPackages.asyncIterate( - this.innerApiCalls['listPythonPackages'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists repositories. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose repositories will be - * listed. - * @param {number} request.pageSize - * The maximum number of repositories to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * - * * `name` - * - * Examples of using a filter: - * - * To filter the results of your request to repositories with the name - * `my-repo` in project `my-project` in the `us-central` region, append the - * following filter expression to your request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-*"` - * * `name="projects/my-project/locations/us-central1/repositories/*repo"` - * * `name="projects/my-project/locations/us-central1/repositories/*repo*"` - * @param {string} [request.orderBy] - * Optional. The field to order the results by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.Repository|Repository}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listRepositoriesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listRepositories( - request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IRepository[], - protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest|null, - protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse - ]>; - listRepositories( - request: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IRepository>): void; - listRepositories( - request: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IRepository>): void; - listRepositories( - request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IRepository>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IRepository>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IRepository[], - protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest|null, - protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IRepository>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listRepositories values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listRepositories request %j', request); - return this.innerApiCalls - .listRepositories(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1.IRepository[], - protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest|null, - protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse - ]) => { - this._log.info('listRepositories values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listRepositories`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose repositories will be - * listed. - * @param {number} request.pageSize - * The maximum number of repositories to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * - * * `name` - * - * Examples of using a filter: - * - * To filter the results of your request to repositories with the name - * `my-repo` in project `my-project` in the `us-central` region, append the - * following filter expression to your request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-*"` - * * `name="projects/my-project/locations/us-central1/repositories/*repo"` - * * `name="projects/my-project/locations/us-central1/repositories/*repo*"` - * @param {string} [request.orderBy] - * Optional. The field to order the results by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.Repository|Repository} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listRepositoriesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listRepositoriesStream( - request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listRepositories']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listRepositories stream %j', request); - return this.descriptors.page.listRepositories.createStream( - this.innerApiCalls.listRepositories as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listRepositories`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose repositories will be - * listed. - * @param {number} request.pageSize - * The maximum number of repositories to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * - * * `name` - * - * Examples of using a filter: - * - * To filter the results of your request to repositories with the name - * `my-repo` in project `my-project` in the `us-central` region, append the - * following filter expression to your request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-*"` - * * `name="projects/my-project/locations/us-central1/repositories/*repo"` - * * `name="projects/my-project/locations/us-central1/repositories/*repo*"` - * @param {string} [request.orderBy] - * Optional. The field to order the results by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1.Repository|Repository}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.list_repositories.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async - */ - listRepositoriesAsync( - request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listRepositories']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listRepositories iterate %j', request); - return this.descriptors.page.listRepositories.asyncIterate( - this.innerApiCalls['listRepositories'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists packages. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose packages will be listed. - * @param {number} request.pageSize - * The maximum number of packages to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `annotations` - * - * Examples of using a filter: - * - * To filter the results of your request to packages with the name - * `my-package` in project `my-project` in the `us-central` region, in - * repository `my-repo`, append the following filter expression to your - * request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` - * - * To filter the results of your request to packages with the annotation - * key-value pair [`external_link`: `external_link_value`], append the - * following filter expression to your request": - * - * * `"annotations.external_link:external_link_value"` - * - * To filter the results just for a specific annotation key `external_link`, - * append the following filter expression to your request: - * - * * `"annotations.external_link"` - * - * If the annotation key or value contains special characters, you can escape - * them by surrounding the value with backticks. For example, to filter the - * results of your request to packages with the annotation key-value pair - * [`external.link`:`https://example.com/my-package`], append the following - * filter expression to your request: - * - * * `` "annotations.`external.link`:`https://example.com/my-package`" `` - * - * You can also filter with annotations with a wildcard to - * match any number of characters before or after the value: - * - * * `` "annotations.*_link:`*example.com*`" `` - * @param {string} [request.orderBy] - * Optional. The field to order the results by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.Package|Package}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listPackagesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listPackages( - request?: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IPackage[], - protos.google.devtools.artifactregistry.v1.IListPackagesRequest|null, - protos.google.devtools.artifactregistry.v1.IListPackagesResponse - ]>; - listPackages( - request: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IPackage>): void; - listPackages( - request: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IPackage>): void; - listPackages( - request?: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IPackage>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IPackage>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IPackage[], - protos.google.devtools.artifactregistry.v1.IListPackagesRequest|null, - protos.google.devtools.artifactregistry.v1.IListPackagesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListPackagesRequest, - protos.google.devtools.artifactregistry.v1.IListPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IPackage>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listPackages values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listPackages request %j', request); - return this.innerApiCalls - .listPackages(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1.IPackage[], - protos.google.devtools.artifactregistry.v1.IListPackagesRequest|null, - protos.google.devtools.artifactregistry.v1.IListPackagesResponse - ]) => { - this._log.info('listPackages values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listPackages`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose packages will be listed. - * @param {number} request.pageSize - * The maximum number of packages to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `annotations` - * - * Examples of using a filter: - * - * To filter the results of your request to packages with the name - * `my-package` in project `my-project` in the `us-central` region, in - * repository `my-repo`, append the following filter expression to your - * request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` - * - * To filter the results of your request to packages with the annotation - * key-value pair [`external_link`: `external_link_value`], append the - * following filter expression to your request": - * - * * `"annotations.external_link:external_link_value"` - * - * To filter the results just for a specific annotation key `external_link`, - * append the following filter expression to your request: - * - * * `"annotations.external_link"` - * - * If the annotation key or value contains special characters, you can escape - * them by surrounding the value with backticks. For example, to filter the - * results of your request to packages with the annotation key-value pair - * [`external.link`:`https://example.com/my-package`], append the following - * filter expression to your request: - * - * * `` "annotations.`external.link`:`https://example.com/my-package`" `` - * - * You can also filter with annotations with a wildcard to - * match any number of characters before or after the value: - * - * * `` "annotations.*_link:`*example.com*`" `` - * @param {string} [request.orderBy] - * Optional. The field to order the results by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.Package|Package} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listPackagesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listPackagesStream( - request?: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listPackages']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listPackages stream %j', request); - return this.descriptors.page.listPackages.createStream( - this.innerApiCalls.listPackages as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listPackages`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose packages will be listed. - * @param {number} request.pageSize - * The maximum number of packages to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `annotations` - * - * Examples of using a filter: - * - * To filter the results of your request to packages with the name - * `my-package` in project `my-project` in the `us-central` region, in - * repository `my-repo`, append the following filter expression to your - * request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` - * - * To filter the results of your request to packages with the annotation - * key-value pair [`external_link`: `external_link_value`], append the - * following filter expression to your request": - * - * * `"annotations.external_link:external_link_value"` - * - * To filter the results just for a specific annotation key `external_link`, - * append the following filter expression to your request: - * - * * `"annotations.external_link"` - * - * If the annotation key or value contains special characters, you can escape - * them by surrounding the value with backticks. For example, to filter the - * results of your request to packages with the annotation key-value pair - * [`external.link`:`https://example.com/my-package`], append the following - * filter expression to your request: - * - * * `` "annotations.`external.link`:`https://example.com/my-package`" `` - * - * You can also filter with annotations with a wildcard to - * match any number of characters before or after the value: - * - * * `` "annotations.*_link:`*example.com*`" `` - * @param {string} [request.orderBy] - * Optional. The field to order the results by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1.Package|Package}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.list_packages.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async - */ - listPackagesAsync( - request?: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listPackages']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listPackages iterate %j', request); - return this.descriptors.page.listPackages.asyncIterate( - this.innerApiCalls['listPackages'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists versions. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent resource whose versions will be listed. - * @param {number} request.pageSize - * The maximum number of versions to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {google.devtools.artifactregistry.v1.VersionView} request.view - * The view that should be returned in the response. - * @param {string} [request.orderBy] - * Optional. The field to order the results by. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `annotations` - * - * Examples of using a filter: - * - * To filter the results of your request to versions with the name - * `my-version` in project `my-project` in the `us-central` region, in - * repository `my-repo`, append the following filter expression to your - * request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` - * - * To filter the results of your request to versions with the annotation - * key-value pair [`external_link`: `external_link_value`], append the - * following filter expression to your request: - * - * * `"annotations.external_link:external_link_value"` - * - * To filter just for a specific annotation key `external_link`, append the - * following filter expression to your request: - * - * * `"annotations.external_link"` - * - * If the annotation key or value contains special characters, you can escape - * them by surrounding the value with backticks. For example, to filter the - * results of your request to versions with the annotation key-value pair - * [`external.link`:`https://example.com/my-version`], append the following - * filter expression to your request: - * - * * `` "annotations.`external.link`:`https://example.com/my-version`" `` - * - * You can also filter with annotations with a wildcard to - * match any number of characters before or after the value: - * - * * `` "annotations.*_link:`*example.com*`" `` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.Version|Version}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listVersionsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listVersions( - request?: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IVersion[], - protos.google.devtools.artifactregistry.v1.IListVersionsRequest|null, - protos.google.devtools.artifactregistry.v1.IListVersionsResponse - ]>; - listVersions( - request: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListVersionsRequest, - protos.google.devtools.artifactregistry.v1.IListVersionsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IVersion>): void; - listVersions( - request: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListVersionsRequest, - protos.google.devtools.artifactregistry.v1.IListVersionsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IVersion>): void; - listVersions( - request?: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListVersionsRequest, - protos.google.devtools.artifactregistry.v1.IListVersionsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IVersion>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListVersionsRequest, - protos.google.devtools.artifactregistry.v1.IListVersionsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IVersion>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IVersion[], - protos.google.devtools.artifactregistry.v1.IListVersionsRequest|null, - protos.google.devtools.artifactregistry.v1.IListVersionsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListVersionsRequest, - protos.google.devtools.artifactregistry.v1.IListVersionsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IVersion>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listVersions values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listVersions request %j', request); - return this.innerApiCalls - .listVersions(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1.IVersion[], - protos.google.devtools.artifactregistry.v1.IListVersionsRequest|null, - protos.google.devtools.artifactregistry.v1.IListVersionsResponse - ]) => { - this._log.info('listVersions values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listVersions`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent resource whose versions will be listed. - * @param {number} request.pageSize - * The maximum number of versions to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {google.devtools.artifactregistry.v1.VersionView} request.view - * The view that should be returned in the response. - * @param {string} [request.orderBy] - * Optional. The field to order the results by. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `annotations` - * - * Examples of using a filter: - * - * To filter the results of your request to versions with the name - * `my-version` in project `my-project` in the `us-central` region, in - * repository `my-repo`, append the following filter expression to your - * request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` - * - * To filter the results of your request to versions with the annotation - * key-value pair [`external_link`: `external_link_value`], append the - * following filter expression to your request: - * - * * `"annotations.external_link:external_link_value"` - * - * To filter just for a specific annotation key `external_link`, append the - * following filter expression to your request: - * - * * `"annotations.external_link"` - * - * If the annotation key or value contains special characters, you can escape - * them by surrounding the value with backticks. For example, to filter the - * results of your request to versions with the annotation key-value pair - * [`external.link`:`https://example.com/my-version`], append the following - * filter expression to your request: - * - * * `` "annotations.`external.link`:`https://example.com/my-version`" `` - * - * You can also filter with annotations with a wildcard to - * match any number of characters before or after the value: - * - * * `` "annotations.*_link:`*example.com*`" `` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.Version|Version} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listVersionsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listVersionsStream( - request?: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listVersions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listVersions stream %j', request); - return this.descriptors.page.listVersions.createStream( - this.innerApiCalls.listVersions as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listVersions`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent resource whose versions will be listed. - * @param {number} request.pageSize - * The maximum number of versions to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {google.devtools.artifactregistry.v1.VersionView} request.view - * The view that should be returned in the response. - * @param {string} [request.orderBy] - * Optional. The field to order the results by. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `annotations` - * - * Examples of using a filter: - * - * To filter the results of your request to versions with the name - * `my-version` in project `my-project` in the `us-central` region, in - * repository `my-repo`, append the following filter expression to your - * request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` - * - * To filter the results of your request to versions with the annotation - * key-value pair [`external_link`: `external_link_value`], append the - * following filter expression to your request: - * - * * `"annotations.external_link:external_link_value"` - * - * To filter just for a specific annotation key `external_link`, append the - * following filter expression to your request: - * - * * `"annotations.external_link"` - * - * If the annotation key or value contains special characters, you can escape - * them by surrounding the value with backticks. For example, to filter the - * results of your request to versions with the annotation key-value pair - * [`external.link`:`https://example.com/my-version`], append the following - * filter expression to your request: - * - * * `` "annotations.`external.link`:`https://example.com/my-version`" `` - * - * You can also filter with annotations with a wildcard to - * match any number of characters before or after the value: - * - * * `` "annotations.*_link:`*example.com*`" `` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1.Version|Version}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.list_versions.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async - */ - listVersionsAsync( - request?: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listVersions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listVersions iterate %j', request); - return this.descriptors.page.listVersions.asyncIterate( - this.innerApiCalls['listVersions'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists files. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the repository whose files will be listed. For - * example: "projects/p1/locations/us-central1/repositories/repo1 - * @param {string} request.filter - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `owner` - * * `annotations` - * - * Examples of using a filter: - * - * To filter the results of your request to files with the name `my_file.txt` - * in project `my-project` in the `us-central` region, in repository - * `my-repo`, append the following filter expression to your request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` - * - * To filter the results of your request to files owned by the version `1.0` - * in package `pkg1`, append the following filter expression to your request: - * - * * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - * - * To filter the results of your request to files with the annotation - * key-value pair [`external_link`: `external_link_value`], append the - * following filter expression to your request: - * - * * `"annotations.external_link:external_link_value"` - * - * To filter just for a specific annotation key `external_link`, append the - * following filter expression to your request: - * - * * `"annotations.external_link"` - * - * If the annotation key or value contains special characters, you can escape - * them by surrounding the value with backticks. For example, to filter the - * results of your request to files with the annotation key-value pair - * [`external.link`:`https://example.com/my-file`], append the following - * filter expression to your request: - * - * * `` "annotations.`external.link`:`https://example.com/my-file`" `` - * - * You can also filter with annotations with a wildcard to - * match any number of characters before or after the value: - * - * * `` "annotations.*_link:`*example.com*`" `` - * @param {number} request.pageSize - * The maximum number of files 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 {string} request.orderBy - * The field to order the results by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.File|File}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listFilesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listFiles( - request?: protos.google.devtools.artifactregistry.v1.IListFilesRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IFile[], - protos.google.devtools.artifactregistry.v1.IListFilesRequest|null, - protos.google.devtools.artifactregistry.v1.IListFilesResponse - ]>; - listFiles( - request: protos.google.devtools.artifactregistry.v1.IListFilesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListFilesRequest, - protos.google.devtools.artifactregistry.v1.IListFilesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IFile>): void; - listFiles( - request: protos.google.devtools.artifactregistry.v1.IListFilesRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListFilesRequest, - protos.google.devtools.artifactregistry.v1.IListFilesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IFile>): void; - listFiles( - request?: protos.google.devtools.artifactregistry.v1.IListFilesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListFilesRequest, - protos.google.devtools.artifactregistry.v1.IListFilesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IFile>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListFilesRequest, - protos.google.devtools.artifactregistry.v1.IListFilesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IFile>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IFile[], - protos.google.devtools.artifactregistry.v1.IListFilesRequest|null, - protos.google.devtools.artifactregistry.v1.IListFilesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListFilesRequest, - protos.google.devtools.artifactregistry.v1.IListFilesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IFile>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listFiles values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listFiles request %j', request); - return this.innerApiCalls - .listFiles(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1.IFile[], - protos.google.devtools.artifactregistry.v1.IListFilesRequest|null, - protos.google.devtools.artifactregistry.v1.IListFilesResponse - ]) => { - this._log.info('listFiles values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listFiles`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the repository whose files will be listed. For - * example: "projects/p1/locations/us-central1/repositories/repo1 - * @param {string} request.filter - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `owner` - * * `annotations` - * - * Examples of using a filter: - * - * To filter the results of your request to files with the name `my_file.txt` - * in project `my-project` in the `us-central` region, in repository - * `my-repo`, append the following filter expression to your request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` - * - * To filter the results of your request to files owned by the version `1.0` - * in package `pkg1`, append the following filter expression to your request: - * - * * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - * - * To filter the results of your request to files with the annotation - * key-value pair [`external_link`: `external_link_value`], append the - * following filter expression to your request: - * - * * `"annotations.external_link:external_link_value"` - * - * To filter just for a specific annotation key `external_link`, append the - * following filter expression to your request: - * - * * `"annotations.external_link"` - * - * If the annotation key or value contains special characters, you can escape - * them by surrounding the value with backticks. For example, to filter the - * results of your request to files with the annotation key-value pair - * [`external.link`:`https://example.com/my-file`], append the following - * filter expression to your request: - * - * * `` "annotations.`external.link`:`https://example.com/my-file`" `` - * - * You can also filter with annotations with a wildcard to - * match any number of characters before or after the value: - * - * * `` "annotations.*_link:`*example.com*`" `` - * @param {number} request.pageSize - * The maximum number of files 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 {string} request.orderBy - * The field to order the results by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.File|File} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listFilesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listFilesStream( - request?: protos.google.devtools.artifactregistry.v1.IListFilesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFiles']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFiles stream %j', request); - return this.descriptors.page.listFiles.createStream( - this.innerApiCalls.listFiles as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listFiles`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the repository whose files will be listed. For - * example: "projects/p1/locations/us-central1/repositories/repo1 - * @param {string} request.filter - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `owner` - * * `annotations` - * - * Examples of using a filter: - * - * To filter the results of your request to files with the name `my_file.txt` - * in project `my-project` in the `us-central` region, in repository - * `my-repo`, append the following filter expression to your request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` - * - * To filter the results of your request to files owned by the version `1.0` - * in package `pkg1`, append the following filter expression to your request: - * - * * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - * - * To filter the results of your request to files with the annotation - * key-value pair [`external_link`: `external_link_value`], append the - * following filter expression to your request: - * - * * `"annotations.external_link:external_link_value"` - * - * To filter just for a specific annotation key `external_link`, append the - * following filter expression to your request: - * - * * `"annotations.external_link"` - * - * If the annotation key or value contains special characters, you can escape - * them by surrounding the value with backticks. For example, to filter the - * results of your request to files with the annotation key-value pair - * [`external.link`:`https://example.com/my-file`], append the following - * filter expression to your request: - * - * * `` "annotations.`external.link`:`https://example.com/my-file`" `` - * - * You can also filter with annotations with a wildcard to - * match any number of characters before or after the value: - * - * * `` "annotations.*_link:`*example.com*`" `` - * @param {number} request.pageSize - * The maximum number of files 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 {string} request.orderBy - * The field to order the results by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1.File|File}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.list_files.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async - */ - listFilesAsync( - request?: protos.google.devtools.artifactregistry.v1.IListFilesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFiles']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFiles iterate %j', request); - return this.descriptors.page.listFiles.asyncIterate( - this.innerApiCalls['listFiles'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists tags. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent package whose tags will be listed. - * For example: - * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. - * @param {string} request.filter - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `version` - * - * Examples of using a filter: - * - * To filter the results of your request to tags with the name `my-tag` in - * package `my-package` in repository `my-repo` in project "`y-project` in - * the us-central region, append the following filter expression to your - * request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` - * - * To filter the results of your request to tags applied to the version - * `1.0` in package `my-package`, append the following filter expression to - * your request: - * - * * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - * @param {number} request.pageSize - * The maximum number of tags to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.Tag|Tag}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listTagsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listTags( - request?: protos.google.devtools.artifactregistry.v1.IListTagsRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.ITag[], - protos.google.devtools.artifactregistry.v1.IListTagsRequest|null, - protos.google.devtools.artifactregistry.v1.IListTagsResponse - ]>; - listTags( - request: protos.google.devtools.artifactregistry.v1.IListTagsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListTagsRequest, - protos.google.devtools.artifactregistry.v1.IListTagsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.ITag>): void; - listTags( - request: protos.google.devtools.artifactregistry.v1.IListTagsRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListTagsRequest, - protos.google.devtools.artifactregistry.v1.IListTagsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.ITag>): void; - listTags( - request?: protos.google.devtools.artifactregistry.v1.IListTagsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListTagsRequest, - protos.google.devtools.artifactregistry.v1.IListTagsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.ITag>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListTagsRequest, - protos.google.devtools.artifactregistry.v1.IListTagsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.ITag>): - Promise<[ - protos.google.devtools.artifactregistry.v1.ITag[], - protos.google.devtools.artifactregistry.v1.IListTagsRequest|null, - protos.google.devtools.artifactregistry.v1.IListTagsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListTagsRequest, - protos.google.devtools.artifactregistry.v1.IListTagsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.ITag>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listTags values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listTags request %j', request); - return this.innerApiCalls - .listTags(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1.ITag[], - protos.google.devtools.artifactregistry.v1.IListTagsRequest|null, - protos.google.devtools.artifactregistry.v1.IListTagsResponse - ]) => { - this._log.info('listTags values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listTags`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent package whose tags will be listed. - * For example: - * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. - * @param {string} request.filter - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `version` - * - * Examples of using a filter: - * - * To filter the results of your request to tags with the name `my-tag` in - * package `my-package` in repository `my-repo` in project "`y-project` in - * the us-central region, append the following filter expression to your - * request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` - * - * To filter the results of your request to tags applied to the version - * `1.0` in package `my-package`, append the following filter expression to - * your request: - * - * * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - * @param {number} request.pageSize - * The maximum number of tags to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.Tag|Tag} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listTagsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listTagsStream( - request?: protos.google.devtools.artifactregistry.v1.IListTagsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listTags']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listTags stream %j', request); - return this.descriptors.page.listTags.createStream( - this.innerApiCalls.listTags as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listTags`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent package whose tags will be listed. - * For example: - * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. - * @param {string} request.filter - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `version` - * - * Examples of using a filter: - * - * To filter the results of your request to tags with the name `my-tag` in - * package `my-package` in repository `my-repo` in project "`y-project` in - * the us-central region, append the following filter expression to your - * request: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` - * - * You can also use wildcards to match any number of characters before or - * after the value: - * - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` - * * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` - * - * To filter the results of your request to tags applied to the version - * `1.0` in package `my-package`, append the following filter expression to - * your request: - * - * * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - * @param {number} request.pageSize - * The maximum number of tags to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1.Tag|Tag}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.list_tags.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListTags_async - */ - listTagsAsync( - request?: protos.google.devtools.artifactregistry.v1.IListTagsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listTags']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listTags iterate %j', request); - return this.descriptors.page.listTags.asyncIterate( - this.innerApiCalls['listTags'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists rules. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent repository whose rules will be listed. - * For example: - * `projects/p1/locations/us-central1/repositories/repo1`. - * @param {number} request.pageSize - * The maximum number of rules to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.Rule|Rule}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listRulesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listRules( - request?: protos.google.devtools.artifactregistry.v1.IListRulesRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IRule[], - protos.google.devtools.artifactregistry.v1.IListRulesRequest|null, - protos.google.devtools.artifactregistry.v1.IListRulesResponse - ]>; - listRules( - request: protos.google.devtools.artifactregistry.v1.IListRulesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListRulesRequest, - protos.google.devtools.artifactregistry.v1.IListRulesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IRule>): void; - listRules( - request: protos.google.devtools.artifactregistry.v1.IListRulesRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListRulesRequest, - protos.google.devtools.artifactregistry.v1.IListRulesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IRule>): void; - listRules( - request?: protos.google.devtools.artifactregistry.v1.IListRulesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListRulesRequest, - protos.google.devtools.artifactregistry.v1.IListRulesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IRule>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListRulesRequest, - protos.google.devtools.artifactregistry.v1.IListRulesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IRule>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IRule[], - protos.google.devtools.artifactregistry.v1.IListRulesRequest|null, - protos.google.devtools.artifactregistry.v1.IListRulesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListRulesRequest, - protos.google.devtools.artifactregistry.v1.IListRulesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IRule>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listRules values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listRules request %j', request); - return this.innerApiCalls - .listRules(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1.IRule[], - protos.google.devtools.artifactregistry.v1.IListRulesRequest|null, - protos.google.devtools.artifactregistry.v1.IListRulesResponse - ]) => { - this._log.info('listRules values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listRules`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent repository whose rules will be listed. - * For example: - * `projects/p1/locations/us-central1/repositories/repo1`. - * @param {number} request.pageSize - * The maximum number of rules to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.Rule|Rule} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listRulesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listRulesStream( - request?: protos.google.devtools.artifactregistry.v1.IListRulesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listRules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listRules stream %j', request); - return this.descriptors.page.listRules.createStream( - this.innerApiCalls.listRules as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listRules`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent repository whose rules will be listed. - * For example: - * `projects/p1/locations/us-central1/repositories/repo1`. - * @param {number} request.pageSize - * The maximum number of rules to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1.Rule|Rule}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.list_rules.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListRules_async - */ - listRulesAsync( - request?: protos.google.devtools.artifactregistry.v1.IListRulesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listRules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listRules iterate %j', request); - return this.descriptors.page.listRules.asyncIterate( - this.innerApiCalls['listRules'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists attachments. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose attachments will be listed. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * - * * `target` - * * `type` - * * `attachment_namespace` - * @param {number} request.pageSize - * The maximum number of attachments to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1.Attachment|Attachment}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listAttachmentsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listAttachments( - request?: protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1.IAttachment[], - protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest|null, - protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse - ]>; - listAttachments( - request: protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, - protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IAttachment>): void; - listAttachments( - request: protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, - protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IAttachment>): void; - listAttachments( - request?: protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, - protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IAttachment>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, - protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IAttachment>): - Promise<[ - protos.google.devtools.artifactregistry.v1.IAttachment[], - protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest|null, - protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, - protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1.IAttachment>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listAttachments values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listAttachments request %j', request); - return this.innerApiCalls - .listAttachments(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1.IAttachment[], - protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest|null, - protos.google.devtools.artifactregistry.v1.IListAttachmentsResponse - ]) => { - this._log.info('listAttachments values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listAttachments`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose attachments will be listed. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * - * * `target` - * * `type` - * * `attachment_namespace` - * @param {number} request.pageSize - * The maximum number of attachments to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1.Attachment|Attachment} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listAttachmentsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listAttachmentsStream( - request?: protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listAttachments']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listAttachments stream %j', request); - return this.descriptors.page.listAttachments.createStream( - this.innerApiCalls.listAttachments as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listAttachments`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose attachments will be listed. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the request. Filter - * rules are case insensitive. The fields eligible for filtering are: - * - * * `target` - * * `type` - * * `attachment_namespace` - * @param {number} request.pageSize - * The maximum number of attachments to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1.Attachment|Attachment}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/artifact_registry.list_attachments.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_async - */ - listAttachmentsAsync( - request?: protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listAttachments']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listAttachments iterate %j', request); - return this.descriptors.page.listAttachments.asyncIterate( - this.innerApiCalls['listAttachments'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * Gets information about a location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Resource name for the location. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example - * ``` - * const [response] = await client.getLocation(request); - * ``` - */ - getLocation( - request: LocationProtos.google.cloud.location.IGetLocationRequest, - options?: - | gax.CallOptions - | Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - > - ): Promise { - return this.locationsClient.getLocation(request, options, callback); - } - -/** - * Lists information about the supported locations for this service. Returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource that owns the locations collection, if applicable. - * @param {string} request.filter - * The standard list filter. - * @param {number} request.pageSize - * The standard list page size. - * @param {string} request.pageToken - * The standard list page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example - * ``` - * const iterable = client.listLocationsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` - */ - listLocationsAsync( - request: LocationProtos.google.cloud.location.IListLocationsRequest, - options?: CallOptions - ): AsyncIterable { - return this.locationsClient.listLocationsAsync(request, options); - } - -/** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * const name = ''; - * const [response] = await client.getOperation({name}); - * // doThingsWith(response) - * ``` - */ - getOperation( - request: protos.google.longrunning.GetOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - > - ): Promise<[protos.google.longrunning.Operation]> { - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.getOperation(request, options, callback); - } - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. - * - * For-await-of syntax is used with the iterable to recursively get response element on-demand. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation collection. - * @param {string} request.filter - The standard list filter. - * @param {number=} request.pageSize - - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @returns {Object} - * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * for await (const response of client.listOperationsAsync(request)); - * // doThingsWith(response) - * ``` - */ - listOperationsAsync( - request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions - ): AsyncIterable { - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.listOperationsAsync(request, options); - } - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * {@link Operations.GetOperation} or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an {@link Operation.error} value with a {@link google.rpc.Status.code} of - * 1, corresponding to `Code.CANCELLED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be cancelled. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.cancelOperation({name: ''}); - * ``` - */ - cancelOperation( - request: protos.google.longrunning.CancelOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.cancelOperation(request, options, callback); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be deleted. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.deleteOperation({name: ''}); - * ``` - */ - deleteOperation( - request: protos.google.longrunning.DeleteOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - > - ): Promise { - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- 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 attachment resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} repository - * @param {string} attachment - * @returns {string} Resource name string. - */ - attachmentPath(project:string,location:string,repository:string,attachment:string) { - return this.pathTemplates.attachmentPathTemplate.render({ - project: project, - location: location, - repository: repository, - attachment: attachment, - }); - } - - /** - * Parse the project from Attachment resource. - * - * @param {string} attachmentName - * A fully-qualified path representing Attachment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAttachmentName(attachmentName: string) { - return this.pathTemplates.attachmentPathTemplate.match(attachmentName).project; - } - - /** - * Parse the location from Attachment resource. - * - * @param {string} attachmentName - * A fully-qualified path representing Attachment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAttachmentName(attachmentName: string) { - return this.pathTemplates.attachmentPathTemplate.match(attachmentName).location; - } - - /** - * Parse the repository from Attachment resource. - * - * @param {string} attachmentName - * A fully-qualified path representing Attachment resource. - * @returns {string} A string representing the repository. - */ - matchRepositoryFromAttachmentName(attachmentName: string) { - return this.pathTemplates.attachmentPathTemplate.match(attachmentName).repository; - } - - /** - * Parse the attachment from Attachment resource. - * - * @param {string} attachmentName - * A fully-qualified path representing Attachment resource. - * @returns {string} A string representing the attachment. - */ - matchAttachmentFromAttachmentName(attachmentName: string) { - return this.pathTemplates.attachmentPathTemplate.match(attachmentName).attachment; - } - - /** - * Return a fully-qualified dockerImage resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} repository - * @param {string} docker_image - * @returns {string} Resource name string. - */ - dockerImagePath(project:string,location:string,repository:string,dockerImage:string) { - return this.pathTemplates.dockerImagePathTemplate.render({ - project: project, - location: location, - repository: repository, - docker_image: dockerImage, - }); - } - - /** - * Parse the project from DockerImage resource. - * - * @param {string} dockerImageName - * A fully-qualified path representing DockerImage resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDockerImageName(dockerImageName: string) { - return this.pathTemplates.dockerImagePathTemplate.match(dockerImageName).project; - } - - /** - * Parse the location from DockerImage resource. - * - * @param {string} dockerImageName - * A fully-qualified path representing DockerImage resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDockerImageName(dockerImageName: string) { - return this.pathTemplates.dockerImagePathTemplate.match(dockerImageName).location; - } - - /** - * Parse the repository from DockerImage resource. - * - * @param {string} dockerImageName - * A fully-qualified path representing DockerImage resource. - * @returns {string} A string representing the repository. - */ - matchRepositoryFromDockerImageName(dockerImageName: string) { - return this.pathTemplates.dockerImagePathTemplate.match(dockerImageName).repository; - } - - /** - * Parse the docker_image from DockerImage resource. - * - * @param {string} dockerImageName - * A fully-qualified path representing DockerImage resource. - * @returns {string} A string representing the docker_image. - */ - matchDockerImageFromDockerImageName(dockerImageName: string) { - return this.pathTemplates.dockerImagePathTemplate.match(dockerImageName).docker_image; - } - - /** - * Return a fully-qualified file resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} repository - * @param {string} file - * @returns {string} Resource name string. - */ - filePath(project:string,location:string,repository:string,file:string) { - return this.pathTemplates.filePathTemplate.render({ - project: project, - location: location, - repository: repository, - file: file, - }); - } - - /** - * Parse the project from File resource. - * - * @param {string} fileName - * A fully-qualified path representing File resource. - * @returns {string} A string representing the project. - */ - matchProjectFromFileName(fileName: string) { - return this.pathTemplates.filePathTemplate.match(fileName).project; - } - - /** - * Parse the location from File resource. - * - * @param {string} fileName - * A fully-qualified path representing File resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFileName(fileName: string) { - return this.pathTemplates.filePathTemplate.match(fileName).location; - } - - /** - * Parse the repository from File resource. - * - * @param {string} fileName - * A fully-qualified path representing File resource. - * @returns {string} A string representing the repository. - */ - matchRepositoryFromFileName(fileName: string) { - return this.pathTemplates.filePathTemplate.match(fileName).repository; - } - - /** - * Parse the file from File resource. - * - * @param {string} fileName - * A fully-qualified path representing File resource. - * @returns {string} A string representing the file. - */ - matchFileFromFileName(fileName: string) { - return this.pathTemplates.filePathTemplate.match(fileName).file; - } - - /** - * Return a fully-qualified genericArtifact resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} repository - * @param {string} generic_artifact - * @returns {string} Resource name string. - */ - genericArtifactPath(project:string,location:string,repository:string,genericArtifact:string) { - return this.pathTemplates.genericArtifactPathTemplate.render({ - project: project, - location: location, - repository: repository, - generic_artifact: genericArtifact, - }); - } - - /** - * Parse the project from GenericArtifact resource. - * - * @param {string} genericArtifactName - * A fully-qualified path representing GenericArtifact resource. - * @returns {string} A string representing the project. - */ - matchProjectFromGenericArtifactName(genericArtifactName: string) { - return this.pathTemplates.genericArtifactPathTemplate.match(genericArtifactName).project; - } - - /** - * Parse the location from GenericArtifact resource. - * - * @param {string} genericArtifactName - * A fully-qualified path representing GenericArtifact resource. - * @returns {string} A string representing the location. - */ - matchLocationFromGenericArtifactName(genericArtifactName: string) { - return this.pathTemplates.genericArtifactPathTemplate.match(genericArtifactName).location; - } - - /** - * Parse the repository from GenericArtifact resource. - * - * @param {string} genericArtifactName - * A fully-qualified path representing GenericArtifact resource. - * @returns {string} A string representing the repository. - */ - matchRepositoryFromGenericArtifactName(genericArtifactName: string) { - return this.pathTemplates.genericArtifactPathTemplate.match(genericArtifactName).repository; - } - - /** - * Parse the generic_artifact from GenericArtifact resource. - * - * @param {string} genericArtifactName - * A fully-qualified path representing GenericArtifact resource. - * @returns {string} A string representing the generic_artifact. - */ - matchGenericArtifactFromGenericArtifactName(genericArtifactName: string) { - return this.pathTemplates.genericArtifactPathTemplate.match(genericArtifactName).generic_artifact; - } - - /** - * Return a fully-qualified goModule resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} repository - * @param {string} go_module - * @returns {string} Resource name string. - */ - goModulePath(project:string,location:string,repository:string,goModule:string) { - return this.pathTemplates.goModulePathTemplate.render({ - project: project, - location: location, - repository: repository, - go_module: goModule, - }); - } - - /** - * Parse the project from GoModule resource. - * - * @param {string} goModuleName - * A fully-qualified path representing GoModule resource. - * @returns {string} A string representing the project. - */ - matchProjectFromGoModuleName(goModuleName: string) { - return this.pathTemplates.goModulePathTemplate.match(goModuleName).project; - } - - /** - * Parse the location from GoModule resource. - * - * @param {string} goModuleName - * A fully-qualified path representing GoModule resource. - * @returns {string} A string representing the location. - */ - matchLocationFromGoModuleName(goModuleName: string) { - return this.pathTemplates.goModulePathTemplate.match(goModuleName).location; - } - - /** - * Parse the repository from GoModule resource. - * - * @param {string} goModuleName - * A fully-qualified path representing GoModule resource. - * @returns {string} A string representing the repository. - */ - matchRepositoryFromGoModuleName(goModuleName: string) { - return this.pathTemplates.goModulePathTemplate.match(goModuleName).repository; - } - - /** - * Parse the go_module from GoModule resource. - * - * @param {string} goModuleName - * A fully-qualified path representing GoModule resource. - * @returns {string} A string representing the go_module. - */ - matchGoModuleFromGoModuleName(goModuleName: string) { - return this.pathTemplates.goModulePathTemplate.match(goModuleName).go_module; - } - - /** - * Return a fully-qualified kfpArtifact resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} repository - * @param {string} kfp_artifact - * @returns {string} Resource name string. - */ - kfpArtifactPath(project:string,location:string,repository:string,kfpArtifact:string) { - return this.pathTemplates.kfpArtifactPathTemplate.render({ - project: project, - location: location, - repository: repository, - kfp_artifact: kfpArtifact, - }); - } - - /** - * Parse the project from KfpArtifact resource. - * - * @param {string} kfpArtifactName - * A fully-qualified path representing KfpArtifact resource. - * @returns {string} A string representing the project. - */ - matchProjectFromKfpArtifactName(kfpArtifactName: string) { - return this.pathTemplates.kfpArtifactPathTemplate.match(kfpArtifactName).project; - } - - /** - * Parse the location from KfpArtifact resource. - * - * @param {string} kfpArtifactName - * A fully-qualified path representing KfpArtifact resource. - * @returns {string} A string representing the location. - */ - matchLocationFromKfpArtifactName(kfpArtifactName: string) { - return this.pathTemplates.kfpArtifactPathTemplate.match(kfpArtifactName).location; - } - - /** - * Parse the repository from KfpArtifact resource. - * - * @param {string} kfpArtifactName - * A fully-qualified path representing KfpArtifact resource. - * @returns {string} A string representing the repository. - */ - matchRepositoryFromKfpArtifactName(kfpArtifactName: string) { - return this.pathTemplates.kfpArtifactPathTemplate.match(kfpArtifactName).repository; - } - - /** - * Parse the kfp_artifact from KfpArtifact resource. - * - * @param {string} kfpArtifactName - * A fully-qualified path representing KfpArtifact resource. - * @returns {string} A string representing the kfp_artifact. - */ - matchKfpArtifactFromKfpArtifactName(kfpArtifactName: string) { - return this.pathTemplates.kfpArtifactPathTemplate.match(kfpArtifactName).kfp_artifact; - } - - /** - * Return a fully-qualified mavenArtifact resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} repository - * @param {string} maven_artifact - * @returns {string} Resource name string. - */ - mavenArtifactPath(project:string,location:string,repository:string,mavenArtifact:string) { - return this.pathTemplates.mavenArtifactPathTemplate.render({ - project: project, - location: location, - repository: repository, - maven_artifact: mavenArtifact, - }); - } - - /** - * Parse the project from MavenArtifact resource. - * - * @param {string} mavenArtifactName - * A fully-qualified path representing MavenArtifact resource. - * @returns {string} A string representing the project. - */ - matchProjectFromMavenArtifactName(mavenArtifactName: string) { - return this.pathTemplates.mavenArtifactPathTemplate.match(mavenArtifactName).project; - } - - /** - * Parse the location from MavenArtifact resource. - * - * @param {string} mavenArtifactName - * A fully-qualified path representing MavenArtifact resource. - * @returns {string} A string representing the location. - */ - matchLocationFromMavenArtifactName(mavenArtifactName: string) { - return this.pathTemplates.mavenArtifactPathTemplate.match(mavenArtifactName).location; - } - - /** - * Parse the repository from MavenArtifact resource. - * - * @param {string} mavenArtifactName - * A fully-qualified path representing MavenArtifact resource. - * @returns {string} A string representing the repository. - */ - matchRepositoryFromMavenArtifactName(mavenArtifactName: string) { - return this.pathTemplates.mavenArtifactPathTemplate.match(mavenArtifactName).repository; - } - - /** - * Parse the maven_artifact from MavenArtifact resource. - * - * @param {string} mavenArtifactName - * A fully-qualified path representing MavenArtifact resource. - * @returns {string} A string representing the maven_artifact. - */ - matchMavenArtifactFromMavenArtifactName(mavenArtifactName: string) { - return this.pathTemplates.mavenArtifactPathTemplate.match(mavenArtifactName).maven_artifact; - } - - /** - * Return a fully-qualified npmPackage resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} repository - * @param {string} npm_package - * @returns {string} Resource name string. - */ - npmPackagePath(project:string,location:string,repository:string,npmPackage:string) { - return this.pathTemplates.npmPackagePathTemplate.render({ - project: project, - location: location, - repository: repository, - npm_package: npmPackage, - }); - } - - /** - * Parse the project from NpmPackage resource. - * - * @param {string} npmPackageName - * A fully-qualified path representing NpmPackage resource. - * @returns {string} A string representing the project. - */ - matchProjectFromNpmPackageName(npmPackageName: string) { - return this.pathTemplates.npmPackagePathTemplate.match(npmPackageName).project; - } - - /** - * Parse the location from NpmPackage resource. - * - * @param {string} npmPackageName - * A fully-qualified path representing NpmPackage resource. - * @returns {string} A string representing the location. - */ - matchLocationFromNpmPackageName(npmPackageName: string) { - return this.pathTemplates.npmPackagePathTemplate.match(npmPackageName).location; - } - - /** - * Parse the repository from NpmPackage resource. - * - * @param {string} npmPackageName - * A fully-qualified path representing NpmPackage resource. - * @returns {string} A string representing the repository. - */ - matchRepositoryFromNpmPackageName(npmPackageName: string) { - return this.pathTemplates.npmPackagePathTemplate.match(npmPackageName).repository; - } - - /** - * Parse the npm_package from NpmPackage resource. - * - * @param {string} npmPackageName - * A fully-qualified path representing NpmPackage resource. - * @returns {string} A string representing the npm_package. - */ - matchNpmPackageFromNpmPackageName(npmPackageName: string) { - return this.pathTemplates.npmPackagePathTemplate.match(npmPackageName).npm_package; - } - - /** - * Return a fully-qualified package resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} repository - * @param {string} packageParam - * @returns {string} Resource name string. - */ - packagePath(project:string,location:string,repository:string,packageParam:string) { - return this.pathTemplates.packagePathTemplate.render({ - project: project, - location: location, - repository: repository, - package: packageParam, - }); - } - - /** - * Parse the project from Package resource. - * - * @param {string} packageName - * A fully-qualified path representing Package resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPackageName(packageName: string) { - return this.pathTemplates.packagePathTemplate.match(packageName).project; - } - - /** - * Parse the location from Package resource. - * - * @param {string} packageName - * A fully-qualified path representing Package resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPackageName(packageName: string) { - return this.pathTemplates.packagePathTemplate.match(packageName).location; - } - - /** - * Parse the repository from Package resource. - * - * @param {string} packageName - * A fully-qualified path representing Package resource. - * @returns {string} A string representing the repository. - */ - matchRepositoryFromPackageName(packageName: string) { - return this.pathTemplates.packagePathTemplate.match(packageName).repository; - } - - /** - * Parse the package from Package resource. - * - * @param {string} packageName - * A fully-qualified path representing Package resource. - * @returns {string} A string representing the package. - */ - matchPackageFromPackageName(packageName: string) { - return this.pathTemplates.packagePathTemplate.match(packageName).package; - } - - /** - * 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 pythonPackage resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} repository - * @param {string} python_package - * @returns {string} Resource name string. - */ - pythonPackagePath(project:string,location:string,repository:string,pythonPackage:string) { - return this.pathTemplates.pythonPackagePathTemplate.render({ - project: project, - location: location, - repository: repository, - python_package: pythonPackage, - }); - } - - /** - * Parse the project from PythonPackage resource. - * - * @param {string} pythonPackageName - * A fully-qualified path representing PythonPackage resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPythonPackageName(pythonPackageName: string) { - return this.pathTemplates.pythonPackagePathTemplate.match(pythonPackageName).project; - } - - /** - * Parse the location from PythonPackage resource. - * - * @param {string} pythonPackageName - * A fully-qualified path representing PythonPackage resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPythonPackageName(pythonPackageName: string) { - return this.pathTemplates.pythonPackagePathTemplate.match(pythonPackageName).location; - } - - /** - * Parse the repository from PythonPackage resource. - * - * @param {string} pythonPackageName - * A fully-qualified path representing PythonPackage resource. - * @returns {string} A string representing the repository. - */ - matchRepositoryFromPythonPackageName(pythonPackageName: string) { - return this.pathTemplates.pythonPackagePathTemplate.match(pythonPackageName).repository; - } - - /** - * Parse the python_package from PythonPackage resource. - * - * @param {string} pythonPackageName - * A fully-qualified path representing PythonPackage resource. - * @returns {string} A string representing the python_package. - */ - matchPythonPackageFromPythonPackageName(pythonPackageName: string) { - return this.pathTemplates.pythonPackagePathTemplate.match(pythonPackageName).python_package; - } - - /** - * Return a fully-qualified repository resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} repository - * @returns {string} Resource name string. - */ - repositoryPath(project:string,location:string,repository:string) { - return this.pathTemplates.repositoryPathTemplate.render({ - project: project, - location: location, - repository: repository, - }); - } - - /** - * Parse the project from Repository resource. - * - * @param {string} repositoryName - * A fully-qualified path representing Repository resource. - * @returns {string} A string representing the project. - */ - matchProjectFromRepositoryName(repositoryName: string) { - return this.pathTemplates.repositoryPathTemplate.match(repositoryName).project; - } - - /** - * Parse the location from Repository resource. - * - * @param {string} repositoryName - * A fully-qualified path representing Repository resource. - * @returns {string} A string representing the location. - */ - matchLocationFromRepositoryName(repositoryName: string) { - return this.pathTemplates.repositoryPathTemplate.match(repositoryName).location; - } - - /** - * Parse the repository from Repository resource. - * - * @param {string} repositoryName - * A fully-qualified path representing Repository resource. - * @returns {string} A string representing the repository. - */ - matchRepositoryFromRepositoryName(repositoryName: string) { - return this.pathTemplates.repositoryPathTemplate.match(repositoryName).repository; - } - - /** - * Return a fully-qualified rule resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} repository - * @param {string} rule - * @returns {string} Resource name string. - */ - rulePath(project:string,location:string,repository:string,rule:string) { - return this.pathTemplates.rulePathTemplate.render({ - project: project, - location: location, - repository: repository, - rule: rule, - }); - } - - /** - * Parse the project from Rule resource. - * - * @param {string} ruleName - * A fully-qualified path representing Rule resource. - * @returns {string} A string representing the project. - */ - matchProjectFromRuleName(ruleName: string) { - return this.pathTemplates.rulePathTemplate.match(ruleName).project; - } - - /** - * Parse the location from Rule resource. - * - * @param {string} ruleName - * A fully-qualified path representing Rule resource. - * @returns {string} A string representing the location. - */ - matchLocationFromRuleName(ruleName: string) { - return this.pathTemplates.rulePathTemplate.match(ruleName).location; - } - - /** - * Parse the repository from Rule resource. - * - * @param {string} ruleName - * A fully-qualified path representing Rule resource. - * @returns {string} A string representing the repository. - */ - matchRepositoryFromRuleName(ruleName: string) { - return this.pathTemplates.rulePathTemplate.match(ruleName).repository; - } - - /** - * Parse the rule from Rule resource. - * - * @param {string} ruleName - * A fully-qualified path representing Rule resource. - * @returns {string} A string representing the rule. - */ - matchRuleFromRuleName(ruleName: string) { - return this.pathTemplates.rulePathTemplate.match(ruleName).rule; - } - - /** - * 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 vpcscConfig resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - vpcscConfigPath(project:string,location:string) { - return this.pathTemplates.vpcscConfigPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from VpcscConfig resource. - * - * @param {string} vpcscConfigName - * A fully-qualified path representing VpcscConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromVpcscConfigName(vpcscConfigName: string) { - return this.pathTemplates.vpcscConfigPathTemplate.match(vpcscConfigName).project; - } - - /** - * Parse the location from VpcscConfig resource. - * - * @param {string} vpcscConfigName - * A fully-qualified path representing VpcscConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromVpcscConfigName(vpcscConfigName: string) { - return this.pathTemplates.vpcscConfigPathTemplate.match(vpcscConfigName).location; - } - - /** - * 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. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.artifactRegistryStub && !this._terminated) { - return this.artifactRegistryStub.then(stub => { - this._log.info('ending gRPC channel'); - this._terminated = true; - stub.close(); - this.locationsClient.close().catch(err => {throw err}); - void this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client_config.json b/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client_config.json deleted file mode 100644 index d34cffe3456..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_client_config.json +++ /dev/null @@ -1,276 +0,0 @@ -{ - "interfaces": { - "google.devtools.artifactregistry.v1.ArtifactRegistry": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ListDockerImages": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetDockerImage": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListMavenArtifacts": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetMavenArtifact": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListNpmPackages": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetNpmPackage": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListPythonPackages": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetPythonPackage": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ImportAptArtifacts": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ImportYumArtifacts": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListRepositories": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetRepository": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateRepository": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateRepository": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteRepository": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListPackages": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetPackage": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeletePackage": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListVersions": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetVersion": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteVersion": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "BatchDeleteVersions": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateVersion": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListFiles": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetFile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteFile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateFile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListTags": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetTag": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateTag": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateTag": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteTag": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateRule": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListRules": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetRule": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateRule": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteRule": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetProjectSettings": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateProjectSettings": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetVPCSCConfig": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateVPCSCConfig": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdatePackage": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListAttachments": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetAttachment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateAttachment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteAttachment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ExportArtifact": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_proto_list.json b/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_proto_list.json deleted file mode 100644 index 834e46f73e8..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/src/v1/artifact_registry_proto_list.json +++ /dev/null @@ -1,19 +0,0 @@ -[ - "../../protos/google/devtools/artifactregistry/v1/apt_artifact.proto", - "../../protos/google/devtools/artifactregistry/v1/artifact.proto", - "../../protos/google/devtools/artifactregistry/v1/attachment.proto", - "../../protos/google/devtools/artifactregistry/v1/export.proto", - "../../protos/google/devtools/artifactregistry/v1/file.proto", - "../../protos/google/devtools/artifactregistry/v1/generic.proto", - "../../protos/google/devtools/artifactregistry/v1/go.proto", - "../../protos/google/devtools/artifactregistry/v1/kfp_artifact.proto", - "../../protos/google/devtools/artifactregistry/v1/package.proto", - "../../protos/google/devtools/artifactregistry/v1/repository.proto", - "../../protos/google/devtools/artifactregistry/v1/rule.proto", - "../../protos/google/devtools/artifactregistry/v1/service.proto", - "../../protos/google/devtools/artifactregistry/v1/settings.proto", - "../../protos/google/devtools/artifactregistry/v1/tag.proto", - "../../protos/google/devtools/artifactregistry/v1/version.proto", - "../../protos/google/devtools/artifactregistry/v1/vpcsc_config.proto", - "../../protos/google/devtools/artifactregistry/v1/yum_artifact.proto" -] diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1/gapic_metadata.json b/owl-bot-staging/google-devtools-artifactregistry/src/v1/gapic_metadata.json deleted file mode 100644 index 38b765e25bb..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/src/v1/gapic_metadata.json +++ /dev/null @@ -1,567 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.devtools.artifactregistry.v1", - "libraryPackage": "@google-cloud/artifact-registry", - "services": { - "ArtifactRegistry": { - "clients": { - "grpc": { - "libraryClient": "ArtifactRegistryClient", - "rpcs": { - "GetDockerImage": { - "methods": [ - "getDockerImage" - ] - }, - "GetMavenArtifact": { - "methods": [ - "getMavenArtifact" - ] - }, - "GetNpmPackage": { - "methods": [ - "getNpmPackage" - ] - }, - "GetPythonPackage": { - "methods": [ - "getPythonPackage" - ] - }, - "GetRepository": { - "methods": [ - "getRepository" - ] - }, - "UpdateRepository": { - "methods": [ - "updateRepository" - ] - }, - "GetPackage": { - "methods": [ - "getPackage" - ] - }, - "GetVersion": { - "methods": [ - "getVersion" - ] - }, - "UpdateVersion": { - "methods": [ - "updateVersion" - ] - }, - "GetFile": { - "methods": [ - "getFile" - ] - }, - "UpdateFile": { - "methods": [ - "updateFile" - ] - }, - "GetTag": { - "methods": [ - "getTag" - ] - }, - "CreateTag": { - "methods": [ - "createTag" - ] - }, - "UpdateTag": { - "methods": [ - "updateTag" - ] - }, - "DeleteTag": { - "methods": [ - "deleteTag" - ] - }, - "CreateRule": { - "methods": [ - "createRule" - ] - }, - "GetRule": { - "methods": [ - "getRule" - ] - }, - "UpdateRule": { - "methods": [ - "updateRule" - ] - }, - "DeleteRule": { - "methods": [ - "deleteRule" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "GetProjectSettings": { - "methods": [ - "getProjectSettings" - ] - }, - "UpdateProjectSettings": { - "methods": [ - "updateProjectSettings" - ] - }, - "GetVPCSCConfig": { - "methods": [ - "getVPCSCConfig" - ] - }, - "UpdateVPCSCConfig": { - "methods": [ - "updateVPCSCConfig" - ] - }, - "UpdatePackage": { - "methods": [ - "updatePackage" - ] - }, - "GetAttachment": { - "methods": [ - "getAttachment" - ] - }, - "ImportAptArtifacts": { - "methods": [ - "importAptArtifacts" - ] - }, - "ImportYumArtifacts": { - "methods": [ - "importYumArtifacts" - ] - }, - "CreateRepository": { - "methods": [ - "createRepository" - ] - }, - "DeleteRepository": { - "methods": [ - "deleteRepository" - ] - }, - "DeletePackage": { - "methods": [ - "deletePackage" - ] - }, - "DeleteVersion": { - "methods": [ - "deleteVersion" - ] - }, - "BatchDeleteVersions": { - "methods": [ - "batchDeleteVersions" - ] - }, - "DeleteFile": { - "methods": [ - "deleteFile" - ] - }, - "CreateAttachment": { - "methods": [ - "createAttachment" - ] - }, - "DeleteAttachment": { - "methods": [ - "deleteAttachment" - ] - }, - "ExportArtifact": { - "methods": [ - "exportArtifact" - ] - }, - "ListDockerImages": { - "methods": [ - "listDockerImages", - "listDockerImagesStream", - "listDockerImagesAsync" - ] - }, - "ListMavenArtifacts": { - "methods": [ - "listMavenArtifacts", - "listMavenArtifactsStream", - "listMavenArtifactsAsync" - ] - }, - "ListNpmPackages": { - "methods": [ - "listNpmPackages", - "listNpmPackagesStream", - "listNpmPackagesAsync" - ] - }, - "ListPythonPackages": { - "methods": [ - "listPythonPackages", - "listPythonPackagesStream", - "listPythonPackagesAsync" - ] - }, - "ListRepositories": { - "methods": [ - "listRepositories", - "listRepositoriesStream", - "listRepositoriesAsync" - ] - }, - "ListPackages": { - "methods": [ - "listPackages", - "listPackagesStream", - "listPackagesAsync" - ] - }, - "ListVersions": { - "methods": [ - "listVersions", - "listVersionsStream", - "listVersionsAsync" - ] - }, - "ListFiles": { - "methods": [ - "listFiles", - "listFilesStream", - "listFilesAsync" - ] - }, - "ListTags": { - "methods": [ - "listTags", - "listTagsStream", - "listTagsAsync" - ] - }, - "ListRules": { - "methods": [ - "listRules", - "listRulesStream", - "listRulesAsync" - ] - }, - "ListAttachments": { - "methods": [ - "listAttachments", - "listAttachmentsStream", - "listAttachmentsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "ArtifactRegistryClient", - "rpcs": { - "GetDockerImage": { - "methods": [ - "getDockerImage" - ] - }, - "GetMavenArtifact": { - "methods": [ - "getMavenArtifact" - ] - }, - "GetNpmPackage": { - "methods": [ - "getNpmPackage" - ] - }, - "GetPythonPackage": { - "methods": [ - "getPythonPackage" - ] - }, - "GetRepository": { - "methods": [ - "getRepository" - ] - }, - "UpdateRepository": { - "methods": [ - "updateRepository" - ] - }, - "GetPackage": { - "methods": [ - "getPackage" - ] - }, - "GetVersion": { - "methods": [ - "getVersion" - ] - }, - "UpdateVersion": { - "methods": [ - "updateVersion" - ] - }, - "GetFile": { - "methods": [ - "getFile" - ] - }, - "UpdateFile": { - "methods": [ - "updateFile" - ] - }, - "GetTag": { - "methods": [ - "getTag" - ] - }, - "CreateTag": { - "methods": [ - "createTag" - ] - }, - "UpdateTag": { - "methods": [ - "updateTag" - ] - }, - "DeleteTag": { - "methods": [ - "deleteTag" - ] - }, - "CreateRule": { - "methods": [ - "createRule" - ] - }, - "GetRule": { - "methods": [ - "getRule" - ] - }, - "UpdateRule": { - "methods": [ - "updateRule" - ] - }, - "DeleteRule": { - "methods": [ - "deleteRule" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "GetProjectSettings": { - "methods": [ - "getProjectSettings" - ] - }, - "UpdateProjectSettings": { - "methods": [ - "updateProjectSettings" - ] - }, - "GetVPCSCConfig": { - "methods": [ - "getVPCSCConfig" - ] - }, - "UpdateVPCSCConfig": { - "methods": [ - "updateVPCSCConfig" - ] - }, - "UpdatePackage": { - "methods": [ - "updatePackage" - ] - }, - "GetAttachment": { - "methods": [ - "getAttachment" - ] - }, - "ImportAptArtifacts": { - "methods": [ - "importAptArtifacts" - ] - }, - "ImportYumArtifacts": { - "methods": [ - "importYumArtifacts" - ] - }, - "CreateRepository": { - "methods": [ - "createRepository" - ] - }, - "DeleteRepository": { - "methods": [ - "deleteRepository" - ] - }, - "DeletePackage": { - "methods": [ - "deletePackage" - ] - }, - "DeleteVersion": { - "methods": [ - "deleteVersion" - ] - }, - "BatchDeleteVersions": { - "methods": [ - "batchDeleteVersions" - ] - }, - "DeleteFile": { - "methods": [ - "deleteFile" - ] - }, - "CreateAttachment": { - "methods": [ - "createAttachment" - ] - }, - "DeleteAttachment": { - "methods": [ - "deleteAttachment" - ] - }, - "ExportArtifact": { - "methods": [ - "exportArtifact" - ] - }, - "ListDockerImages": { - "methods": [ - "listDockerImages", - "listDockerImagesStream", - "listDockerImagesAsync" - ] - }, - "ListMavenArtifacts": { - "methods": [ - "listMavenArtifacts", - "listMavenArtifactsStream", - "listMavenArtifactsAsync" - ] - }, - "ListNpmPackages": { - "methods": [ - "listNpmPackages", - "listNpmPackagesStream", - "listNpmPackagesAsync" - ] - }, - "ListPythonPackages": { - "methods": [ - "listPythonPackages", - "listPythonPackagesStream", - "listPythonPackagesAsync" - ] - }, - "ListRepositories": { - "methods": [ - "listRepositories", - "listRepositoriesStream", - "listRepositoriesAsync" - ] - }, - "ListPackages": { - "methods": [ - "listPackages", - "listPackagesStream", - "listPackagesAsync" - ] - }, - "ListVersions": { - "methods": [ - "listVersions", - "listVersionsStream", - "listVersionsAsync" - ] - }, - "ListFiles": { - "methods": [ - "listFiles", - "listFilesStream", - "listFilesAsync" - ] - }, - "ListTags": { - "methods": [ - "listTags", - "listTagsStream", - "listTagsAsync" - ] - }, - "ListRules": { - "methods": [ - "listRules", - "listRulesStream", - "listRulesAsync" - ] - }, - "ListAttachments": { - "methods": [ - "listAttachments", - "listAttachmentsStream", - "listAttachmentsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1/index.ts b/owl-bot-staging/google-devtools-artifactregistry/src/v1/index.ts deleted file mode 100644 index 894a4a12f31..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/src/v1/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -export {ArtifactRegistryClient} from './artifact_registry_client'; diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts deleted file mode 100644 index d4c58eca6d0..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts +++ /dev/null @@ -1,4020 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; - -/** - * Client JSON configuration object, loaded from - * `src/v1beta2/artifact_registry_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './artifact_registry_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The Artifact Registry API service. - * - * Artifact Registry is an artifact management system for storing artifacts - * from different package management systems. - * - * The resources managed by this API are: - * - * * Repositories, which group packages and their data. - * * Packages, which group versions and their tags. - * * Versions, which are specific forms of a package. - * * Tags, which represent alternative names for versions. - * * Files, which contain content and are optionally associated with a Package - * or Version. - * @class - * @memberof v1beta2 - */ -export class ArtifactRegistryClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - private _universeDomain: string; - private _servicePath: string; - private _log = logging.log('artifact-registry'); - - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - artifactRegistryStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of ArtifactRegistryClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new ArtifactRegistryClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof ArtifactRegistryClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'artifactregistry.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - 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, - // (e.g. 50 results at a time, with tokens to get subsequent - // pages). Denote the keys used for pagination and results. - this.descriptors.page = { - listRepositories: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'repositories'), - listPackages: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'packages'), - listVersions: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'versions'), - listFiles: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'files'), - listTags: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'tags') - }; - - const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - const lroOptions: GrpcClientOptions = { - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }; - if (opts.fallback) { - lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1beta2/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1beta2/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1beta2/{name=projects/*/locations/*/operations/*}',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).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; - const createRepositoryMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1beta2.OperationMetadata') as gax.protobuf.Type; - const deleteRepositoryResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteRepositoryMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1beta2.OperationMetadata') as gax.protobuf.Type; - const deletePackageResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deletePackageMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1beta2.OperationMetadata') as gax.protobuf.Type; - const deleteVersionResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteVersionMetadata = protoFilesRoot.lookup( - '.google.devtools.artifactregistry.v1beta2.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - importAptArtifacts: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - importAptArtifactsResponse.decode.bind(importAptArtifactsResponse), - importAptArtifactsMetadata.decode.bind(importAptArtifactsMetadata)), - importYumArtifacts: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - importYumArtifactsResponse.decode.bind(importYumArtifactsResponse), - importYumArtifactsMetadata.decode.bind(importYumArtifactsMetadata)), - createRepository: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createRepositoryResponse.decode.bind(createRepositoryResponse), - createRepositoryMetadata.decode.bind(createRepositoryMetadata)), - deleteRepository: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteRepositoryResponse.decode.bind(deleteRepositoryResponse), - deleteRepositoryMetadata.decode.bind(deleteRepositoryMetadata)), - deletePackage: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deletePackageResponse.decode.bind(deletePackageResponse), - deletePackageMetadata.decode.bind(deletePackageMetadata)), - deleteVersion: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteVersionResponse.decode.bind(deleteVersionResponse), - deleteVersionMetadata.decode.bind(deleteVersionMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.devtools.artifactregistry.v1beta2.ArtifactRegistry', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.artifactRegistryStub) { - return this.artifactRegistryStub; - } - - // Put together the "service stub" for - // google.devtools.artifactregistry.v1beta2.ArtifactRegistry. - this.artifactRegistryStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.devtools.artifactregistry.v1beta2.ArtifactRegistry') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.devtools.artifactregistry.v1beta2.ArtifactRegistry, - this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const artifactRegistryStubMethods = - ['importAptArtifacts', 'importYumArtifacts', 'listRepositories', 'getRepository', 'createRepository', 'updateRepository', 'deleteRepository', 'listPackages', 'getPackage', 'deletePackage', 'listVersions', 'getVersion', 'deleteVersion', 'listFiles', 'getFile', 'listTags', 'getTag', 'createTag', 'updateTag', 'deleteTag', 'setIamPolicy', 'getIamPolicy', 'testIamPermissions', 'getProjectSettings', 'updateProjectSettings']; - for (const methodName of artifactRegistryStubMethods) { - const callPromise = this.artifactRegistryStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - this.descriptors.page[methodName] || - this.descriptors.longrunning[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.artifactRegistryStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'artifactregistry.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'artifactregistry.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only' - ]; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId(callback?: Callback): - Promise|void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- -/** - * Gets a repository. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * 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. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Repository|Repository}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.get_repository.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_async - */ - getRepository( - request?: protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|undefined, {}|undefined - ]>; - getRepository( - request: protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|null|undefined, - {}|null|undefined>): void; - getRepository( - request: protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|null|undefined, - {}|null|undefined>): void; - getRepository( - request?: protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getRepository request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getRepository response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getRepository(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest|undefined, - {}|undefined - ]) => { - this._log.info('getRepository response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Updates a repository. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.devtools.artifactregistry.v1beta2.Repository} request.repository - * The repository that replaces the resource on the server. - * @param {google.protobuf.FieldMask} request.updateMask - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Repository|Repository}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.update_repository.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_async - */ - updateRepository( - request?: protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|undefined, {}|undefined - ]>; - updateRepository( - request: protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|null|undefined, - {}|null|undefined>): void; - updateRepository( - request: protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|null|undefined, - {}|null|undefined>): void; - updateRepository( - request?: protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'repository.name': request.repository!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('updateRepository request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('updateRepository response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.updateRepository(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1beta2.IRepository, - protos.google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest|undefined, - {}|undefined - ]) => { - this._log.info('updateRepository response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets a package. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the package to retrieve. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Package|Package}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.get_package.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_async - */ - getPackage( - request?: protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IPackage, - protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|undefined, {}|undefined - ]>; - getPackage( - request: protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IPackage, - protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|null|undefined, - {}|null|undefined>): void; - getPackage( - request: protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IPackage, - protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|null|undefined, - {}|null|undefined>): void; - getPackage( - request?: protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1beta2.IPackage, - protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1beta2.IPackage, - protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IPackage, - protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getPackage request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IPackage, - protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getPackage response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getPackage(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1beta2.IPackage, - protos.google.devtools.artifactregistry.v1beta2.IGetPackageRequest|undefined, - {}|undefined - ]) => { - this._log.info('getPackage response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets a version - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the version to retrieve. - * @param {google.devtools.artifactregistry.v1beta2.VersionView} request.view - * The view that should be returned in the response. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Version|Version}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.get_version.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_async - */ - getVersion( - request?: protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IVersion, - protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|undefined, {}|undefined - ]>; - getVersion( - request: protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IVersion, - protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|null|undefined, - {}|null|undefined>): void; - getVersion( - request: protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IVersion, - protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|null|undefined, - {}|null|undefined>): void; - getVersion( - request?: protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1beta2.IVersion, - protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1beta2.IVersion, - protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IVersion, - protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getVersion request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IVersion, - protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getVersion response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getVersion(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1beta2.IVersion, - protos.google.devtools.artifactregistry.v1beta2.IGetVersionRequest|undefined, - {}|undefined - ]) => { - this._log.info('getVersion response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets a file. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the file to retrieve. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.File|File}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.get_file.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_async - */ - getFile( - request?: protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IFile, - protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|undefined, {}|undefined - ]>; - getFile( - request: protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IFile, - protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|null|undefined, - {}|null|undefined>): void; - getFile( - request: protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IFile, - protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|null|undefined, - {}|null|undefined>): void; - getFile( - request?: protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1beta2.IFile, - protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1beta2.IFile, - protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IFile, - protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getFile request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IFile, - protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getFile response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getFile(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1beta2.IFile, - protos.google.devtools.artifactregistry.v1beta2.IGetFileRequest|undefined, - {}|undefined - ]) => { - this._log.info('getFile response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets a tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the tag to retrieve. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Tag|Tag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.get_tag.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_async - */ - getTag( - request?: protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|undefined, {}|undefined - ]>; - getTag( - request: protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|null|undefined, - {}|null|undefined>): void; - getTag( - request: protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|null|undefined, - {}|null|undefined>): void; - getTag( - request?: protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getTag request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getTag response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getTag(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IGetTagRequest|undefined, - {}|undefined - ]) => { - this._log.info('getTag response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Creates a tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent resource where the tag will be created. - * @param {string} request.tagId - * The tag id to use for this repository. - * @param {google.devtools.artifactregistry.v1beta2.Tag} request.tag - * The tag to be created. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Tag|Tag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.create_tag.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_async - */ - createTag( - request?: protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|undefined, {}|undefined - ]>; - createTag( - request: protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|null|undefined, - {}|null|undefined>): void; - createTag( - request: protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|null|undefined, - {}|null|undefined>): void; - createTag( - request?: protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('createTag request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('createTag response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.createTag(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.ICreateTagRequest|undefined, - {}|undefined - ]) => { - this._log.info('createTag response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Updates a tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.devtools.artifactregistry.v1beta2.Tag} request.tag - * The tag that replaces the resource on the server. - * @param {google.protobuf.FieldMask} request.updateMask - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Tag|Tag}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.update_tag.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_async - */ - updateTag( - request?: protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|undefined, {}|undefined - ]>; - updateTag( - request: protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|null|undefined, - {}|null|undefined>): void; - updateTag( - request: protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, - callback: Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|null|undefined, - {}|null|undefined>): void; - updateTag( - request?: protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'tag.name': request.tag!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('updateTag request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('updateTag response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.updateTag(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1beta2.ITag, - protos.google.devtools.artifactregistry.v1beta2.IUpdateTagRequest|undefined, - {}|undefined - ]) => { - this._log.info('updateTag response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Deletes a tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the tag to delete. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.delete_tag.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_async - */ - deleteTag( - request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|undefined, {}|undefined - ]>; - deleteTag( - request: protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|null|undefined, - {}|null|undefined>): void; - deleteTag( - request: protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|null|undefined, - {}|null|undefined>): void; - deleteTag( - request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('deleteTag request %j', request); - const wrappedCallback: Callback< - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('deleteTag response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.deleteTag(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.protobuf.IEmpty, - protos.google.devtools.artifactregistry.v1beta2.IDeleteTagRequest|undefined, - {}|undefined - ]) => { - this._log.info('deleteTag response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Updates the IAM policy for a given resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.Policy} request.policy - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param {google.protobuf.FieldMask} request.updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.set_iam_policy.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_async - */ - setIamPolicy( - request?: protos.google.iam.v1.ISetIamPolicyRequest, - options?: CallOptions): - Promise<[ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined - ]>; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, - {}|null|undefined>): void; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, - {}|null|undefined>): void; - setIamPolicy( - request?: protos.google.iam.v1.ISetIamPolicyRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'resource': request.resource ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('setIamPolicy request %j', request); - const wrappedCallback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('setIamPolicy response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.setIamPolicy(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest|undefined, - {}|undefined - ]) => { - this._log.info('setIamPolicy response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets the IAM policy for a given resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.GetPolicyOptions} request.options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.get_iam_policy.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_async - */ - getIamPolicy( - request?: protos.google.iam.v1.IGetIamPolicyRequest, - options?: CallOptions): - Promise<[ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined - ]>; - getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, - {}|null|undefined>): void; - getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, - {}|null|undefined>): void; - getIamPolicy( - request?: protos.google.iam.v1.IGetIamPolicyRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'resource': request.resource ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getIamPolicy request %j', request); - const wrappedCallback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getIamPolicy response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getIamPolicy(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest|undefined, - {}|undefined - ]) => { - this._log.info('getIamPolicy response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Tests if the caller has a list of permissions on a resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.test_iam_permissions.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_async - */ - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: CallOptions): - Promise<[ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined - ]>; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): void; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): void; - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'resource': request.resource ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('testIamPermissions request %j', request); - const wrappedCallback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('testIamPermissions response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.testIamPermissions(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|undefined, - {}|undefined - ]) => { - this._log.info('testIamPermissions response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * 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 {@link protos.google.devtools.artifactregistry.v1beta2.ProjectSettings|ProjectSettings}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getProjectSettings request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, - protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getProjectSettings response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getProjectSettings(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, - protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest|undefined, - {}|undefined - ]) => { - this._log.info('getProjectSettings response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * 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 {@link protos.google.devtools.artifactregistry.v1beta2.ProjectSettings|ProjectSettings}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'project_settings.name': request.projectSettings!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('updateProjectSettings request %j', request); - const wrappedCallback: Callback< - protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, - protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('updateProjectSettings response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.updateProjectSettings(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, - protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest|undefined, - {}|undefined - ]) => { - this._log.info('updateProjectSettings response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } - -/** - * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * 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.longrunning.IOperation|undefined, {}|undefined - ]>; - importAptArtifacts( - request: protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - importAptArtifacts( - request: protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - importAptArtifacts( - request?: protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('importAptArtifacts response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('importAptArtifacts request %j', request); - return this.innerApiCalls.importAptArtifacts(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('importAptArtifacts response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * 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>{ - this._log.info('importAptArtifacts long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importAptArtifacts, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * 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.longrunning.IOperation|undefined, {}|undefined - ]>; - importYumArtifacts( - request: protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - importYumArtifacts( - request: protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - importYumArtifacts( - request?: protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('importYumArtifacts response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('importYumArtifacts request %j', request); - return this.innerApiCalls.importYumArtifacts(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('importYumArtifacts response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * 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>{ - this._log.info('importYumArtifacts long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importYumArtifacts, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a repository. The returned Operation will finish once the - * repository has been created. Its response will be the created Repository. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource where the repository will be created. - * @param {string} request.repositoryId - * The repository id to use for this repository. - * @param {google.devtools.artifactregistry.v1beta2.Repository} request.repository - * The repository to be created. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.create_repository.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_async - */ - createRepository( - request?: protos.google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createRepository( - request: protos.google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createRepository( - request: protos.google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createRepository( - request?: protos.google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createRepository response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createRepository request %j', request); - return this.innerApiCalls.createRepository(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createRepository response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createRepository()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.create_repository.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_async - */ - async checkCreateRepositoryProgress(name: string): Promise>{ - this._log.info('createRepository long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createRepository, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a repository and all of its contents. The returned Operation will - * finish once the repository has been deleted. It will not have any Operation - * metadata and will return a google.protobuf.Empty response. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the repository to delete. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.delete_repository.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_async - */ - deleteRepository( - request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteRepository( - request: protos.google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteRepository( - request: protos.google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteRepository( - request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteRepository response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteRepository request %j', request); - return this.innerApiCalls.deleteRepository(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteRepository response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteRepository()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.delete_repository.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_async - */ - async checkDeleteRepositoryProgress(name: string): Promise>{ - this._log.info('deleteRepository long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteRepository, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a package and all of its versions and tags. The returned operation - * will complete once the package has been deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the package to delete. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.delete_package.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_async - */ - deletePackage( - request?: protos.google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deletePackage( - request: protos.google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deletePackage( - request: protos.google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deletePackage( - request?: protos.google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deletePackage response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deletePackage request %j', request); - return this.innerApiCalls.deletePackage(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deletePackage response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deletePackage()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.delete_package.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_async - */ - async checkDeletePackageProgress(name: string): Promise>{ - this._log.info('deletePackage long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deletePackage, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a version and all of its content. The returned operation will - * complete once the version has been deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the version to delete. - * @param {boolean} request.force - * By default, a version that is tagged may not be deleted. If force=true, the - * version and any tags pointing to the version are deleted. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.delete_version.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_async - */ - deleteVersion( - request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteVersion( - request: protos.google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteVersion( - request: protos.google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteVersion( - request?: protos.google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteVersion response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteVersion request %j', request); - return this.innerApiCalls.deleteVersion(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteVersion response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteVersion()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.delete_version.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_async - */ - async checkDeleteVersionProgress(name: string): Promise>{ - this._log.info('deleteVersion long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteVersion, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists repositories. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose repositories will be listed. - * @param {number} request.pageSize - * The maximum number of repositories to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1beta2.Repository|Repository}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listRepositoriesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listRepositories( - request?: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IRepository[], - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse - ]>; - listRepositories( - request: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IRepository>): void; - listRepositories( - request: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IRepository>): void; - listRepositories( - request?: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IRepository>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IRepository>): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IRepository[], - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IRepository>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listRepositories values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listRepositories request %j', request); - return this.innerApiCalls - .listRepositories(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1beta2.IRepository[], - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse - ]) => { - this._log.info('listRepositories values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listRepositories`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose repositories will be listed. - * @param {number} request.pageSize - * The maximum number of repositories to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Repository|Repository} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listRepositoriesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listRepositoriesStream( - request?: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listRepositories']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listRepositories stream %j', request); - return this.descriptors.page.listRepositories.createStream( - this.innerApiCalls.listRepositories as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listRepositories`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose repositories will be listed. - * @param {number} request.pageSize - * The maximum number of repositories to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1beta2.Repository|Repository}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.list_repositories.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_async - */ - listRepositoriesAsync( - request?: protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listRepositories']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listRepositories iterate %j', request); - return this.descriptors.page.listRepositories.asyncIterate( - this.innerApiCalls['listRepositories'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists packages. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent resource whose packages will be listed. - * @param {number} request.pageSize - * The maximum number of packages to return. - * Maximum page size is 10,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1beta2.Package|Package}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listPackagesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listPackages( - request?: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IPackage[], - protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse - ]>; - listPackages( - request: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IPackage>): void; - listPackages( - request: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IPackage>): void; - listPackages( - request?: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IPackage>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IPackage>): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IPackage[], - protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IPackage>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listPackages values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listPackages request %j', request); - return this.innerApiCalls - .listPackages(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1beta2.IPackage[], - protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListPackagesResponse - ]) => { - this._log.info('listPackages values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listPackages`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent resource whose packages will be listed. - * @param {number} request.pageSize - * The maximum number of packages to return. - * Maximum page size is 10,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Package|Package} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listPackagesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listPackagesStream( - request?: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listPackages']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listPackages stream %j', request); - return this.descriptors.page.listPackages.createStream( - this.innerApiCalls.listPackages as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listPackages`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent resource whose packages will be listed. - * @param {number} request.pageSize - * The maximum number of packages to return. - * Maximum page size is 10,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1beta2.Package|Package}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.list_packages.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_async - */ - listPackagesAsync( - request?: protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listPackages']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listPackages iterate %j', request); - return this.descriptors.page.listPackages.asyncIterate( - this.innerApiCalls['listPackages'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists versions. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent resource whose versions will be listed. - * @param {number} request.pageSize - * The maximum number of versions to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {google.devtools.artifactregistry.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. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1beta2.Version|Version}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listVersionsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listVersions( - request?: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IVersion[], - protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse - ]>; - listVersions( - request: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, - protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IVersion>): void; - listVersions( - request: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, - protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IVersion>): void; - listVersions( - request?: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, - protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IVersion>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, - protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IVersion>): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IVersion[], - protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, - protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IVersion>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listVersions values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listVersions request %j', request); - return this.innerApiCalls - .listVersions(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1beta2.IVersion[], - protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListVersionsResponse - ]) => { - this._log.info('listVersions values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listVersions`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent resource whose versions will be listed. - * @param {number} request.pageSize - * The maximum number of versions to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {google.devtools.artifactregistry.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} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Version|Version} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listVersionsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listVersionsStream( - request?: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listVersions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listVersions stream %j', request); - return this.descriptors.page.listVersions.createStream( - this.innerApiCalls.listVersions as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listVersions`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent resource whose versions will be listed. - * @param {number} request.pageSize - * The maximum number of versions to return. Maximum page size is 1,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {google.devtools.artifactregistry.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} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1beta2.Version|Version}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.list_versions.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_async - */ - listVersionsAsync( - request?: protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listVersions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listVersions iterate %j', request); - return this.descriptors.page.listVersions.asyncIterate( - this.innerApiCalls['listVersions'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists files. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the repository whose files will be listed. For example: - * "projects/p1/locations/us-central1/repositories/repo1 - * @param {string} request.filter - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `owner` - * - * An example of using a filter: - * - * * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an - * ID starting with "a/b/". - * * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> - * Files owned by the version `1.0` in package `pkg1`. - * @param {number} request.pageSize - * The maximum number of files to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1beta2.File|File}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listFilesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listFiles( - request?: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IFile[], - protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse - ]>; - listFiles( - request: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IFile>): void; - listFiles( - request: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IFile>): void; - listFiles( - request?: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IFile>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IFile>): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.IFile[], - protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, - protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.IFile>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listFiles values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listFiles request %j', request); - return this.innerApiCalls - .listFiles(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1beta2.IFile[], - protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListFilesResponse - ]) => { - this._log.info('listFiles values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listFiles`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the repository whose files will be listed. For example: - * "projects/p1/locations/us-central1/repositories/repo1 - * @param {string} request.filter - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `owner` - * - * An example of using a filter: - * - * * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an - * ID starting with "a/b/". - * * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> - * Files owned by the version `1.0` in package `pkg1`. - * @param {number} request.pageSize - * The maximum number of files to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1beta2.File|File} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listFilesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listFilesStream( - request?: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFiles']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFiles stream %j', request); - return this.descriptors.page.listFiles.createStream( - this.innerApiCalls.listFiles as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listFiles`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the repository whose files will be listed. For example: - * "projects/p1/locations/us-central1/repositories/repo1 - * @param {string} request.filter - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * - * * `name` - * * `owner` - * - * An example of using a filter: - * - * * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an - * ID starting with "a/b/". - * * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> - * Files owned by the version `1.0` in package `pkg1`. - * @param {number} request.pageSize - * The maximum number of files to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1beta2.File|File}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.list_files.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_async - */ - listFilesAsync( - request?: protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFiles']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFiles iterate %j', request); - return this.descriptors.page.listFiles.asyncIterate( - this.innerApiCalls['listFiles'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists tags. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent resource whose tags will be listed. - * @param {string} request.filter - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * - * * `version` - * - * An example of using a filter: - * - * * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` - * --> Tags that are applied to the version `1.0` in package `pkg1`. - * @param {number} request.pageSize - * The maximum number of tags to return. Maximum page size is 10,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.devtools.artifactregistry.v1beta2.Tag|Tag}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listTagsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listTags( - request?: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, - options?: CallOptions): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.ITag[], - protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse - ]>; - listTags( - request: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, - protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.ITag>): void; - listTags( - request: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, - protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.ITag>): void; - listTags( - request?: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, - protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.ITag>, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, - protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.ITag>): - Promise<[ - protos.google.devtools.artifactregistry.v1beta2.ITag[], - protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, - protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse|null|undefined, - protos.google.devtools.artifactregistry.v1beta2.ITag>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listTags values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listTags request %j', request); - return this.innerApiCalls - .listTags(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.devtools.artifactregistry.v1beta2.ITag[], - protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest|null, - protos.google.devtools.artifactregistry.v1beta2.IListTagsResponse - ]) => { - this._log.info('listTags values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listTags`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent resource whose tags will be listed. - * @param {string} request.filter - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * - * * `version` - * - * An example of using a filter: - * - * * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` - * --> Tags that are applied to the version `1.0` in package `pkg1`. - * @param {number} request.pageSize - * The maximum number of tags to return. Maximum page size is 10,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.devtools.artifactregistry.v1beta2.Tag|Tag} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listTagsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listTagsStream( - request?: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listTags']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listTags stream %j', request); - return this.descriptors.page.listTags.createStream( - this.innerApiCalls.listTags as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listTags`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The name of the parent resource whose tags will be listed. - * @param {string} request.filter - * An expression for filtering the results of the request. Filter rules are - * case insensitive. The fields eligible for filtering are: - * - * * `version` - * - * An example of using a filter: - * - * * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` - * --> Tags that are applied to the version `1.0` in package `pkg1`. - * @param {number} request.pageSize - * The maximum number of tags to return. Maximum page size is 10,000. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.devtools.artifactregistry.v1beta2.Tag|Tag}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta2/artifact_registry.list_tags.js - * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_async - */ - listTagsAsync( - request?: protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listTags']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listTags iterate %j', request); - return this.descriptors.page.listTags.asyncIterate( - this.innerApiCalls['listTags'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * Gets information about a location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Resource name for the location. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example - * ``` - * const [response] = await client.getLocation(request); - * ``` - */ - getLocation( - request: LocationProtos.google.cloud.location.IGetLocationRequest, - options?: - | gax.CallOptions - | Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - > - ): Promise { - return this.locationsClient.getLocation(request, options, callback); - } - -/** - * Lists information about the supported locations for this service. Returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource that owns the locations collection, if applicable. - * @param {string} request.filter - * The standard list filter. - * @param {number} request.pageSize - * The standard list page size. - * @param {string} request.pageToken - * The standard list page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example - * ``` - * const iterable = client.listLocationsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` - */ - listLocationsAsync( - request: LocationProtos.google.cloud.location.IListLocationsRequest, - options?: CallOptions - ): AsyncIterable { - return this.locationsClient.listLocationsAsync(request, options); - } - - // -------------------- - // -- 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. - * - * @param {string} project - * @param {string} location - * @param {string} repository - * @param {string} file - * @returns {string} Resource name string. - */ - filePath(project:string,location:string,repository:string,file:string) { - return this.pathTemplates.filePathTemplate.render({ - project: project, - location: location, - repository: repository, - file: file, - }); - } - - /** - * Parse the project from File resource. - * - * @param {string} fileName - * A fully-qualified path representing File resource. - * @returns {string} A string representing the project. - */ - matchProjectFromFileName(fileName: string) { - return this.pathTemplates.filePathTemplate.match(fileName).project; - } - - /** - * Parse the location from File resource. - * - * @param {string} fileName - * A fully-qualified path representing File resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFileName(fileName: string) { - return this.pathTemplates.filePathTemplate.match(fileName).location; - } - - /** - * Parse the repository from File resource. - * - * @param {string} fileName - * A fully-qualified path representing File resource. - * @returns {string} A string representing the repository. - */ - matchRepositoryFromFileName(fileName: string) { - return this.pathTemplates.filePathTemplate.match(fileName).repository; - } - - /** - * Parse the file from File resource. - * - * @param {string} fileName - * A fully-qualified path representing File resource. - * @returns {string} A string representing the file. - */ - matchFileFromFileName(fileName: string) { - return this.pathTemplates.filePathTemplate.match(fileName).file; - } - - /** - * Return a fully-qualified projectSettings resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectSettingsPath(project:string) { - return this.pathTemplates.projectSettingsPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from ProjectSettings resource. - * - * @param {string} projectSettingsName - * A fully-qualified path representing ProjectSettings resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectSettingsName(projectSettingsName: string) { - return this.pathTemplates.projectSettingsPathTemplate.match(projectSettingsName).project; - } - - /** - * Return a fully-qualified repository resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} repository - * @returns {string} Resource name string. - */ - repositoryPath(project:string,location:string,repository:string) { - return this.pathTemplates.repositoryPathTemplate.render({ - project: project, - location: location, - repository: repository, - }); - } - - /** - * Parse the project from Repository resource. - * - * @param {string} repositoryName - * A fully-qualified path representing Repository resource. - * @returns {string} A string representing the project. - */ - matchProjectFromRepositoryName(repositoryName: string) { - return this.pathTemplates.repositoryPathTemplate.match(repositoryName).project; - } - - /** - * Parse the location from Repository resource. - * - * @param {string} repositoryName - * A fully-qualified path representing Repository resource. - * @returns {string} A string representing the location. - */ - matchLocationFromRepositoryName(repositoryName: string) { - return this.pathTemplates.repositoryPathTemplate.match(repositoryName).location; - } - - /** - * Parse the repository from Repository resource. - * - * @param {string} repositoryName - * A fully-qualified path representing Repository resource. - * @returns {string} A string representing the repository. - */ - matchRepositoryFromRepositoryName(repositoryName: string) { - return this.pathTemplates.repositoryPathTemplate.match(repositoryName).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. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.artifactRegistryStub && !this._terminated) { - return this.artifactRegistryStub.then(stub => { - this._log.info('ending gRPC channel'); - this._terminated = true; - stub.close(); - this.locationsClient.close().catch(err => {throw err}); - void this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client_config.json b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client_config.json deleted file mode 100644 index 6d2c27103c7..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client_config.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "interfaces": { - "google.devtools.artifactregistry.v1beta2.ArtifactRegistry": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "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", - "retry_params_name": "default" - }, - "GetRepository": { - "timeout_millis": 30000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "CreateRepository": { - "timeout_millis": 30000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateRepository": { - "timeout_millis": 30000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteRepository": { - "timeout_millis": 30000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "ListPackages": { - "timeout_millis": 30000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "GetPackage": { - "timeout_millis": 30000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "DeletePackage": { - "timeout_millis": 30000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "ListVersions": { - "timeout_millis": 30000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "GetVersion": { - "timeout_millis": 30000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "DeleteVersion": { - "timeout_millis": 30000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "ListFiles": { - "timeout_millis": 30000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "GetFile": { - "timeout_millis": 30000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "ListTags": { - "timeout_millis": 30000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "GetTag": { - "timeout_millis": 30000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "CreateTag": { - "timeout_millis": 30000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateTag": { - "timeout_millis": 30000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteTag": { - "timeout_millis": 30000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "timeout_millis": 30000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "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/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_proto_list.json b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_proto_list.json deleted file mode 100644 index f32513655ac..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/artifact_registry_proto_list.json +++ /dev/null @@ -1,11 +0,0 @@ -[ - "../../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/yum_artifact.proto" -] diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/gapic_metadata.json b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/gapic_metadata.json deleted file mode 100644 index a4830e36e2c..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/gapic_metadata.json +++ /dev/null @@ -1,293 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.devtools.artifactregistry.v1beta2", - "libraryPackage": "@google-cloud/artifact-registry", - "services": { - "ArtifactRegistry": { - "clients": { - "grpc": { - "libraryClient": "ArtifactRegistryClient", - "rpcs": { - "GetRepository": { - "methods": [ - "getRepository" - ] - }, - "UpdateRepository": { - "methods": [ - "updateRepository" - ] - }, - "GetPackage": { - "methods": [ - "getPackage" - ] - }, - "GetVersion": { - "methods": [ - "getVersion" - ] - }, - "GetFile": { - "methods": [ - "getFile" - ] - }, - "GetTag": { - "methods": [ - "getTag" - ] - }, - "CreateTag": { - "methods": [ - "createTag" - ] - }, - "UpdateTag": { - "methods": [ - "updateTag" - ] - }, - "DeleteTag": { - "methods": [ - "deleteTag" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "GetProjectSettings": { - "methods": [ - "getProjectSettings" - ] - }, - "UpdateProjectSettings": { - "methods": [ - "updateProjectSettings" - ] - }, - "ImportAptArtifacts": { - "methods": [ - "importAptArtifacts" - ] - }, - "ImportYumArtifacts": { - "methods": [ - "importYumArtifacts" - ] - }, - "CreateRepository": { - "methods": [ - "createRepository" - ] - }, - "DeleteRepository": { - "methods": [ - "deleteRepository" - ] - }, - "DeletePackage": { - "methods": [ - "deletePackage" - ] - }, - "DeleteVersion": { - "methods": [ - "deleteVersion" - ] - }, - "ListRepositories": { - "methods": [ - "listRepositories", - "listRepositoriesStream", - "listRepositoriesAsync" - ] - }, - "ListPackages": { - "methods": [ - "listPackages", - "listPackagesStream", - "listPackagesAsync" - ] - }, - "ListVersions": { - "methods": [ - "listVersions", - "listVersionsStream", - "listVersionsAsync" - ] - }, - "ListFiles": { - "methods": [ - "listFiles", - "listFilesStream", - "listFilesAsync" - ] - }, - "ListTags": { - "methods": [ - "listTags", - "listTagsStream", - "listTagsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "ArtifactRegistryClient", - "rpcs": { - "GetRepository": { - "methods": [ - "getRepository" - ] - }, - "UpdateRepository": { - "methods": [ - "updateRepository" - ] - }, - "GetPackage": { - "methods": [ - "getPackage" - ] - }, - "GetVersion": { - "methods": [ - "getVersion" - ] - }, - "GetFile": { - "methods": [ - "getFile" - ] - }, - "GetTag": { - "methods": [ - "getTag" - ] - }, - "CreateTag": { - "methods": [ - "createTag" - ] - }, - "UpdateTag": { - "methods": [ - "updateTag" - ] - }, - "DeleteTag": { - "methods": [ - "deleteTag" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "GetProjectSettings": { - "methods": [ - "getProjectSettings" - ] - }, - "UpdateProjectSettings": { - "methods": [ - "updateProjectSettings" - ] - }, - "ImportAptArtifacts": { - "methods": [ - "importAptArtifacts" - ] - }, - "ImportYumArtifacts": { - "methods": [ - "importYumArtifacts" - ] - }, - "CreateRepository": { - "methods": [ - "createRepository" - ] - }, - "DeleteRepository": { - "methods": [ - "deleteRepository" - ] - }, - "DeletePackage": { - "methods": [ - "deletePackage" - ] - }, - "DeleteVersion": { - "methods": [ - "deleteVersion" - ] - }, - "ListRepositories": { - "methods": [ - "listRepositories", - "listRepositoriesStream", - "listRepositoriesAsync" - ] - }, - "ListPackages": { - "methods": [ - "listPackages", - "listPackagesStream", - "listPackagesAsync" - ] - }, - "ListVersions": { - "methods": [ - "listVersions", - "listVersionsStream", - "listVersionsAsync" - ] - }, - "ListFiles": { - "methods": [ - "listFiles", - "listFilesStream", - "listFilesAsync" - ] - }, - "ListTags": { - "methods": [ - "listTags", - "listTagsStream", - "listTagsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/index.ts b/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/index.ts deleted file mode 100644 index 894a4a12f31..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/src/v1beta2/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -export {ArtifactRegistryClient} from './artifact_registry_client'; diff --git a/owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 417a351c302..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2025 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. ** - - -/* eslint-disable node/no-missing-require, no-unused-vars */ -const artifactregistry = require('@google-cloud/artifact-registry'); - -function main() { - const artifactRegistryClient = new artifactregistry.ArtifactRegistryClient(); -} - -main(); diff --git a/owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 238bfff2d60..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {ArtifactRegistryClient} from '@google-cloud/artifact-registry'; - -// check that the client class type name can be used -function doStuffWithArtifactRegistryClient(client: ArtifactRegistryClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const artifactRegistryClient = new ArtifactRegistryClient(); - doStuffWithArtifactRegistryClient(artifactRegistryClient); -} - -main(); diff --git a/owl-bot-staging/google-devtools-artifactregistry/system-test/install.ts b/owl-bot-staging/google-devtools-artifactregistry/system-test/install.ts deleted file mode 100644 index 2a505d6df0c..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; - -describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } - }; - await packNTest(options); - }); - - it('JavaScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts b/owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts deleted file mode 100644 index 1b725ff38f3..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts +++ /dev/null @@ -1,9086 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as artifactregistryModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1.ArtifactRegistryClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'artifactregistry.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = artifactregistryModule.v1.ArtifactRegistryClient.servicePath; - assert.strictEqual(servicePath, 'artifactregistry.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = artifactregistryModule.v1.ArtifactRegistryClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'artifactregistry.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'artifactregistry.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'artifactregistry.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new artifactregistryModule.v1.ArtifactRegistryClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'artifactregistry.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'artifactregistry.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new artifactregistryModule.v1.ArtifactRegistryClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = artifactregistryModule.v1.ArtifactRegistryClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.artifactRegistryStub, undefined); - await client.initialize(); - assert(client.artifactRegistryStub); - }); - - 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.initialize().catch(err => {throw err}); - assert(client.artifactRegistryStub); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - 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(); - }).catch(err => {throw err}); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error|null, projectId?: string|null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); - }); - }); - - describe('getDockerImage', () => { - it('invokes getDockerImage without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetDockerImageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DockerImage() - ); - client.innerApiCalls.getDockerImage = stubSimpleCall(expectedResponse); - const [response] = await client.getDockerImage(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDockerImage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDockerImage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDockerImage without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetDockerImageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DockerImage() - ); - client.innerApiCalls.getDockerImage = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getDockerImage( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IDockerImage|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDockerImage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDockerImage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDockerImage with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetDockerImageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getDockerImage = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getDockerImage(request), expectedError); - const actualRequest = (client.innerApiCalls.getDockerImage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDockerImage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDockerImage with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetDockerImageRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getDockerImage(request), expectedError); - }); - }); - - describe('getMavenArtifact', () => { - it('invokes getMavenArtifact without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetMavenArtifactRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetMavenArtifactRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.MavenArtifact() - ); - client.innerApiCalls.getMavenArtifact = stubSimpleCall(expectedResponse); - const [response] = await client.getMavenArtifact(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getMavenArtifact as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getMavenArtifact as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMavenArtifact without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetMavenArtifactRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetMavenArtifactRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.MavenArtifact() - ); - client.innerApiCalls.getMavenArtifact = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getMavenArtifact( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IMavenArtifact|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getMavenArtifact as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getMavenArtifact as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMavenArtifact with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetMavenArtifactRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetMavenArtifactRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getMavenArtifact = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getMavenArtifact(request), expectedError); - const actualRequest = (client.innerApiCalls.getMavenArtifact as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getMavenArtifact as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMavenArtifact with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetMavenArtifactRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetMavenArtifactRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getMavenArtifact(request), expectedError); - }); - }); - - describe('getNpmPackage', () => { - it('invokes getNpmPackage without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetNpmPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetNpmPackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.NpmPackage() - ); - client.innerApiCalls.getNpmPackage = stubSimpleCall(expectedResponse); - const [response] = await client.getNpmPackage(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getNpmPackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getNpmPackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getNpmPackage without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetNpmPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetNpmPackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.NpmPackage() - ); - client.innerApiCalls.getNpmPackage = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getNpmPackage( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.INpmPackage|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getNpmPackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getNpmPackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getNpmPackage with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetNpmPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetNpmPackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getNpmPackage = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getNpmPackage(request), expectedError); - const actualRequest = (client.innerApiCalls.getNpmPackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getNpmPackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getNpmPackage with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetNpmPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetNpmPackageRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getNpmPackage(request), expectedError); - }); - }); - - describe('getPythonPackage', () => { - it('invokes getPythonPackage without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetPythonPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPythonPackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.PythonPackage() - ); - client.innerApiCalls.getPythonPackage = stubSimpleCall(expectedResponse); - const [response] = await client.getPythonPackage(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPythonPackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPythonPackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPythonPackage without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetPythonPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPythonPackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.PythonPackage() - ); - client.innerApiCalls.getPythonPackage = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getPythonPackage( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IPythonPackage|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPythonPackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPythonPackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPythonPackage with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetPythonPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPythonPackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getPythonPackage = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getPythonPackage(request), expectedError); - const actualRequest = (client.innerApiCalls.getPythonPackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPythonPackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPythonPackage with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetPythonPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPythonPackageRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getPythonPackage(request), expectedError); - }); - }); - - describe('getRepository', () => { - it('invokes getRepository without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() - ); - client.innerApiCalls.getRepository = stubSimpleCall(expectedResponse); - const [response] = await client.getRepository(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRepository without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() - ); - client.innerApiCalls.getRepository = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getRepository( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IRepository|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRepository with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getRepository = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getRepository(request), expectedError); - const actualRequest = (client.innerApiCalls.getRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRepository with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getRepository(request), expectedError); - }); - }); - - describe('updateRepository', () => { - it('invokes updateRepository without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() - ); - request.repository ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRepositoryRequest', ['repository', 'name']); - request.repository.name = defaultValue1; - const expectedHeaderRequestParams = `repository.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() - ); - client.innerApiCalls.updateRepository = stubSimpleCall(expectedResponse); - const [response] = await client.updateRepository(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateRepository without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() - ); - request.repository ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRepositoryRequest', ['repository', 'name']); - request.repository.name = defaultValue1; - const expectedHeaderRequestParams = `repository.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() - ); - client.innerApiCalls.updateRepository = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateRepository( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IRepository|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateRepository with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() - ); - request.repository ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRepositoryRequest', ['repository', 'name']); - request.repository.name = defaultValue1; - const expectedHeaderRequestParams = `repository.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateRepository = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateRepository(request), expectedError); - const actualRequest = (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateRepository with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() - ); - request.repository ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRepositoryRequest', ['repository', 'name']); - request.repository.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.updateRepository(request), expectedError); - }); - }); - - describe('getPackage', () => { - it('invokes getPackage without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Package() - ); - client.innerApiCalls.getPackage = stubSimpleCall(expectedResponse); - const [response] = await client.getPackage(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPackage without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Package() - ); - client.innerApiCalls.getPackage = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getPackage( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IPackage|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPackage with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getPackage = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getPackage(request), expectedError); - const actualRequest = (client.innerApiCalls.getPackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPackage with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetPackageRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getPackage(request), expectedError); - }); - }); - - describe('getVersion', () => { - it('invokes getVersion without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Version() - ); - client.innerApiCalls.getVersion = stubSimpleCall(expectedResponse); - const [response] = await client.getVersion(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVersion without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Version() - ); - client.innerApiCalls.getVersion = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getVersion( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IVersion|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVersion with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getVersion = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getVersion(request), expectedError); - const actualRequest = (client.innerApiCalls.getVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVersion with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVersionRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getVersion(request), expectedError); - }); - }); - - describe('updateVersion', () => { - it('invokes updateVersion without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateVersionRequest() - ); - request.version ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVersionRequest', ['version', 'name']); - request.version.name = defaultValue1; - const expectedHeaderRequestParams = `version.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Version() - ); - client.innerApiCalls.updateVersion = stubSimpleCall(expectedResponse); - const [response] = await client.updateVersion(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVersion without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateVersionRequest() - ); - request.version ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVersionRequest', ['version', 'name']); - request.version.name = defaultValue1; - const expectedHeaderRequestParams = `version.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Version() - ); - client.innerApiCalls.updateVersion = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateVersion( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IVersion|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVersion with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateVersionRequest() - ); - request.version ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVersionRequest', ['version', 'name']); - request.version.name = defaultValue1; - const expectedHeaderRequestParams = `version.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateVersion = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateVersion(request), expectedError); - const actualRequest = (client.innerApiCalls.updateVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVersion with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateVersionRequest() - ); - request.version ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVersionRequest', ['version', 'name']); - request.version.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.updateVersion(request), expectedError); - }); - }); - - describe('getFile', () => { - it('invokes getFile without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetFileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetFileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.File() - ); - client.innerApiCalls.getFile = stubSimpleCall(expectedResponse); - const [response] = await client.getFile(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getFile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFile without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetFileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetFileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.File() - ); - client.innerApiCalls.getFile = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getFile( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IFile|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getFile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFile with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetFileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetFileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getFile = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getFile(request), expectedError); - const actualRequest = (client.innerApiCalls.getFile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFile with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetFileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetFileRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getFile(request), expectedError); - }); - }); - - describe('updateFile', () => { - it('invokes updateFile without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateFileRequest() - ); - request.file ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateFileRequest', ['file', 'name']); - request.file.name = defaultValue1; - const expectedHeaderRequestParams = `file.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.File() - ); - client.innerApiCalls.updateFile = stubSimpleCall(expectedResponse); - const [response] = await client.updateFile(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateFile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateFile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateFile without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateFileRequest() - ); - request.file ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateFileRequest', ['file', 'name']); - request.file.name = defaultValue1; - const expectedHeaderRequestParams = `file.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.File() - ); - client.innerApiCalls.updateFile = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateFile( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IFile|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateFile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateFile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateFile with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateFileRequest() - ); - request.file ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateFileRequest', ['file', 'name']); - request.file.name = defaultValue1; - const expectedHeaderRequestParams = `file.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateFile = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateFile(request), expectedError); - const actualRequest = (client.innerApiCalls.updateFile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateFile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateFile with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateFileRequest() - ); - request.file ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateFileRequest', ['file', 'name']); - request.file.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.updateFile(request), expectedError); - }); - }); - - describe('getTag', () => { - it('invokes getTag without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetTagRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Tag() - ); - client.innerApiCalls.getTag = stubSimpleCall(expectedResponse); - const [response] = await client.getTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTag without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetTagRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Tag() - ); - client.innerApiCalls.getTag = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getTag( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.ITag|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTag with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetTagRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getTag(request), expectedError); - const actualRequest = (client.innerApiCalls.getTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTag with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetTagRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getTag(request), expectedError); - }); - }); - - describe('createTag', () => { - it('invokes createTag without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateTagRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Tag() - ); - client.innerApiCalls.createTag = stubSimpleCall(expectedResponse); - const [response] = await client.createTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateTagRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Tag() - ); - client.innerApiCalls.createTag = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTag( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.ITag|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateTagRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createTag(request), expectedError); - const actualRequest = (client.innerApiCalls.createTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateTagRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.createTag(request), expectedError); - }); - }); - - describe('updateTag', () => { - it('invokes updateTag without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateTagRequest', ['tag', 'name']); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Tag() - ); - client.innerApiCalls.updateTag = stubSimpleCall(expectedResponse); - const [response] = await client.updateTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateTagRequest', ['tag', 'name']); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Tag() - ); - client.innerApiCalls.updateTag = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTag( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.ITag|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateTagRequest', ['tag', 'name']); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateTag(request), expectedError); - const actualRequest = (client.innerApiCalls.updateTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateTagRequest', ['tag', 'name']); - request.tag.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.updateTag(request), expectedError); - }); - }); - - describe('deleteTag', () => { - it('invokes deleteTag without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteTagRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTag = stubSimpleCall(expectedResponse); - const [response] = await client.deleteTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteTagRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTag = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTag( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteTagRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteTag(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteTagRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.deleteTag(request), expectedError); - }); - }); - - describe('createRule', () => { - it('invokes createRule without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Rule() - ); - client.innerApiCalls.createRule = stubSimpleCall(expectedResponse); - const [response] = await client.createRule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRule without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Rule() - ); - client.innerApiCalls.createRule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createRule( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IRule|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRule with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createRule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createRule(request), expectedError); - const actualRequest = (client.innerApiCalls.createRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRule with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.createRule(request), expectedError); - }); - }); - - describe('getRule', () => { - it('invokes getRule without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Rule() - ); - client.innerApiCalls.getRule = stubSimpleCall(expectedResponse); - const [response] = await client.getRule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRule without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Rule() - ); - client.innerApiCalls.getRule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getRule( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IRule|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRule with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getRule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getRule(request), expectedError); - const actualRequest = (client.innerApiCalls.getRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRule with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetRuleRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getRule(request), expectedError); - }); - }); - - describe('updateRule', () => { - it('invokes updateRule without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateRuleRequest() - ); - request.rule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRuleRequest', ['rule', 'name']); - request.rule.name = defaultValue1; - const expectedHeaderRequestParams = `rule.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Rule() - ); - client.innerApiCalls.updateRule = stubSimpleCall(expectedResponse); - const [response] = await client.updateRule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateRule without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateRuleRequest() - ); - request.rule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRuleRequest', ['rule', 'name']); - request.rule.name = defaultValue1; - const expectedHeaderRequestParams = `rule.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Rule() - ); - client.innerApiCalls.updateRule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateRule( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IRule|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateRule with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateRuleRequest() - ); - request.rule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRuleRequest', ['rule', 'name']); - request.rule.name = defaultValue1; - const expectedHeaderRequestParams = `rule.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateRule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateRule(request), expectedError); - const actualRequest = (client.innerApiCalls.updateRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateRule with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateRuleRequest() - ); - request.rule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateRuleRequest', ['rule', 'name']); - request.rule.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.updateRule(request), expectedError); - }); - }); - - describe('deleteRule', () => { - it('invokes deleteRule without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteRule = stubSimpleCall(expectedResponse); - const [response] = await client.deleteRule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRule without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteRule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteRule( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRule with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteRule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteRule(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRule with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRuleRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.deleteRule(request), expectedError); - }); - }); - - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.setIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setIamPolicy( - request, - (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.setIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setIamPolicy(request), expectedError); - const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.setIamPolicy(request), expectedError); - }); - }); - - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.getIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getIamPolicy( - request, - (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getIamPolicy(request), expectedError); - const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getIamPolicy(request), expectedError); - }); - }); - - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = stubSimpleCall(expectedResponse); - const [response] = await client.testIamPermissions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - (err?: Error|null, result?: protos.google.iam.v1.ITestIamPermissionsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.testIamPermissions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.testIamPermissions(request), expectedError); - const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.testIamPermissions(request), expectedError); - }); - }); - - describe('getProjectSettings', () => { - it('invokes getProjectSettings without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetProjectSettingsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ProjectSettings() - ); - client.innerApiCalls.getProjectSettings = stubSimpleCall(expectedResponse); - const [response] = await client.getProjectSettings(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getProjectSettings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getProjectSettings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getProjectSettings without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetProjectSettingsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ProjectSettings() - ); - client.innerApiCalls.getProjectSettings = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getProjectSettings( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IProjectSettings|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getProjectSettings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getProjectSettings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getProjectSettings with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetProjectSettingsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getProjectSettings = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getProjectSettings(request), expectedError); - const actualRequest = (client.innerApiCalls.getProjectSettings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getProjectSettings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getProjectSettings with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetProjectSettingsRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getProjectSettings(request), expectedError); - }); - }); - - describe('updateProjectSettings', () => { - it('invokes updateProjectSettings without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() - ); - request.projectSettings ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest', ['projectSettings', 'name']); - request.projectSettings.name = defaultValue1; - const expectedHeaderRequestParams = `project_settings.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ProjectSettings() - ); - client.innerApiCalls.updateProjectSettings = stubSimpleCall(expectedResponse); - const [response] = await client.updateProjectSettings(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateProjectSettings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateProjectSettings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateProjectSettings without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() - ); - request.projectSettings ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest', ['projectSettings', 'name']); - request.projectSettings.name = defaultValue1; - const expectedHeaderRequestParams = `project_settings.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ProjectSettings() - ); - client.innerApiCalls.updateProjectSettings = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateProjectSettings( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IProjectSettings|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateProjectSettings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateProjectSettings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateProjectSettings with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() - ); - request.projectSettings ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest', ['projectSettings', 'name']); - request.projectSettings.name = defaultValue1; - const expectedHeaderRequestParams = `project_settings.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateProjectSettings = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateProjectSettings(request), expectedError); - const actualRequest = (client.innerApiCalls.updateProjectSettings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateProjectSettings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateProjectSettings with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() - ); - request.projectSettings ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest', ['projectSettings', 'name']); - request.projectSettings.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.updateProjectSettings(request), expectedError); - }); - }); - - describe('getVPCSCConfig', () => { - it('invokes getVPCSCConfig without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.VPCSCConfig() - ); - client.innerApiCalls.getVpcscConfig = stubSimpleCall(expectedResponse); - const [response] = await client.getVPCSCConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getVpcscConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVpcscConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVPCSCConfig without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.VPCSCConfig() - ); - client.innerApiCalls.getVpcscConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getVPCSCConfig( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IVPCSCConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getVpcscConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVpcscConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVPCSCConfig with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getVpcscConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getVPCSCConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.getVpcscConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVpcscConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVPCSCConfig with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getVPCSCConfig(request), expectedError); - }); - }); - - describe('updateVPCSCConfig', () => { - it('invokes updateVPCSCConfig without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest() - ); - request.vpcscConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest', ['vpcscConfig', 'name']); - request.vpcscConfig.name = defaultValue1; - const expectedHeaderRequestParams = `vpcsc_config.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.VPCSCConfig() - ); - client.innerApiCalls.updateVpcscConfig = stubSimpleCall(expectedResponse); - const [response] = await client.updateVPCSCConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateVpcscConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVpcscConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVPCSCConfig without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest() - ); - request.vpcscConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest', ['vpcscConfig', 'name']); - request.vpcscConfig.name = defaultValue1; - const expectedHeaderRequestParams = `vpcsc_config.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.VPCSCConfig() - ); - client.innerApiCalls.updateVpcscConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateVPCSCConfig( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IVPCSCConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateVpcscConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVpcscConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVPCSCConfig with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest() - ); - request.vpcscConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest', ['vpcscConfig', 'name']); - request.vpcscConfig.name = defaultValue1; - const expectedHeaderRequestParams = `vpcsc_config.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateVpcscConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateVPCSCConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.updateVpcscConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVpcscConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVPCSCConfig with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest() - ); - request.vpcscConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest', ['vpcscConfig', 'name']); - request.vpcscConfig.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.updateVPCSCConfig(request), expectedError); - }); - }); - - describe('updatePackage', () => { - it('invokes updatePackage without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdatePackageRequest() - ); - request.package ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdatePackageRequest', ['package', 'name']); - request.package.name = defaultValue1; - const expectedHeaderRequestParams = `package.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Package() - ); - client.innerApiCalls.updatePackage = stubSimpleCall(expectedResponse); - const [response] = await client.updatePackage(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updatePackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updatePackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updatePackage without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdatePackageRequest() - ); - request.package ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdatePackageRequest', ['package', 'name']); - request.package.name = defaultValue1; - const expectedHeaderRequestParams = `package.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Package() - ); - client.innerApiCalls.updatePackage = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updatePackage( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IPackage|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updatePackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updatePackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updatePackage with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdatePackageRequest() - ); - request.package ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdatePackageRequest', ['package', 'name']); - request.package.name = defaultValue1; - const expectedHeaderRequestParams = `package.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updatePackage = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updatePackage(request), expectedError); - const actualRequest = (client.innerApiCalls.updatePackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updatePackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updatePackage with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.UpdatePackageRequest() - ); - request.package ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.UpdatePackageRequest', ['package', 'name']); - request.package.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.updatePackage(request), expectedError); - }); - }); - - describe('getAttachment', () => { - it('invokes getAttachment without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetAttachmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetAttachmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Attachment() - ); - client.innerApiCalls.getAttachment = stubSimpleCall(expectedResponse); - const [response] = await client.getAttachment(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAttachment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAttachment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAttachment without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetAttachmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetAttachmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Attachment() - ); - client.innerApiCalls.getAttachment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAttachment( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IAttachment|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAttachment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAttachment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAttachment with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetAttachmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetAttachmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAttachment = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAttachment(request), expectedError); - const actualRequest = (client.innerApiCalls.getAttachment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAttachment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAttachment with closed client', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.GetAttachmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.GetAttachmentRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getAttachment(request), expectedError); - }); - }); - - describe('importAptArtifacts', () => { - it('invokes importAptArtifacts without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - 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); - const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importAptArtifacts without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importAptArtifacts with call error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.importAptArtifacts = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.importAptArtifacts(request), expectedError); - const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importAptArtifacts with LRO error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.importAptArtifacts = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.importAptArtifacts(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkImportAptArtifactsProgress without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkImportAptArtifactsProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkImportAptArtifactsProgress with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkImportAptArtifactsProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('importYumArtifacts', () => { - it('invokes importYumArtifacts without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - 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); - const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importYumArtifacts without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importYumArtifacts with call error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.importYumArtifacts = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.importYumArtifacts(request), expectedError); - const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importYumArtifacts with LRO error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.importYumArtifacts = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.importYumArtifacts(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkImportYumArtifactsProgress without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkImportYumArtifactsProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkImportYumArtifactsProgress with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkImportYumArtifactsProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createRepository', () => { - it('invokes createRepository without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRepositoryRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createRepository = stubLongRunningCall(expectedResponse); - const [operation] = await client.createRepository(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRepository without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRepositoryRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createRepository = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createRepository( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRepository with call error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRepositoryRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createRepository = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createRepository(request), expectedError); - const actualRequest = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRepository with LRO error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateRepositoryRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createRepository = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createRepository(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateRepositoryProgress without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateRepositoryProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateRepositoryProgress with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateRepositoryProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteRepository', () => { - it('invokes deleteRepository without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteRepository = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteRepository(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRepository without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteRepository = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteRepository( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRepository with call error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteRepository = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteRepository(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRepository with LRO error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteRepository = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteRepository(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteRepositoryProgress without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteRepositoryProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteRepositoryProgress with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteRepositoryProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deletePackage', () => { - it('invokes deletePackage without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeletePackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deletePackage = stubLongRunningCall(expectedResponse); - const [operation] = await client.deletePackage(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePackage without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeletePackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deletePackage = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deletePackage( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePackage with call error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeletePackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deletePackage = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deletePackage(request), expectedError); - const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePackage with LRO error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeletePackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deletePackage = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deletePackage(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeletePackageProgress without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeletePackageProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeletePackageProgress with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeletePackageProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteVersion', () => { - it('invokes deleteVersion without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteVersion = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteVersion(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVersion without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteVersion = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteVersion( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVersion with call error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteVersion = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteVersion(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVersion with LRO error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteVersion = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteVersion(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteVersionProgress without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteVersionProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteVersionProgress with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteVersionProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('batchDeleteVersions', () => { - it('invokes batchDeleteVersions without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.batchDeleteVersions = stubLongRunningCall(expectedResponse); - const [operation] = await client.batchDeleteVersions(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.batchDeleteVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.batchDeleteVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes batchDeleteVersions without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.batchDeleteVersions = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.batchDeleteVersions( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.batchDeleteVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.batchDeleteVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes batchDeleteVersions with call error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.batchDeleteVersions = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.batchDeleteVersions(request), expectedError); - const actualRequest = (client.innerApiCalls.batchDeleteVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.batchDeleteVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes batchDeleteVersions with LRO error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.batchDeleteVersions = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.batchDeleteVersions(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.batchDeleteVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.batchDeleteVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkBatchDeleteVersionsProgress without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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.checkBatchDeleteVersionsProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkBatchDeleteVersionsProgress with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkBatchDeleteVersionsProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteFile', () => { - it('invokes deleteFile without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteFileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteFileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteFile = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteFile(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteFile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteFile without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteFileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteFileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteFile = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteFile( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteFile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteFile with call error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteFileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteFileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteFile = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteFile(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteFile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteFile with LRO error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteFileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteFileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteFile = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteFile(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteFile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteFileProgress without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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.checkDeleteFileProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteFileProgress with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteFileProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createAttachment', () => { - it('invokes createAttachment without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateAttachmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateAttachmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAttachment = stubLongRunningCall(expectedResponse); - const [operation] = await client.createAttachment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAttachment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAttachment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAttachment without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateAttachmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateAttachmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAttachment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createAttachment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAttachment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAttachment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAttachment with call error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateAttachmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateAttachmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAttachment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createAttachment(request), expectedError); - const actualRequest = (client.innerApiCalls.createAttachment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAttachment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAttachment with LRO error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.CreateAttachmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.CreateAttachmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAttachment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createAttachment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createAttachment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAttachment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateAttachmentProgress without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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.checkCreateAttachmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateAttachmentProgress with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateAttachmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteAttachment', () => { - it('invokes deleteAttachment without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteAttachmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteAttachmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAttachment = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteAttachment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteAttachment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAttachment without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteAttachmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteAttachmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAttachment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteAttachment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteAttachment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAttachment with call error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteAttachmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteAttachmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAttachment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteAttachment(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteAttachment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAttachment with LRO error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DeleteAttachmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.DeleteAttachmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAttachment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteAttachment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteAttachment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteAttachmentProgress without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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.checkDeleteAttachmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteAttachmentProgress with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteAttachmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('exportArtifact', () => { - it('invokes exportArtifact without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ExportArtifactRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ExportArtifactRequest', ['repository']); - request.repository = defaultValue1; - const expectedHeaderRequestParams = `repository=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.exportArtifact = stubLongRunningCall(expectedResponse); - const [operation] = await client.exportArtifact(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.exportArtifact as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportArtifact as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportArtifact without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ExportArtifactRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ExportArtifactRequest', ['repository']); - request.repository = defaultValue1; - const expectedHeaderRequestParams = `repository=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.exportArtifact = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.exportArtifact( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.exportArtifact as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportArtifact as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportArtifact with call error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ExportArtifactRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ExportArtifactRequest', ['repository']); - request.repository = defaultValue1; - const expectedHeaderRequestParams = `repository=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.exportArtifact = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.exportArtifact(request), expectedError); - const actualRequest = (client.innerApiCalls.exportArtifact as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportArtifact as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportArtifact with LRO error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ExportArtifactRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ExportArtifactRequest', ['repository']); - request.repository = defaultValue1; - const expectedHeaderRequestParams = `repository=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.exportArtifact = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.exportArtifact(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.exportArtifact as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportArtifact as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkExportArtifactProgress without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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.checkExportArtifactProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkExportArtifactProgress with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkExportArtifactProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listDockerImages', () => { - it('invokes listDockerImages without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListDockerImagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), - ]; - client.innerApiCalls.listDockerImages = stubSimpleCall(expectedResponse); - const [response] = await client.listDockerImages(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDockerImages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDockerImages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDockerImages without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListDockerImagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), - ]; - client.innerApiCalls.listDockerImages = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDockerImages( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IDockerImage[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDockerImages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDockerImages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDockerImages with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListDockerImagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listDockerImages = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listDockerImages(request), expectedError); - const actualRequest = (client.innerApiCalls.listDockerImages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDockerImages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDockerImagesStream without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListDockerImagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), - ]; - client.descriptors.page.listDockerImages.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDockerImagesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.DockerImage[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.DockerImage) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listDockerImages.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDockerImages, request)); - assert( - (client.descriptors.page.listDockerImages.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listDockerImagesStream with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListDockerImagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listDockerImages.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDockerImagesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.DockerImage[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.DockerImage) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listDockerImages.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDockerImages, request)); - assert( - (client.descriptors.page.listDockerImages.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDockerImages without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListDockerImagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.DockerImage()), - ]; - client.descriptors.page.listDockerImages.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1.IDockerImage[] = []; - const iterable = client.listDockerImagesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDockerImages.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDockerImages.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDockerImages with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListDockerImagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listDockerImages.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDockerImagesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1.IDockerImage[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDockerImages.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDockerImages.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listMavenArtifacts', () => { - it('invokes listMavenArtifacts without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), - ]; - client.innerApiCalls.listMavenArtifacts = stubSimpleCall(expectedResponse); - const [response] = await client.listMavenArtifacts(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listMavenArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listMavenArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMavenArtifacts without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), - ]; - client.innerApiCalls.listMavenArtifacts = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listMavenArtifacts( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IMavenArtifact[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listMavenArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listMavenArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMavenArtifacts with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listMavenArtifacts = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listMavenArtifacts(request), expectedError); - const actualRequest = (client.innerApiCalls.listMavenArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listMavenArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMavenArtifactsStream without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), - ]; - client.descriptors.page.listMavenArtifacts.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listMavenArtifactsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.MavenArtifact[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.MavenArtifact) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listMavenArtifacts.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listMavenArtifacts, request)); - assert( - (client.descriptors.page.listMavenArtifacts.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listMavenArtifactsStream with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listMavenArtifacts.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listMavenArtifactsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.MavenArtifact[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.MavenArtifact) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listMavenArtifacts.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listMavenArtifacts, request)); - assert( - (client.descriptors.page.listMavenArtifacts.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listMavenArtifacts without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.MavenArtifact()), - ]; - client.descriptors.page.listMavenArtifacts.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1.IMavenArtifact[] = []; - const iterable = client.listMavenArtifactsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listMavenArtifacts.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listMavenArtifacts.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listMavenArtifacts with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listMavenArtifacts.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listMavenArtifactsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1.IMavenArtifact[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listMavenArtifacts.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listMavenArtifacts.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listNpmPackages', () => { - it('invokes listNpmPackages without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListNpmPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), - ]; - client.innerApiCalls.listNpmPackages = stubSimpleCall(expectedResponse); - const [response] = await client.listNpmPackages(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listNpmPackages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listNpmPackages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listNpmPackages without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListNpmPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), - ]; - client.innerApiCalls.listNpmPackages = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listNpmPackages( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.INpmPackage[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listNpmPackages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listNpmPackages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listNpmPackages with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListNpmPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listNpmPackages = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listNpmPackages(request), expectedError); - const actualRequest = (client.innerApiCalls.listNpmPackages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listNpmPackages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listNpmPackagesStream without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListNpmPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), - ]; - client.descriptors.page.listNpmPackages.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listNpmPackagesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.NpmPackage[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.NpmPackage) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listNpmPackages.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listNpmPackages, request)); - assert( - (client.descriptors.page.listNpmPackages.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listNpmPackagesStream with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListNpmPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listNpmPackages.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listNpmPackagesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.NpmPackage[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.NpmPackage) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listNpmPackages.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listNpmPackages, request)); - assert( - (client.descriptors.page.listNpmPackages.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listNpmPackages without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListNpmPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.NpmPackage()), - ]; - client.descriptors.page.listNpmPackages.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1.INpmPackage[] = []; - const iterable = client.listNpmPackagesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listNpmPackages.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listNpmPackages.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listNpmPackages with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListNpmPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listNpmPackages.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listNpmPackagesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1.INpmPackage[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listNpmPackages.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listNpmPackages.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listPythonPackages', () => { - it('invokes listPythonPackages without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPythonPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), - ]; - client.innerApiCalls.listPythonPackages = stubSimpleCall(expectedResponse); - const [response] = await client.listPythonPackages(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPythonPackages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPythonPackages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPythonPackages without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPythonPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), - ]; - client.innerApiCalls.listPythonPackages = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listPythonPackages( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IPythonPackage[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPythonPackages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPythonPackages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPythonPackages with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPythonPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listPythonPackages = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listPythonPackages(request), expectedError); - const actualRequest = (client.innerApiCalls.listPythonPackages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPythonPackages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPythonPackagesStream without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPythonPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), - ]; - client.descriptors.page.listPythonPackages.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listPythonPackagesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.PythonPackage[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.PythonPackage) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listPythonPackages.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPythonPackages, request)); - assert( - (client.descriptors.page.listPythonPackages.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listPythonPackagesStream with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPythonPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listPythonPackages.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listPythonPackagesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.PythonPackage[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.PythonPackage) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listPythonPackages.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPythonPackages, request)); - assert( - (client.descriptors.page.listPythonPackages.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPythonPackages without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPythonPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.PythonPackage()), - ]; - client.descriptors.page.listPythonPackages.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1.IPythonPackage[] = []; - const iterable = client.listPythonPackagesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listPythonPackages.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPythonPackages.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPythonPackages with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPythonPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listPythonPackages.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listPythonPackagesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1.IPythonPackage[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listPythonPackages.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPythonPackages.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listRepositories', () => { - it('invokes listRepositories without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRepositoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), - ]; - client.innerApiCalls.listRepositories = stubSimpleCall(expectedResponse); - const [response] = await client.listRepositories(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRepositories without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRepositoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), - ]; - client.innerApiCalls.listRepositories = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listRepositories( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IRepository[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRepositories with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRepositoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listRepositories = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listRepositories(request), expectedError); - const actualRequest = (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRepositoriesStream without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRepositoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), - ]; - client.descriptors.page.listRepositories.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listRepositoriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.Repository[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Repository) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listRepositories.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRepositories, request)); - assert( - (client.descriptors.page.listRepositories.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listRepositoriesStream with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRepositoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listRepositories.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listRepositoriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.Repository[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Repository) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listRepositories.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRepositories, request)); - assert( - (client.descriptors.page.listRepositories.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRepositories without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRepositoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Repository()), - ]; - client.descriptors.page.listRepositories.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1.IRepository[] = []; - const iterable = client.listRepositoriesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listRepositories.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRepositories.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRepositories with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRepositoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listRepositories.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listRepositoriesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1.IRepository[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listRepositories.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRepositories.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listPackages', () => { - it('invokes listPackages without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), - ]; - client.innerApiCalls.listPackages = stubSimpleCall(expectedResponse); - const [response] = await client.listPackages(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPackages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPackages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPackages without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), - ]; - client.innerApiCalls.listPackages = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listPackages( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IPackage[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPackages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPackages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPackages with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listPackages = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listPackages(request), expectedError); - const actualRequest = (client.innerApiCalls.listPackages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPackages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPackagesStream without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), - ]; - client.descriptors.page.listPackages.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listPackagesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.Package[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Package) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listPackages.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPackages, request)); - assert( - (client.descriptors.page.listPackages.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listPackagesStream with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listPackages.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listPackagesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.Package[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Package) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listPackages.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPackages, request)); - assert( - (client.descriptors.page.listPackages.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPackages without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Package()), - ]; - client.descriptors.page.listPackages.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1.IPackage[] = []; - const iterable = client.listPackagesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listPackages.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPackages.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPackages with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listPackages.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listPackagesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1.IPackage[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listPackages.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPackages.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listVersions', () => { - it('invokes listVersions without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), - ]; - client.innerApiCalls.listVersions = stubSimpleCall(expectedResponse); - const [response] = await client.listVersions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVersions without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), - ]; - client.innerApiCalls.listVersions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listVersions( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IVersion[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVersions with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listVersions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listVersions(request), expectedError); - const actualRequest = (client.innerApiCalls.listVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVersionsStream without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), - ]; - client.descriptors.page.listVersions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listVersionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.Version[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Version) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listVersions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listVersions, request)); - assert( - (client.descriptors.page.listVersions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listVersionsStream with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listVersions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listVersionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.Version[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Version) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listVersions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listVersions, request)); - assert( - (client.descriptors.page.listVersions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listVersions without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Version()), - ]; - client.descriptors.page.listVersions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1.IVersion[] = []; - const iterable = client.listVersionsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listVersions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listVersions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listVersions with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listVersionsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1.IVersion[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listVersions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listVersions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listFiles', () => { - it('invokes listFiles without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListFilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), - ]; - client.innerApiCalls.listFiles = stubSimpleCall(expectedResponse); - const [response] = await client.listFiles(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFiles without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListFilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), - ]; - client.innerApiCalls.listFiles = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listFiles( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IFile[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFiles with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListFilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listFiles = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listFiles(request), expectedError); - const actualRequest = (client.innerApiCalls.listFiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFilesStream without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListFilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), - ]; - client.descriptors.page.listFiles.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listFilesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.File[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.File) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listFiles.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFiles, request)); - assert( - (client.descriptors.page.listFiles.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listFilesStream with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListFilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listFiles.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listFilesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.File[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.File) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listFiles.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFiles, request)); - assert( - (client.descriptors.page.listFiles.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listFiles without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListFilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.File()), - ]; - client.descriptors.page.listFiles.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1.IFile[] = []; - const iterable = client.listFilesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listFiles.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listFiles.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listFiles with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListFilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listFiles.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listFilesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1.IFile[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listFiles.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listFiles.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listTags', () => { - it('invokes listTags without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), - ]; - client.innerApiCalls.listTags = stubSimpleCall(expectedResponse); - const [response] = await client.listTags(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listTags as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTags as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTags without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), - ]; - client.innerApiCalls.listTags = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listTags( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.ITag[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listTags as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTags as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTags with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listTags = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listTags(request), expectedError); - const actualRequest = (client.innerApiCalls.listTags as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTags as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTagsStream without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), - ]; - client.descriptors.page.listTags.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listTagsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.Tag[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Tag) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listTags, request)); - assert( - (client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listTagsStream with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listTags.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listTagsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.Tag[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Tag) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listTags, request)); - assert( - (client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTags without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Tag()), - ]; - client.descriptors.page.listTags.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1.ITag[] = []; - const iterable = client.listTagsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listTags.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listTags.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTags with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listTags.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listTagsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1.ITag[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listTags.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listTags.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listRules', () => { - it('invokes listRules without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), - ]; - client.innerApiCalls.listRules = stubSimpleCall(expectedResponse); - const [response] = await client.listRules(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRules without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), - ]; - client.innerApiCalls.listRules = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listRules( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IRule[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRules with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listRules = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listRules(request), expectedError); - const actualRequest = (client.innerApiCalls.listRules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRulesStream without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), - ]; - client.descriptors.page.listRules.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listRulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.Rule[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Rule) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listRules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRules, request)); - assert( - (client.descriptors.page.listRules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listRulesStream with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listRules.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listRulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.Rule[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Rule) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listRules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRules, request)); - assert( - (client.descriptors.page.listRules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRules without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Rule()), - ]; - client.descriptors.page.listRules.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1.IRule[] = []; - const iterable = client.listRulesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listRules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRules with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListRulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listRules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listRulesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1.IRule[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listRules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listAttachments', () => { - it('invokes listAttachments without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListAttachmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), - ]; - client.innerApiCalls.listAttachments = stubSimpleCall(expectedResponse); - const [response] = await client.listAttachments(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAttachments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAttachments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAttachments without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListAttachmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), - ]; - client.innerApiCalls.listAttachments = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listAttachments( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1.IAttachment[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAttachments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAttachments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAttachments with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListAttachmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listAttachments = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listAttachments(request), expectedError); - const actualRequest = (client.innerApiCalls.listAttachments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAttachments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAttachmentsStream without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListAttachmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), - ]; - client.descriptors.page.listAttachments.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAttachmentsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.Attachment[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Attachment) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listAttachments.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAttachments, request)); - assert( - (client.descriptors.page.listAttachments.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listAttachmentsStream with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListAttachmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listAttachments.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAttachmentsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.Attachment[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1.Attachment) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listAttachments.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAttachments, request)); - assert( - (client.descriptors.page.listAttachments.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAttachments without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListAttachmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1.Attachment()), - ]; - client.descriptors.page.listAttachments.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1.IAttachment[] = []; - const iterable = client.listAttachmentsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listAttachments.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAttachments.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAttachments with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1.ListAttachmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listAttachments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAttachmentsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1.IAttachment[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listAttachments.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAttachments.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = stubSimpleCall(expectedResponse); - const response = await client.getLocation(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes getLocation without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getLocation( - request, - expectedOptions, - ( - err?: Error | null, - result?: LocationProtos.google.cloud.location.ILocation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0)); - }); - it('invokes getLocation with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getLocation(request, expectedOptions), expectedError); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('listLocationsAsync', () => { - it('uses async iteration with listLocations without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedResponse = [ - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - ]; - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - const iterable = client.listLocationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedError = new Error('expected'); - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLocationsAsync(request); - await assert.rejects(async () => { - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes getOperation without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.getOperation(request)}, expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes cancelOperation without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0)); - }); - it('invokes cancelOperation with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes deleteOperation without error using callback', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.IOperation[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.IOperation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - }); - - describe('Path templates', () => { - - describe('aptArtifact', async () => { - const fakePath = "/rendered/path/aptArtifact"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - apt_artifact: "aptArtifactValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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('attachment', async () => { - const fakePath = "/rendered/path/attachment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - attachment: "attachmentValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.attachmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.attachmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('attachmentPath', () => { - const result = client.attachmentPath("projectValue", "locationValue", "repositoryValue", "attachmentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.attachmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAttachmentName', () => { - const result = client.matchProjectFromAttachmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.attachmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAttachmentName', () => { - const result = client.matchLocationFromAttachmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.attachmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRepositoryFromAttachmentName', () => { - const result = client.matchRepositoryFromAttachmentName(fakePath); - assert.strictEqual(result, "repositoryValue"); - assert((client.pathTemplates.attachmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAttachmentFromAttachmentName', () => { - const result = client.matchAttachmentFromAttachmentName(fakePath); - assert.strictEqual(result, "attachmentValue"); - assert((client.pathTemplates.attachmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dockerImage', async () => { - const fakePath = "/rendered/path/dockerImage"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - docker_image: "dockerImageValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.dockerImagePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dockerImagePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dockerImagePath', () => { - const result = client.dockerImagePath("projectValue", "locationValue", "repositoryValue", "dockerImageValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dockerImagePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDockerImageName', () => { - const result = client.matchProjectFromDockerImageName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dockerImagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDockerImageName', () => { - const result = client.matchLocationFromDockerImageName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dockerImagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRepositoryFromDockerImageName', () => { - const result = client.matchRepositoryFromDockerImageName(fakePath); - assert.strictEqual(result, "repositoryValue"); - assert((client.pathTemplates.dockerImagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDockerImageFromDockerImageName', () => { - const result = client.matchDockerImageFromDockerImageName(fakePath); - assert.strictEqual(result, "dockerImageValue"); - assert((client.pathTemplates.dockerImagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('file', async () => { - const fakePath = "/rendered/path/file"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - file: "fileValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.filePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.filePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('filePath', () => { - const result = client.filePath("projectValue", "locationValue", "repositoryValue", "fileValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.filePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromFileName', () => { - const result = client.matchProjectFromFileName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.filePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFileName', () => { - const result = client.matchLocationFromFileName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.filePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRepositoryFromFileName', () => { - const result = client.matchRepositoryFromFileName(fakePath); - assert.strictEqual(result, "repositoryValue"); - assert((client.pathTemplates.filePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFileFromFileName', () => { - const result = client.matchFileFromFileName(fakePath); - assert.strictEqual(result, "fileValue"); - assert((client.pathTemplates.filePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('genericArtifact', async () => { - const fakePath = "/rendered/path/genericArtifact"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - generic_artifact: "genericArtifactValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.genericArtifactPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.genericArtifactPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('genericArtifactPath', () => { - const result = client.genericArtifactPath("projectValue", "locationValue", "repositoryValue", "genericArtifactValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.genericArtifactPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromGenericArtifactName', () => { - const result = client.matchProjectFromGenericArtifactName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.genericArtifactPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromGenericArtifactName', () => { - const result = client.matchLocationFromGenericArtifactName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.genericArtifactPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRepositoryFromGenericArtifactName', () => { - const result = client.matchRepositoryFromGenericArtifactName(fakePath); - assert.strictEqual(result, "repositoryValue"); - assert((client.pathTemplates.genericArtifactPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchGenericArtifactFromGenericArtifactName', () => { - const result = client.matchGenericArtifactFromGenericArtifactName(fakePath); - assert.strictEqual(result, "genericArtifactValue"); - assert((client.pathTemplates.genericArtifactPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('goModule', async () => { - const fakePath = "/rendered/path/goModule"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - go_module: "goModuleValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.goModulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.goModulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('goModulePath', () => { - const result = client.goModulePath("projectValue", "locationValue", "repositoryValue", "goModuleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.goModulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromGoModuleName', () => { - const result = client.matchProjectFromGoModuleName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.goModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromGoModuleName', () => { - const result = client.matchLocationFromGoModuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.goModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRepositoryFromGoModuleName', () => { - const result = client.matchRepositoryFromGoModuleName(fakePath); - assert.strictEqual(result, "repositoryValue"); - assert((client.pathTemplates.goModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchGoModuleFromGoModuleName', () => { - const result = client.matchGoModuleFromGoModuleName(fakePath); - assert.strictEqual(result, "goModuleValue"); - assert((client.pathTemplates.goModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('kfpArtifact', async () => { - const fakePath = "/rendered/path/kfpArtifact"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - kfp_artifact: "kfpArtifactValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.kfpArtifactPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.kfpArtifactPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('kfpArtifactPath', () => { - const result = client.kfpArtifactPath("projectValue", "locationValue", "repositoryValue", "kfpArtifactValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.kfpArtifactPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromKfpArtifactName', () => { - const result = client.matchProjectFromKfpArtifactName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.kfpArtifactPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromKfpArtifactName', () => { - const result = client.matchLocationFromKfpArtifactName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.kfpArtifactPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRepositoryFromKfpArtifactName', () => { - const result = client.matchRepositoryFromKfpArtifactName(fakePath); - assert.strictEqual(result, "repositoryValue"); - assert((client.pathTemplates.kfpArtifactPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchKfpArtifactFromKfpArtifactName', () => { - const result = client.matchKfpArtifactFromKfpArtifactName(fakePath); - assert.strictEqual(result, "kfpArtifactValue"); - assert((client.pathTemplates.kfpArtifactPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('mavenArtifact', async () => { - const fakePath = "/rendered/path/mavenArtifact"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - maven_artifact: "mavenArtifactValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.mavenArtifactPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.mavenArtifactPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('mavenArtifactPath', () => { - const result = client.mavenArtifactPath("projectValue", "locationValue", "repositoryValue", "mavenArtifactValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.mavenArtifactPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromMavenArtifactName', () => { - const result = client.matchProjectFromMavenArtifactName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.mavenArtifactPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromMavenArtifactName', () => { - const result = client.matchLocationFromMavenArtifactName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.mavenArtifactPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRepositoryFromMavenArtifactName', () => { - const result = client.matchRepositoryFromMavenArtifactName(fakePath); - assert.strictEqual(result, "repositoryValue"); - assert((client.pathTemplates.mavenArtifactPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchMavenArtifactFromMavenArtifactName', () => { - const result = client.matchMavenArtifactFromMavenArtifactName(fakePath); - assert.strictEqual(result, "mavenArtifactValue"); - assert((client.pathTemplates.mavenArtifactPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('npmPackage', async () => { - const fakePath = "/rendered/path/npmPackage"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - npm_package: "npmPackageValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.npmPackagePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.npmPackagePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('npmPackagePath', () => { - const result = client.npmPackagePath("projectValue", "locationValue", "repositoryValue", "npmPackageValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.npmPackagePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromNpmPackageName', () => { - const result = client.matchProjectFromNpmPackageName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.npmPackagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromNpmPackageName', () => { - const result = client.matchLocationFromNpmPackageName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.npmPackagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRepositoryFromNpmPackageName', () => { - const result = client.matchRepositoryFromNpmPackageName(fakePath); - assert.strictEqual(result, "repositoryValue"); - assert((client.pathTemplates.npmPackagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchNpmPackageFromNpmPackageName', () => { - const result = client.matchNpmPackageFromNpmPackageName(fakePath); - assert.strictEqual(result, "npmPackageValue"); - assert((client.pathTemplates.npmPackagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('package', async () => { - const fakePath = "/rendered/path/package"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - package: "packageValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.packagePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.packagePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('packagePath', () => { - const result = client.packagePath("projectValue", "locationValue", "repositoryValue", "packageValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.packagePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromPackageName', () => { - const result = client.matchProjectFromPackageName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.packagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromPackageName', () => { - const result = client.matchLocationFromPackageName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.packagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRepositoryFromPackageName', () => { - const result = client.matchRepositoryFromPackageName(fakePath); - assert.strictEqual(result, "repositoryValue"); - assert((client.pathTemplates.packagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPackageFromPackageName', () => { - const result = client.matchPackageFromPackageName(fakePath); - assert.strictEqual(result, "packageValue"); - assert((client.pathTemplates.packagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectSettings', async () => { - const fakePath = "/rendered/path/projectSettings"; - const expectedParameters = { - project: "projectValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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('pythonPackage', async () => { - const fakePath = "/rendered/path/pythonPackage"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - python_package: "pythonPackageValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.pythonPackagePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.pythonPackagePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('pythonPackagePath', () => { - const result = client.pythonPackagePath("projectValue", "locationValue", "repositoryValue", "pythonPackageValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.pythonPackagePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromPythonPackageName', () => { - const result = client.matchProjectFromPythonPackageName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.pythonPackagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromPythonPackageName', () => { - const result = client.matchLocationFromPythonPackageName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.pythonPackagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRepositoryFromPythonPackageName', () => { - const result = client.matchRepositoryFromPythonPackageName(fakePath); - assert.strictEqual(result, "repositoryValue"); - assert((client.pathTemplates.pythonPackagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPythonPackageFromPythonPackageName', () => { - const result = client.matchPythonPackageFromPythonPackageName(fakePath); - assert.strictEqual(result, "pythonPackageValue"); - assert((client.pathTemplates.pythonPackagePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('repository', async () => { - const fakePath = "/rendered/path/repository"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.repositoryPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.repositoryPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('repositoryPath', () => { - const result = client.repositoryPath("projectValue", "locationValue", "repositoryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.repositoryPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromRepositoryName', () => { - const result = client.matchProjectFromRepositoryName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.repositoryPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromRepositoryName', () => { - const result = client.matchLocationFromRepositoryName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.repositoryPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRepositoryFromRepositoryName', () => { - const result = client.matchRepositoryFromRepositoryName(fakePath); - assert.strictEqual(result, "repositoryValue"); - assert((client.pathTemplates.repositoryPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('rule', async () => { - const fakePath = "/rendered/path/rule"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - rule: "ruleValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.rulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.rulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('rulePath', () => { - const result = client.rulePath("projectValue", "locationValue", "repositoryValue", "ruleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.rulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromRuleName', () => { - const result = client.matchProjectFromRuleName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.rulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromRuleName', () => { - const result = client.matchLocationFromRuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.rulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRepositoryFromRuleName', () => { - const result = client.matchRepositoryFromRuleName(fakePath); - assert.strictEqual(result, "repositoryValue"); - assert((client.pathTemplates.rulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRuleFromRuleName', () => { - const result = client.matchRuleFromRuleName(fakePath); - assert.strictEqual(result, "ruleValue"); - assert((client.pathTemplates.rulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('tag', async () => { - const fakePath = "/rendered/path/tag"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - package: "packageValue", - tag: "tagValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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', async () => { - const fakePath = "/rendered/path/version"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - package: "packageValue", - version: "versionValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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('vpcscConfig', async () => { - const fakePath = "/rendered/path/vpcscConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.vpcscConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.vpcscConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('vpcscConfigPath', () => { - const result = client.vpcscConfigPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.vpcscConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromVpcscConfigName', () => { - const result = client.matchProjectFromVpcscConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.vpcscConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromVpcscConfigName', () => { - const result = client.matchLocationFromVpcscConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.vpcscConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('yumArtifact', async () => { - const fakePath = "/rendered/path/yumArtifact"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - yum_artifact: "yumArtifactValue", - }; - const client = new artifactregistryModule.v1.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts b/owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts deleted file mode 100644 index f086ae748b9..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts +++ /dev/null @@ -1,4481 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as artifactregistryModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1beta2.ArtifactRegistryClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'artifactregistry.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = artifactregistryModule.v1beta2.ArtifactRegistryClient.servicePath; - assert.strictEqual(servicePath, 'artifactregistry.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = artifactregistryModule.v1beta2.ArtifactRegistryClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'artifactregistry.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'artifactregistry.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'artifactregistry.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'artifactregistry.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'artifactregistry.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new artifactregistryModule.v1beta2.ArtifactRegistryClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = artifactregistryModule.v1beta2.ArtifactRegistryClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.artifactRegistryStub, undefined); - await client.initialize(); - assert(client.artifactRegistryStub); - }); - - 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.initialize().catch(err => {throw err}); - assert(client.artifactRegistryStub); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - 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(); - }).catch(err => {throw err}); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error|null, projectId?: string|null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); - }); - }); - - describe('getRepository', () => { - it('invokes getRepository without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.Repository() - ); - client.innerApiCalls.getRepository = stubSimpleCall(expectedResponse); - const [response] = await client.getRepository(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRepository without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.Repository() - ); - client.innerApiCalls.getRepository = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getRepository( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IRepository|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRepository with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getRepository = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getRepository(request), expectedError); - const actualRequest = (client.innerApiCalls.getRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRepository with closed client', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getRepository(request), expectedError); - }); - }); - - describe('updateRepository', () => { - it('invokes updateRepository without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest() - ); - request.repository ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest', ['repository', 'name']); - request.repository.name = defaultValue1; - const expectedHeaderRequestParams = `repository.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.Repository() - ); - client.innerApiCalls.updateRepository = stubSimpleCall(expectedResponse); - const [response] = await client.updateRepository(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateRepository without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest() - ); - request.repository ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest', ['repository', 'name']); - request.repository.name = defaultValue1; - const expectedHeaderRequestParams = `repository.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.Repository() - ); - client.innerApiCalls.updateRepository = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateRepository( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IRepository|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateRepository with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest() - ); - request.repository ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest', ['repository', 'name']); - request.repository.name = defaultValue1; - const expectedHeaderRequestParams = `repository.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateRepository = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateRepository(request), expectedError); - const actualRequest = (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateRepository with closed client', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest() - ); - request.repository ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest', ['repository', 'name']); - request.repository.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.updateRepository(request), expectedError); - }); - }); - - describe('getPackage', () => { - it('invokes getPackage without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetPackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.Package() - ); - client.innerApiCalls.getPackage = stubSimpleCall(expectedResponse); - const [response] = await client.getPackage(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPackage without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetPackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.Package() - ); - client.innerApiCalls.getPackage = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getPackage( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IPackage|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPackage with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetPackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getPackage = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getPackage(request), expectedError); - const actualRequest = (client.innerApiCalls.getPackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPackage with closed client', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetPackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetPackageRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getPackage(request), expectedError); - }); - }); - - describe('getVersion', () => { - it('invokes getVersion without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.Version() - ); - client.innerApiCalls.getVersion = stubSimpleCall(expectedResponse); - const [response] = await client.getVersion(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVersion without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.Version() - ); - client.innerApiCalls.getVersion = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getVersion( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IVersion|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVersion with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getVersion = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getVersion(request), expectedError); - const actualRequest = (client.innerApiCalls.getVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVersion with closed client', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetVersionRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getVersion(request), expectedError); - }); - }); - - describe('getFile', () => { - it('invokes getFile without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetFileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetFileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.File() - ); - client.innerApiCalls.getFile = stubSimpleCall(expectedResponse); - const [response] = await client.getFile(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getFile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFile without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetFileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetFileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.File() - ); - client.innerApiCalls.getFile = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getFile( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IFile|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getFile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFile with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetFileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetFileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getFile = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getFile(request), expectedError); - const actualRequest = (client.innerApiCalls.getFile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFile with closed client', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetFileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetFileRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getFile(request), expectedError); - }); - }); - - describe('getTag', () => { - it('invokes getTag without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetTagRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.Tag() - ); - client.innerApiCalls.getTag = stubSimpleCall(expectedResponse); - const [response] = await client.getTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTag without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetTagRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.Tag() - ); - client.innerApiCalls.getTag = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getTag( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.ITag|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTag with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetTagRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getTag(request), expectedError); - const actualRequest = (client.innerApiCalls.getTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTag with closed client', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetTagRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getTag(request), expectedError); - }); - }); - - describe('createTag', () => { - it('invokes createTag without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.CreateTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateTagRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.Tag() - ); - client.innerApiCalls.createTag = stubSimpleCall(expectedResponse); - const [response] = await client.createTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.CreateTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateTagRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.Tag() - ); - client.innerApiCalls.createTag = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTag( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.ITag|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.CreateTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateTagRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createTag(request), expectedError); - const actualRequest = (client.innerApiCalls.createTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag with closed client', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.CreateTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateTagRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.createTag(request), expectedError); - }); - }); - - describe('updateTag', () => { - it('invokes updateTag without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateTagRequest', ['tag', 'name']); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.Tag() - ); - client.innerApiCalls.updateTag = stubSimpleCall(expectedResponse); - const [response] = await client.updateTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateTagRequest', ['tag', 'name']); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.Tag() - ); - client.innerApiCalls.updateTag = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTag( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.ITag|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateTagRequest', ['tag', 'name']); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateTag(request), expectedError); - const actualRequest = (client.innerApiCalls.updateTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag with closed client', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateTagRequest', ['tag', 'name']); - request.tag.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.updateTag(request), expectedError); - }); - }); - - describe('deleteTag', () => { - it('invokes deleteTag without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeleteTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteTagRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTag = stubSimpleCall(expectedResponse); - const [response] = await client.deleteTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeleteTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteTagRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTag = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTag( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeleteTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteTagRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteTag(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteTag as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteTag as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag with closed client', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeleteTagRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteTagRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.deleteTag(request), expectedError); - }); - }); - - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.setIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setIamPolicy( - request, - (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.setIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setIamPolicy(request), expectedError); - const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy with closed client', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.setIamPolicy(request), expectedError); - }); - }); - - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.getIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getIamPolicy( - request, - (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getIamPolicy(request), expectedError); - const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy with closed client', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getIamPolicy(request), expectedError); - }); - }); - - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = stubSimpleCall(expectedResponse); - const [response] = await client.testIamPermissions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - (err?: Error|null, result?: protos.google.iam.v1.ITestIamPermissionsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.testIamPermissions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.testIamPermissions(request), expectedError); - const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with closed client', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - 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', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - 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); - const actualRequest = (client.innerApiCalls.getProjectSettings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getProjectSettings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getProjectSettings without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - 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); - const actualRequest = (client.innerApiCalls.getProjectSettings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getProjectSettings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getProjectSettings with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getProjectSettings = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getProjectSettings(request), expectedError); - const actualRequest = (client.innerApiCalls.getProjectSettings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getProjectSettings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getProjectSettings with closed client', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - 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', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest() - ); - request.projectSettings ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest', ['projectSettings', 'name']); - request.projectSettings.name = defaultValue1; - const expectedHeaderRequestParams = `project_settings.name=${defaultValue1 ?? '' }`; - 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); - const actualRequest = (client.innerApiCalls.updateProjectSettings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateProjectSettings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateProjectSettings without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest() - ); - request.projectSettings ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest', ['projectSettings', 'name']); - request.projectSettings.name = defaultValue1; - const expectedHeaderRequestParams = `project_settings.name=${defaultValue1 ?? '' }`; - 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); - const actualRequest = (client.innerApiCalls.updateProjectSettings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateProjectSettings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateProjectSettings with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest() - ); - request.projectSettings ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest', ['projectSettings', 'name']); - request.projectSettings.name = defaultValue1; - const expectedHeaderRequestParams = `project_settings.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateProjectSettings = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateProjectSettings(request), expectedError); - const actualRequest = (client.innerApiCalls.updateProjectSettings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateProjectSettings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateProjectSettings with closed client', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest() - ); - request.projectSettings ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest', ['projectSettings', 'name']); - request.projectSettings.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - 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', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - 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); - const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importAptArtifacts without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importAptArtifacts with call error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.importAptArtifacts = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.importAptArtifacts(request), expectedError); - const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importAptArtifacts with LRO error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.importAptArtifacts = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.importAptArtifacts(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importAptArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkImportAptArtifactsProgress without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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', - }); - await 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', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - 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); - const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importYumArtifacts without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - 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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importYumArtifacts with call error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.importYumArtifacts = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.importYumArtifacts(request), expectedError); - const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importYumArtifacts with LRO error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.importYumArtifacts = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.importYumArtifacts(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importYumArtifacts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkImportYumArtifactsProgress without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkImportYumArtifactsProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createRepository', () => { - it('invokes createRepository without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createRepository = stubLongRunningCall(expectedResponse); - const [operation] = await client.createRepository(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRepository without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createRepository = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createRepository( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRepository with call error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createRepository = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createRepository(request), expectedError); - const actualRequest = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRepository with LRO error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createRepository = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createRepository(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateRepositoryProgress without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateRepositoryProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateRepositoryProgress with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateRepositoryProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteRepository', () => { - it('invokes deleteRepository without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteRepository = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteRepository(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRepository without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteRepository = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteRepository( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRepository with call error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteRepository = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteRepository(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteRepository with LRO error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteRepository = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteRepository(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteRepositoryProgress without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteRepositoryProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteRepositoryProgress with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteRepositoryProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deletePackage', () => { - it('invokes deletePackage without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeletePackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeletePackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deletePackage = stubLongRunningCall(expectedResponse); - const [operation] = await client.deletePackage(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePackage without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeletePackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeletePackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deletePackage = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deletePackage( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePackage with call error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeletePackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeletePackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deletePackage = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deletePackage(request), expectedError); - const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePackage with LRO error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeletePackageRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeletePackageRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deletePackage = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deletePackage(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePackage as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeletePackageProgress without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeletePackageProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeletePackageProgress with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeletePackageProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteVersion', () => { - it('invokes deleteVersion without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteVersion = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteVersion(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVersion without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteVersion = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteVersion( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVersion with call error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteVersion = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteVersion(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVersion with LRO error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteVersion = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteVersion(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteVersionProgress without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteVersionProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteVersionProgress with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteVersionProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listRepositories', () => { - it('invokes listRepositories without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), - ]; - client.innerApiCalls.listRepositories = stubSimpleCall(expectedResponse); - const [response] = await client.listRepositories(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRepositories without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), - ]; - client.innerApiCalls.listRepositories = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listRepositories( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IRepository[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRepositories with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listRepositories = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listRepositories(request), expectedError); - const actualRequest = (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRepositoriesStream without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), - ]; - client.descriptors.page.listRepositories.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listRepositoriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1beta2.Repository[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Repository) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listRepositories.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRepositories, request)); - assert( - (client.descriptors.page.listRepositories.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listRepositoriesStream with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listRepositories.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listRepositoriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1beta2.Repository[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Repository) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listRepositories.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRepositories, request)); - assert( - (client.descriptors.page.listRepositories.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRepositories without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Repository()), - ]; - client.descriptors.page.listRepositories.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1beta2.IRepository[] = []; - const iterable = client.listRepositoriesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listRepositories.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRepositories.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRepositories with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listRepositories.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listRepositoriesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1beta2.IRepository[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listRepositories.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRepositories.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listPackages', () => { - it('invokes listPackages without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), - ]; - client.innerApiCalls.listPackages = stubSimpleCall(expectedResponse); - const [response] = await client.listPackages(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPackages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPackages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPackages without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), - ]; - client.innerApiCalls.listPackages = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listPackages( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IPackage[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPackages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPackages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPackages with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listPackages = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listPackages(request), expectedError); - const actualRequest = (client.innerApiCalls.listPackages as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPackages as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPackagesStream without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), - ]; - client.descriptors.page.listPackages.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listPackagesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1beta2.Package[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Package) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listPackages.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPackages, request)); - assert( - (client.descriptors.page.listPackages.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listPackagesStream with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listPackages.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listPackagesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1beta2.Package[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Package) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listPackages.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPackages, request)); - assert( - (client.descriptors.page.listPackages.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPackages without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Package()), - ]; - client.descriptors.page.listPackages.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1beta2.IPackage[] = []; - const iterable = client.listPackagesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listPackages.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPackages.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPackages with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListPackagesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listPackages.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listPackagesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1beta2.IPackage[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listPackages.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPackages.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listVersions', () => { - it('invokes listVersions without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), - ]; - client.innerApiCalls.listVersions = stubSimpleCall(expectedResponse); - const [response] = await client.listVersions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVersions without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), - ]; - client.innerApiCalls.listVersions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listVersions( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IVersion[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVersions with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listVersions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listVersions(request), expectedError); - const actualRequest = (client.innerApiCalls.listVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVersionsStream without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), - ]; - client.descriptors.page.listVersions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listVersionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1beta2.Version[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Version) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listVersions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listVersions, request)); - assert( - (client.descriptors.page.listVersions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listVersionsStream with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listVersions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listVersionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1beta2.Version[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Version) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listVersions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listVersions, request)); - assert( - (client.descriptors.page.listVersions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listVersions without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Version()), - ]; - client.descriptors.page.listVersions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1beta2.IVersion[] = []; - const iterable = client.listVersionsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listVersions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listVersions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listVersions with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listVersionsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1beta2.IVersion[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listVersions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listVersions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listFiles', () => { - it('invokes listFiles without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListFilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), - ]; - client.innerApiCalls.listFiles = stubSimpleCall(expectedResponse); - const [response] = await client.listFiles(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFiles without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListFilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), - ]; - client.innerApiCalls.listFiles = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listFiles( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.IFile[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFiles with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListFilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listFiles = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listFiles(request), expectedError); - const actualRequest = (client.innerApiCalls.listFiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFilesStream without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListFilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), - ]; - client.descriptors.page.listFiles.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listFilesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1beta2.File[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.File) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listFiles.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFiles, request)); - assert( - (client.descriptors.page.listFiles.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listFilesStream with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListFilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listFiles.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listFilesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1beta2.File[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.File) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listFiles.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFiles, request)); - assert( - (client.descriptors.page.listFiles.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listFiles without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListFilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.File()), - ]; - client.descriptors.page.listFiles.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1beta2.IFile[] = []; - const iterable = client.listFilesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listFiles.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listFiles.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listFiles with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListFilesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listFiles.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listFilesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1beta2.IFile[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listFiles.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listFiles.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listTags', () => { - it('invokes listTags without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), - ]; - client.innerApiCalls.listTags = stubSimpleCall(expectedResponse); - const [response] = await client.listTags(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listTags as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTags as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTags without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), - ]; - client.innerApiCalls.listTags = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listTags( - request, - (err?: Error|null, result?: protos.google.devtools.artifactregistry.v1beta2.ITag[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listTags as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTags as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTags with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listTags = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listTags(request), expectedError); - const actualRequest = (client.innerApiCalls.listTags as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTags as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTagsStream without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), - ]; - client.descriptors.page.listTags.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listTagsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1beta2.Tag[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Tag) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listTags, request)); - assert( - (client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listTagsStream with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listTags.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listTagsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1beta2.Tag[] = []; - stream.on('data', (response: protos.google.devtools.artifactregistry.v1beta2.Tag) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listTags, request)); - assert( - (client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTags without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), - generateSampleMessage(new protos.google.devtools.artifactregistry.v1beta2.Tag()), - ]; - client.descriptors.page.listTags.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1beta2.ITag[] = []; - const iterable = client.listTagsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listTags.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listTags.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTags with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.devtools.artifactregistry.v1beta2.ListTagsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listTags.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listTagsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1beta2.ITag[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listTags.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listTags.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = stubSimpleCall(expectedResponse); - const response = await client.getLocation(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes getLocation without error using callback', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getLocation( - request, - expectedOptions, - ( - err?: Error | null, - result?: LocationProtos.google.cloud.location.ILocation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0)); - }); - it('invokes getLocation with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getLocation(request, expectedOptions), expectedError); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('listLocationsAsync', () => { - it('uses async iteration with listLocations without error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedResponse = [ - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - ]; - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - const iterable = client.listLocationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedError = new Error('expected'); - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLocationsAsync(request); - await assert.rejects(async () => { - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('Path templates', () => { - - describe('aptArtifact', async () => { - 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', - }); - await 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', async () => { - const fakePath = "/rendered/path/file"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - file: "fileValue", - }; - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.filePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.filePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('filePath', () => { - const result = client.filePath("projectValue", "locationValue", "repositoryValue", "fileValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.filePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromFileName', () => { - const result = client.matchProjectFromFileName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.filePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFileName', () => { - const result = client.matchLocationFromFileName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.filePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRepositoryFromFileName', () => { - const result = client.matchRepositoryFromFileName(fakePath); - assert.strictEqual(result, "repositoryValue"); - assert((client.pathTemplates.filePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFileFromFileName', () => { - const result = client.matchFileFromFileName(fakePath); - assert.strictEqual(result, "fileValue"); - assert((client.pathTemplates.filePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectSettings', async () => { - const fakePath = "/rendered/path/projectSettings"; - const expectedParameters = { - project: "projectValue", - }; - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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', async () => { - const fakePath = "/rendered/path/repository"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - repository: "repositoryValue", - }; - const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.repositoryPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.repositoryPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('repositoryPath', () => { - const result = client.repositoryPath("projectValue", "locationValue", "repositoryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.repositoryPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromRepositoryName', () => { - const result = client.matchProjectFromRepositoryName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.repositoryPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromRepositoryName', () => { - const result = client.matchLocationFromRepositoryName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.repositoryPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRepositoryFromRepositoryName', () => { - const result = client.matchRepositoryFromRepositoryName(fakePath); - assert.strictEqual(result, "repositoryValue"); - assert((client.pathTemplates.repositoryPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('tag', async () => { - 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', - }); - await 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', async () => { - 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', - }); - await 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', async () => { - 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', - }); - await 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)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-devtools-artifactregistry/tsconfig.json b/owl-bot-staging/google-devtools-artifactregistry/tsconfig.json deleted file mode 100644 index ca73e7bfc82..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2023", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts", - "src/**/*.json", - "samples/**/*.json", - "protos/protos.json" - ] -} diff --git a/owl-bot-staging/google-devtools-artifactregistry/webpack.config.js b/owl-bot-staging/google-devtools-artifactregistry/webpack.config.js deleted file mode 100644 index d7daabc3ee8..00000000000 --- a/owl-bot-staging/google-devtools-artifactregistry/webpack.config.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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. - -const path = require('path'); - -module.exports = { - entry: './src/index.ts', - output: { - library: 'ArtifactRegistry', - filename: './artifact-registry.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader' - }, - ], - }, - mode: 'production', -}; diff --git a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto index 7c172020114..b7e7c368092 100644 --- a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto +++ b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto @@ -543,7 +543,7 @@ service ArtifactRegistry { }; } - // Exports an artifact. + // Exports an artifact to a Cloud Storage bucket. rpc ExportArtifact(ExportArtifactRequest) returns (google.longrunning.Operation) { option (google.api.http) = { diff --git a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto index ec64db538c9..4efa5c15fec 100644 --- a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto +++ b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto @@ -18,6 +18,7 @@ package google.devtools.artifactregistry.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/devtools/artifactregistry/v1/file.proto"; import "google/devtools/artifactregistry/v1/tag.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; @@ -83,6 +84,11 @@ message Version { // Optional. Client specified annotations. map annotations = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Immutable reference for the version, calculated based on the + // version's content. Currently we only support dirsum_sha256 hash algorithm. + // Additional hash algorithms may be added in the future. + repeated Hash fingerprints = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The request to list versions. diff --git a/packages/google-devtools-artifactregistry/protos/protos.d.ts b/packages/google-devtools-artifactregistry/protos/protos.d.ts index b09897990c9..1f77436a9c4 100644 --- a/packages/google-devtools-artifactregistry/protos/protos.d.ts +++ b/packages/google-devtools-artifactregistry/protos/protos.d.ts @@ -4484,6 +4484,9 @@ export namespace google { /** Version annotations */ annotations?: ({ [k: string]: string }|null); + + /** Version fingerprints */ + fingerprints?: (google.devtools.artifactregistry.v1.IHash[]|null); } /** Represents a Version. */ @@ -4516,6 +4519,9 @@ export namespace google { /** Version annotations. */ public annotations: { [k: string]: string }; + /** Version fingerprints. */ + public fingerprints: google.devtools.artifactregistry.v1.IHash[]; + /** * Creates a new Version instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-devtools-artifactregistry/protos/protos.js b/packages/google-devtools-artifactregistry/protos/protos.js index 7fae15548d5..c1bbd9102cf 100644 --- a/packages/google-devtools-artifactregistry/protos/protos.js +++ b/packages/google-devtools-artifactregistry/protos/protos.js @@ -11011,6 +11011,7 @@ * @property {Array.|null} [relatedTags] Version relatedTags * @property {google.protobuf.IStruct|null} [metadata] Version metadata * @property {Object.|null} [annotations] Version annotations + * @property {Array.|null} [fingerprints] Version fingerprints */ /** @@ -11024,6 +11025,7 @@ function Version(properties) { this.relatedTags = []; this.annotations = {}; + this.fingerprints = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11086,6 +11088,14 @@ */ Version.prototype.annotations = $util.emptyObject; + /** + * Version fingerprints. + * @member {Array.} fingerprints + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.fingerprints = $util.emptyArray; + /** * Creates a new Version instance using the specified properties. * @function create @@ -11126,6 +11136,9 @@ if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.fingerprints != null && message.fingerprints.length) + for (var i = 0; i < message.fingerprints.length; ++i) + $root.google.devtools.artifactregistry.v1.Hash.encode(message.fingerprints[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; @@ -11211,6 +11224,12 @@ message.annotations[key] = value; break; } + case 10: { + if (!(message.fingerprints && message.fingerprints.length)) + message.fingerprints = []; + message.fingerprints.push($root.google.devtools.artifactregistry.v1.Hash.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -11284,6 +11303,15 @@ if (!$util.isString(message.annotations[key[i]])) return "annotations: string{k:string} expected"; } + if (message.fingerprints != null && message.hasOwnProperty("fingerprints")) { + if (!Array.isArray(message.fingerprints)) + return "fingerprints: array expected"; + for (var i = 0; i < message.fingerprints.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Hash.verify(message.fingerprints[i]); + if (error) + return "fingerprints." + error; + } + } return null; }; @@ -11335,6 +11363,16 @@ for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) message.annotations[keys[i]] = String(object.annotations[keys[i]]); } + if (object.fingerprints) { + if (!Array.isArray(object.fingerprints)) + throw TypeError(".google.devtools.artifactregistry.v1.Version.fingerprints: array expected"); + message.fingerprints = []; + for (var i = 0; i < object.fingerprints.length; ++i) { + if (typeof object.fingerprints[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Version.fingerprints: object expected"); + message.fingerprints[i] = $root.google.devtools.artifactregistry.v1.Hash.fromObject(object.fingerprints[i]); + } + } return message; }; @@ -11351,8 +11389,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.relatedTags = []; + object.fingerprints = []; + } if (options.objects || options.defaults) object.annotations = {}; if (options.defaults) { @@ -11383,6 +11423,11 @@ for (var j = 0; j < keys2.length; ++j) object.annotations[keys2[j]] = message.annotations[keys2[j]]; } + if (message.fingerprints && message.fingerprints.length) { + object.fingerprints = []; + for (var j = 0; j < message.fingerprints.length; ++j) + object.fingerprints[j] = $root.google.devtools.artifactregistry.v1.Hash.toObject(message.fingerprints[j], options); + } return object; }; diff --git a/packages/google-devtools-artifactregistry/protos/protos.json b/packages/google-devtools-artifactregistry/protos/protos.json index f6b34fa74bd..dc9bdac4d2d 100644 --- a/packages/google-devtools-artifactregistry/protos/protos.json +++ b/packages/google-devtools-artifactregistry/protos/protos.json @@ -1029,6 +1029,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "fingerprints": { + "rule": "repeated", + "type": "Hash", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json b/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json index 25f6766fcda..a8ffbe34418 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json @@ -2215,7 +2215,7 @@ "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_async", "title": "ArtifactRegistry exportArtifact Sample", "origin": "API_DEFINITION", - "description": " Exports an artifact.", + "description": " Exports an artifact to a Cloud Storage bucket.", "canonical": true, "file": "artifact_registry.export_artifact.js", "language": "JAVASCRIPT", diff --git a/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts b/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts index a62d34e624f..18a7ea0ae36 100644 --- a/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts +++ b/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts @@ -4337,7 +4337,7 @@ export class ArtifactRegistryClient { return decodeOperation as LROperation; } /** - * Exports an artifact. + * Exports an artifact to a Cloud Storage bucket. * * @param {Object} request * The request object that will be sent.